class dom::MutationObserver
sys::Obj dom::MutationObserver
@Js
MutationObserver invokes a callback when DOM modifications occur.
- disconnet
-
This disconnet()
Disconnect this observer from receiving DOM mutation events.
- make
-
new make(Func<Void,List<MutationRec>> callback)
Constructor.
- observe
-
This observe(Elem target, Map<Str,Obj> opts)
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')
- "childList":
- takeRecs
-
List<MutationRec> takeRecs()
Empties this observers's record queue and returns what was in there.