class dom::MutationObserver

sys::Obj
  dom::MutationObserver

@Js

Source

MutationObserver invokes a callback when DOM modifications occur.

disconnet

This disconnet()

Source

Disconnect this observer from receiving DOM mutation events.

make

new make(Func<Void,List<MutationRec>> callback)

Source

Constructor.

observe

This observe(Elem target, Map<Str,Obj> opts)

Source

Register to receive DOM mutation events for given node. At least one option is required:

  • "childList": true to observe node additions and removals on target (including text nodes)
  • "attrs": true to observe target attribute mutations
  • "charData": true to observe target data mutation
  • "subtree": true to observe target and target's descendant mutations
  • "attrOldVal": true to capture attribute value before mutation (requires "attrs":'true')
  • "charDataOldVal": true to capture target's data before mutation (requires "charData":'true')
  • "attrFilter": Str[] whitelist of attribute names to observe (requires "attrs":'true')
takeRecs

List<MutationRec> takeRecs()

Source

Empties this observers's record queue and returns what was in there.