Removed some leftovers. Moved urlHandlers to the proper section.
Updated README.md for consistency and accuracy.
Added the same adjustment to the JSDocs
Also removed one of the forced line breaks in the table.
Removed "Supported" column in README.md table.
Since all are now supported, the information was superfluous.
Added various links to the mozilla docs where appropriate.
Updated some descriptions to be more clear.
Fixed example in README.md.
Fixed the last example to make the options match the earlier options.
Also updated the JSDoc to match earlier changes.
Updated examples in README.md.
Updated the examples to use add_event_listeners
instead of on.common.eventList
Added removeListener to events in README.md.
Added removeListener(callback, options)
to each of the events, and bolded the methods instead of using a code block
Prioritize using "listener" over "callback"
Updated all the parameter names consistent and most other references to "callback" or "callback function" to now use "listener" for consistency.
Removed an inaccurate statement in the example that was leftover of an old version.
Use Promise.resolve().then() instead of setTimeout().
setTimeout(callback, 0) creates a macrotask, whereas Promise.resolve().then(callback) creates a microtask, and they both appear to work properly, as far as "turbo:load" is concerned.
This also alleviates potential warning messages in the console in the case that the callback of setTimeout took a significant amount of time to execute.
The setTimeout version can be used via the options
parameter by setting timeout
to 'setTimeout'
. The noTimeout
option has been changed to this setting.
Reverted default timeout
to setTimeout
. Added noWarn
option. Made url
a URL
. Bumped version.
Added noWarn
option and removed wkof.turbo.silenceWarnings
global configurable.
The url
parameter passed to the listener is now a URL
object.
The warning logged to the console is now a custom Error object, which facilitates providing the stack trace.
Bumped the version to 4.2.0.
Added many links to the README.
Updated many descriptions and spacings in the README table.
Updated the examples to match the new options and changes.
Added urlHandler
option. Bumped to version 4.2.1.
urlHandler
is a function taking a URL
parameter and which returns a boolean
indicating whether the listener should be called.
Currently not documented in the README.md.
Added items_pages
common location
Fixed position of comment lines
Added downloadURL
and updateURL