Class DocumentProxy

  • All Implemented Interfaces:
    java.io.Serializable, org.htmlunit.corejs.javascript.Callable, org.htmlunit.corejs.javascript.Constructable, org.htmlunit.corejs.javascript.Function, org.htmlunit.corejs.javascript.Scriptable, org.htmlunit.corejs.javascript.SymbolScriptable

    public class DocumentProxy
    extends HtmlUnitScriptableProxy<Document>
    Proxy for a Document script object. In theory we could satisfy single-document requirements without a proxy, by reusing (with appropriate cleanup and re-initialization) a single Document instance across various pages. However, we allow users to keep references to old pages as they navigate across a series of pages, and all of these pages need to be usable -- so we can't just leave these old pages without a window.document object.
    See Also:
    Serialized Form
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private WebWindow webWindow_  
      • Fields inherited from class org.htmlunit.corejs.javascript.Delegator

        obj
      • Fields inherited from interface org.htmlunit.corejs.javascript.Scriptable

        NOT_FOUND
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      Document getDelegee()
      • Methods inherited from class org.htmlunit.corejs.javascript.Delegator

        call, construct, delete, delete, delete, get, getClassName, getIds, getParentScope, getPrototype, has, newInstance, put, setDelegee, setParentScope, setPrototype
      • Methods inherited from class java.lang.Object

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

      • webWindow_

        private final WebWindow webWindow_
    • Constructor Detail

      • DocumentProxy

        public DocumentProxy​(WebWindow webWindow)
        Construct a proxy for the Document of the WebWindow.
        Parameters:
        webWindow - the window
    • Method Detail

      • getDelegee

        public Document getDelegee()
        Overrides:
        getDelegee in class org.htmlunit.corejs.javascript.Delegator