|
|||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.mozilla.javascript.ScriptableObject com.gargoylesoftware.htmlunit.javascript.SimpleScriptable com.gargoylesoftware.htmlunit.javascript.host.NodeImpl com.gargoylesoftware.htmlunit.javascript.host.Document
public final class Document
A JavaScript object for a Document.
Field Summary |
---|
Fields inherited from class org.mozilla.javascript.ScriptableObject |
---|
CONST, DONTENUM, EMPTY, PERMANENT, READONLY, UNINITIALIZED_CONST |
Fields inherited from interface org.mozilla.javascript.Scriptable |
---|
NOT_FOUND |
Constructor Summary | |
---|---|
Document()
Create an instance. |
Method Summary | |
---|---|
HtmlPage |
getHtmlPage()
Return the html page that this document is modeling.. |
HtmlPage |
getHtmlPageOrNull()
Return the html page that this document is modeling or null if the page is empty. |
void |
jsConstructor()
Javascript constructor. |
void |
jsxFunction_close()
javascript function "close". |
Attribute |
jsxFunction_createAttribute(java.lang.String attributeName)
Creates a new HTML attribute with the specified name. |
java.lang.Object |
jsxFunction_createDocumentFragment()
Create a new DocumentFragment |
java.lang.Object |
jsxFunction_createElement(java.lang.String tagName)
Create a new HTML element with the given tag name. |
java.lang.Object |
jsxFunction_createElementNS(java.lang.String namespaceURI,
java.lang.String qualifiedName)
Create a new HTML element with the given tag name, and name |
Event |
jsxFunction_createEvent(java.lang.String eventType)
Implementation of the DocumentEvent interface's
org.w3c.dom.events.DocumentEvent#createEvent(String) method. |
Event |
jsxFunction_createEventObject()
Implementation of the createEventObject method supported by Internet Explorer. |
Stylesheet |
jsxFunction_createStyleSheet(java.lang.String url,
int index)
Creates a new Stylesheet. |
java.lang.Object |
jsxFunction_createTextNode(java.lang.String newData)
Create a new DOM text node with the given data. |
java.lang.Object |
jsxFunction_getElementById(java.lang.String id)
Return the element with the specified id or null if that element could not be found |
java.lang.Object |
jsxFunction_getElementsByName(java.lang.String elementName)
Returns all HTML elements that have a "name" attribute with the given value. |
java.lang.Object |
jsxFunction_getElementsByTagName(java.lang.String tagName)
Returns all the descendant elements with the specified tag name. |
static java.lang.Object |
jsxFunction_open(org.mozilla.javascript.Context context,
org.mozilla.javascript.Scriptable scriptable,
java.lang.Object[] args,
org.mozilla.javascript.Function function)
javascript function "open". |
static void |
jsxFunction_write(org.mozilla.javascript.Context context,
org.mozilla.javascript.Scriptable thisObj,
java.lang.Object[] args,
org.mozilla.javascript.Function function)
javascript function "write" may accept a variable number of args. |
static void |
jsxFunction_writeln(org.mozilla.javascript.Context context,
org.mozilla.javascript.Scriptable thisObj,
java.lang.Object[] args,
org.mozilla.javascript.Function function)
javascript function "writeln" may accept a variable number of args. |
HTMLCollection |
jsxGet_all()
Return the value of the "all" property. |
java.lang.Object |
jsxGet_anchors()
Return the value of the javascript attribute "anchors". |
java.lang.Object |
jsxGet_body()
Returns this document's body element. |
java.lang.String |
jsxGet_cookie()
Return the cookie attribute. |
java.lang.Object |
jsxGet_defaultView()
Get the window in which this document is contained. |
java.lang.Object |
jsxGet_documentElement()
Get the JavaScript property "documentElement" for the document. |
java.lang.String |
jsxGet_domain()
The domain name of the server that served the document, or null if the server cannot be identified by a domain name. |
java.lang.Object |
jsxGet_forms()
Return the value of the javascript attribute "forms". |
java.lang.Object |
jsxGet_frames()
Return the value of the frames property. |
java.lang.Object |
jsxGet_images()
Return the value of the "images" property. |
DOMImplementation |
jsxGet_implementation()
Returns the implementation object of the current document. |
java.lang.Object |
jsxGet_links()
Return the value of the javascript attribute "links". |
Location |
jsxGet_location()
Return the value of the "location" property. |
java.lang.Object |
jsxGet_parentWindow()
Get the window in which this document is contained. |
java.lang.String |
jsxGet_readyState()
Returns the ready state of the document. |
java.lang.String |
jsxGet_referrer()
Return the value of the "referrer" property. |
java.lang.Object |
jsxGet_scripts()
Return the value of the javascript attribute "scripts". |
java.lang.String |
jsxGet_title()
Returns this document's title. |
java.lang.String |
jsxGet_URL()
Return the value of the "URL" property. |
void |
jsxSet_cookie(java.lang.String newCookie)
Adds a cookie |
void |
jsxSet_domain(java.lang.String newDomain)
Set the the domain of this document. |
void |
jsxSet_location(java.lang.String location)
Sets the value of the "location" property. |
void |
jsxSet_title(java.lang.String title)
Sets this document's title. |
Methods inherited from class com.gargoylesoftware.htmlunit.javascript.host.NodeImpl |
---|
executeEvent, fireEvent, getEventHandler, jsxFunction_addEventListener, jsxFunction_appendChild, jsxFunction_attachEvent, jsxFunction_cloneNode, jsxFunction_detachEvent, jsxFunction_hasChildNodes, jsxFunction_insertBefore, jsxFunction_isSameNode, jsxFunction_removeChild, jsxFunction_removeEventListener, jsxFunction_replaceChild, jsxGet_childNodes, jsxGet_firstChild, jsxGet_lastChild, jsxGet_nextSibling, jsxGet_nodeName, jsxGet_nodeType, jsxGet_nodeValue, jsxGet_parentNode, jsxGet_previousSibling, jsxSet_nodeValue, setEventHandler |
Methods inherited from class com.gargoylesoftware.htmlunit.javascript.SimpleScriptable |
---|
get, getBooleanArg, getClassName, getDefaultValue, getDomNodeOrDie, getDomNodeOrNull, getHtmlElementOrDie, getHtmlElementOrNull, getIntArg, getObjectArg, getStringArg, makeScriptableFor, setDomNode, setHtmlElement |
Methods inherited from class org.mozilla.javascript.ScriptableObject |
---|
associateValue, avoidObjectDetection, callMethod, callMethod, defineClass, defineClass, defineClass, defineConst, defineConstProperty, defineFunctionProperties, defineProperty, defineProperty, defineProperty, defineProperty, delete, delete, deleteProperty, deleteProperty, get, getAllIds, getAssociatedValue, getAttributes, getAttributes, getAttributes, getAttributes, getClassPrototype, getDefaultValue, getFunctionPrototype, getGetterOrSetter, getIds, getObjectPrototype, getParentScope, getProperty, getProperty, getPropertyIds, getPrototype, getTopLevelScope, getTopScopeValue, has, has, hasInstance, hasProperty, hasProperty, isConst, isSealed, put, put, putConst, putConstProperty, putProperty, putProperty, redefineProperty, sealObject, setAttributes, setAttributes, setAttributes, setAttributes, setGetterOrSetter, setParentScope, setPrototype |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Document()
Method Detail |
---|
public HtmlPage getHtmlPage()
public HtmlPage getHtmlPageOrNull()
public void jsConstructor()
public void jsxFunction_close() throws java.io.IOException
java.io.IOException
- If an IO problem occurs.public Attribute jsxFunction_createAttribute(java.lang.String attributeName)
attributeName
- the name of the attribute to create
public java.lang.Object jsxFunction_createDocumentFragment()
public java.lang.Object jsxFunction_createElement(java.lang.String tagName)
tagName
- The tag name
public java.lang.Object jsxFunction_createElementNS(java.lang.String namespaceURI, java.lang.String qualifiedName)
namespaceURI
- the URI that identifies an XML namespace.qualifiedName
- The qualified name of the element type to instantiate
public Event jsxFunction_createEvent(java.lang.String eventType) throws org.w3c.dom.DOMException
DocumentEvent
interface's
org.w3c.dom.events.DocumentEvent#createEvent(String)
method. The method creates an
event of the specified type.
eventType
- The event type to create.
org.w3c.dom.DOMException
- Thrown if the event type is not supported. The DOMException will have a
type of DOMException.NOT_SUPPORTED_ERRpublic Event jsxFunction_createEventObject()
public Stylesheet jsxFunction_createStyleSheet(java.lang.String url, int index)
Stylesheet
object.
url
- the stylesheet urlindex
- where to insert the sheet in the collection
public java.lang.Object jsxFunction_createTextNode(java.lang.String newData)
newData
- The string value for the text node.
public java.lang.Object jsxFunction_getElementById(java.lang.String id)
id
- The ID to search for
public java.lang.Object jsxFunction_getElementsByName(java.lang.String elementName)
elementName
- - value of the "name" attribute to look for
public java.lang.Object jsxFunction_getElementsByTagName(java.lang.String tagName)
tagName
- the name to search for
public static java.lang.Object jsxFunction_open(org.mozilla.javascript.Context context, org.mozilla.javascript.Scriptable scriptable, java.lang.Object[] args, org.mozilla.javascript.Function function)
context
- The javascript contextscriptable
- The scriptableargs
- The arguments passed into the method.function
- The function.
public static void jsxFunction_write(org.mozilla.javascript.Context context, org.mozilla.javascript.Scriptable thisObj, java.lang.Object[] args, org.mozilla.javascript.Function function)
context
- The javascript contextthisObj
- The scriptableargs
- The arguments passed into the method.function
- The function.public static void jsxFunction_writeln(org.mozilla.javascript.Context context, org.mozilla.javascript.Scriptable thisObj, java.lang.Object[] args, org.mozilla.javascript.Function function)
context
- The javascript contextthisObj
- The scriptableargs
- The arguments passed into the method.function
- The function.public HTMLCollection jsxGet_all()
public java.lang.Object jsxGet_anchors()
public java.lang.Object jsxGet_body()
public java.lang.String jsxGet_cookie()
public java.lang.Object jsxGet_defaultView()
public java.lang.Object jsxGet_documentElement()
public java.lang.String jsxGet_domain()
public java.lang.Object jsxGet_forms()
public java.lang.Object jsxGet_frames()
public java.lang.Object jsxGet_images()
public DOMImplementation jsxGet_implementation()
public java.lang.Object jsxGet_links()
public Location jsxGet_location()
public java.lang.Object jsxGet_parentWindow()
public java.lang.String jsxGet_readyState()
DomNode.READY_STATE_UNINITIALIZED
,
DomNode.READY_STATE_LOADING
,
DomNode.READY_STATE_LOADED
,
DomNode.READY_STATE_INTERACTIVE
,
DomNode.READY_STATE_COMPLETE
public java.lang.String jsxGet_referrer()
public java.lang.Object jsxGet_scripts()
public java.lang.String jsxGet_title()
public java.lang.String jsxGet_URL()
public void jsxSet_cookie(java.lang.String newCookie)
newCookie
- in the format "name=value[;expires=date][;domain=domainname][;path=path][;secure]public void jsxSet_domain(java.lang.String newDomain)
The domain will be set according to the following rules:
newDomain
- the new domain to setpublic void jsxSet_location(java.lang.String location) throws java.io.IOException
location
- the location to navigate to
java.io.IOException
- when location loading failspublic void jsxSet_title(java.lang.String title)
title
- the new title
|
|||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |