add_operation
method expects a snake-cased Symbol, JavaScript methods are camelCased.setCookie
and innerHtml
methods are an excellent starting point.processElements
function.select_all: true
and you will see a console log message for every matching element.shouldMorph
and didMorph
callbacks only impact use of the morph
operation.onBeforeElUpdated
callback, shouldMorph
, sequentially executes an array of functions called shouldMorphCallbacks
. It comes factory installed with two callbacks that you can probably leave alone: verifyNotMutable
and verifyNotPermanent
. If you're not using StimulusReflex, you could experiment with slice
to remove verifyNotPermanent
for a small performance boost. 🤷options
passed to the morph
method, fromEl
, which is the element before it is (potentially) morphed, and toEl
, which is the element fromEl
will (potentially) be morphed into.onElUpdated
callback, didMorph
, sequentially executes an array of functions called didMorphCallbacks
. These callbacks will only fire for elements which were successfully morphed.options
passed to the morph
method, and el
, which is the element after it has been morphed.hydrated
CSS class to every morphed element with a tagname that starts with "SL-".emitMissingElementWarnings: false
as the second parameter to perform
.