Class MutationObserver

    • Nested Class Summary

      • Nested classes/interfaces inherited from class org.htmlunit.corejs.javascript.ScriptableObject

        org.htmlunit.corejs.javascript.ScriptableObject.KeyComparator
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private boolean attaributes_  
      private org.htmlunit.corejs.javascript.NativeArray attributeFilter_  
      private boolean attributeOldValue_  
      private boolean characterData_  
      private boolean characterDataOldValue_  
      private org.htmlunit.corejs.javascript.Function function_  
      private Node node_  
      private boolean subtree_  
      • Fields inherited from class org.htmlunit.corejs.javascript.ScriptableObject

        CONST, DONTENUM, EMPTY, PERMANENT, READONLY, UNINITIALIZED_CONST
      • Fields inherited from interface org.htmlunit.corejs.javascript.Scriptable

        NOT_FOUND
    • Constructor Summary

      Constructors 
      Constructor Description
      MutationObserver()
      Creates an instance.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void attributeAdded​(HtmlAttributeChangeEvent event)
      Notification that a new attribute was added to the HtmlElement.
      void attributeRemoved​(HtmlAttributeChangeEvent event)
      Notification that an existing attribute has been removed from the HtmlElement.
      void attributeReplaced​(HtmlAttributeChangeEvent event)
      Notification that an attribute on the HtmlElement has been replaced.
      void characterDataChanged​(CharacterDataChangeEvent event)
      Notification that a Character Data was added.
      void disconnect()
      Stops the MutationObserver instance from receiving notifications of DOM mutations.
      void jsConstructor​(org.htmlunit.corejs.javascript.Function function)
      Creates an instance.
      void observe​(Node node, org.htmlunit.corejs.javascript.NativeObject options)
      Registers the MutationObserver instance to receive notifications of DOM mutations on the specified node.
      org.htmlunit.corejs.javascript.Scriptable takeRecords()
      Empties the MutationObserver instance's record queue and returns what was in there.
      • Methods inherited from class org.htmlunit.corejs.javascript.ScriptableObject

        applyDescriptorToAttributeBitset, associateValue, avoidObjectDetection, buildDataDescriptor, callMethod, callMethod, checkPropertyChange, checkPropertyDefinition, defineClass, defineClass, defineClass, defineConst, defineConstProperty, defineFunctionProperties, defineOwnProperties, defineOwnProperty, defineOwnProperty, defineProperty, defineProperty, defineProperty, defineProperty, defineProperty, defineProperty, defineProperty, delete, delete, delete, deleteProperty, deleteProperty, deleteProperty, ensureScriptable, ensureScriptableObject, ensureSymbolScriptable, get, get, get, getAllIds, getArrayPrototype, getAssociatedValue, getAttributes, getAttributes, getAttributes, getAttributes, getAttributes, getClassPrototype, getDefaultValue, getExternalArrayData, getExternalArrayLength, getFunctionPrototype, getGeneratorFunctionPrototype, getGetterOrSetter, getGetterOrSetter, getIds, getObjectPrototype, getOwnPropertyDescriptor, getParentScope, getProperty, getProperty, getProperty, getPropertyIds, getPrototype, getTopLevelScope, getTopScopeValue, getTypedProperty, getTypedProperty, getTypeOf, has, has, hasProperty, hasProperty, hasProperty, isAccessorDescriptor, isConst, isDataDescriptor, isEmpty, isExtensible, isFalse, isGenericDescriptor, isGetterOrSetter, isSealed, isTrue, preventExtensions, put, put, putConst, putConstProperty, putProperty, putProperty, putProperty, querySlot, redefineProperty, sameValue, sealObject, setAttributes, setAttributes, setAttributes, setAttributes, setAttributes, setCommonDescriptorProperties, setExternalArrayData, setGetterOrSetter, setPrototype, size
      • Methods inherited from class java.lang.Object

        equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • function_

        private org.htmlunit.corejs.javascript.Function function_
      • node_

        private Node node_
      • attaributes_

        private boolean attaributes_
      • attributeOldValue_

        private boolean attributeOldValue_
      • attributeFilter_

        private org.htmlunit.corejs.javascript.NativeArray attributeFilter_
      • characterData_

        private boolean characterData_
      • characterDataOldValue_

        private boolean characterDataOldValue_
      • subtree_

        private boolean subtree_
    • Constructor Detail

      • MutationObserver

        public MutationObserver()
        Creates an instance.
    • Method Detail

      • jsConstructor

        public void jsConstructor​(org.htmlunit.corejs.javascript.Function function)
        Creates an instance.
        Parameters:
        function - the function to observe
      • observe

        public void observe​(Node node,
                            org.htmlunit.corejs.javascript.NativeObject options)
        Registers the MutationObserver instance to receive notifications of DOM mutations on the specified node.
        Parameters:
        node - the node
        options - the options
      • disconnect

        public void disconnect()
        Stops the MutationObserver instance from receiving notifications of DOM mutations.
      • takeRecords

        public org.htmlunit.corejs.javascript.Scriptable takeRecords()
        Empties the MutationObserver instance's record queue and returns what was in there.
        Returns:
        an NativeArray of MutationRecords