Methods
go
TOC
Collapse the table of content
Expand the table of content

Methods

This section describes the methods associates with various Document Object Model (DOM) objects.

In this section

TopicDescription

addReadRequest

Obsolete. Adds an entry to the queue for read requests.

adoptNode

Tries to move a node from one document to the document that the document object displays.

appendChild

Appends an element as a child to the object.

appendData

Adds a new character string to the end of the object.

assign

Loads a new HTML document.

AutoCompleteSaveForm

Saves the specified form in the AutoComplete data store.

AutoScan

Obsolete as of Windows Internet Explorer 7. Attempts to connect to a Web server by passing the specified query through completion templates.

back

Loads a previous URL from the History list.

callback

Function to invoke if an MSLaunchURI call for a system protocol is successful

captureEvents

No appreciable effect. Do not use.

clear

To clear all elements in the current document, use document.write(""), followed by document.close.

clearRequest

Obsolete. Clears all requests in the read-requests queue to prepare for new profile-information requests.

cloneNode

Copies a reference to the object from the document hierarchy.

close

Closes the view (window).

compareDocumentPosition

Compares the position of two nodes in a document.

confirmSiteSpecificTrackingException

Indicates whether an exception exists for a given domain.

confirmWebWideTrackingException

Indicates whether an exception exists for services from a given domain.

contains

Test if a string is part of this DOMStringList.

ContentDiscoveryReset

Resets the list of feeds, search providers, and Web Slices associated with the page.

createAttribute

Creates an attribute object with a specified name.

createAttributeNS

Creates a reference to an attribute object that is associated with an XML namespace.

createCDATASection

Creates a CDATA section that contains the specified text.

createComment

Creates a comment object with the specified data.

createDocument

Creates a document that is not attached to a window.

createDocumentFragment

Creates a new document.

createDocumentType

Creates a document type element.

createElement

Creates an instance of the element for the specified tag.

createElementNS

Creates an element from the specified namespace.

createHTMLDocument

Creates an HTML document.

createProcessingInstruction

Creates a processing instruction for an XML parser.

createTextNode

Creates a text string from the specified value.

deleteData

Removes a specified range of characters from the object.

disconnect

Stops a MutationObserver from monitoring changes to the DOM nodes registered to it.

doImport

Dynamically imports an element behavior.

elementFromPoint

Returns the element for the specified x coordinate and the specified y coordinate.

execScript

Note   execScript is no longer supported. Starting with Internet Explorer 11, use eval. For info, see Compatibility changes.
 

Executes the specified script in the provided language.

exitFullscreen

Causes an element to stop being displayed in full-screen mode.

exitPointerLock

Exits the document out of pointer lock state.

forward

Loads the next URL from the History list.

getAdjacentText

Returns the adjacent text string.

getAttributeNode

Retrieves an attribute object referenced by the attribute.name property.

getAttributeNodeNS

Gets an attribute object that matches the specified namespace and name.

getAttributeNS

Gets the value of the specified attribute within the specified namespace.

getCandidateWindowClientRect

Returns a ClientRect object with candidate window coordinate space information (if the Input Method Editor (IME) candidate window is visible).

getCompositionAlternatives

Returns a copy of the current list of alternate candidate strings from the MSInputMethodContext object.

getElementById

Returns a reference to the first object with the specified value of the ID or NAME attribute.

getElementsByName

Gets a collection of objects based on the value of the NAME or ID attribute.

getElementsByTagNameNS

Gets a collection of objects that are based on the specified element names within a specified namespace.

getElementsByTagNameNS (document)

Gets a collection of nodes that match an element name from the specified namespace.

msGetInputContext

Returns the MSInputMethodContext associated with the calling element.

getNamedItem

Gets an attribute specified with the name property, by using the attributes collection.

getNamedItemNS

Gets an attribute that is specified with the name property and namespace, by using the attributes collection.

go

Loads a URL from the History list.

hasAttribute

Determines whether an attribute with the specified name exists.

hasAttributeNS

Determines whether an attribute that has the specified namespace and name exists.

hasChildNodes

Returns a value that indicates whether the object has children.

hasComposition

Determines if there is a composition in progress on the element associated with the MSInputMethodContext.

hasFeature

Returns a value that indicates whether the object implements a specific DOM standard.

importNode

Imports a node from another document into the the document that the document object displays.

InPrivateFilteringEnabled

Detects whether the user has enabled InPrivate Filtering.

insertAdjacentElement

Inserts an element at the specified location.

insertAdjacentHTML

Inserts the given HTML text into the element at the location.

insertAdjacentText

Inserts the given text into the element at the specified location.

insertBefore

Inserts an element into the document hierarchy as a child node of a parent object.

insertData

Inserts a new character string in the object at a specified offset.

isCandidateWindowVisible

Returns true if the IME candidate window UI is visible, and false otherwise.

isDefaultNamespace

Indicates whether or not a namespace is the default namespace for a document.

isEqualNode

Determines if two nodes are equal.

isSameNode

Determines if two node references refer to the same node.

isSupported

Returns a value indicating whether or not the object supports a specific DOM standard.

item

Retrieves an object from a bookmarks collection.

item (Plugin, MimeTypeArray)

Provides index based access for items in a pluginArray, plugin, or MimeTypeArray

javaEnabled

Returns whether Java is enabled.

lookupNamespaceURI

Gets the Uniform Resource Identifier (URI) of the namespace associated with a namespace prefix, if any.

lookupPrefix

Gets the namespace prefix associated with a URI, if any.

msActiveXFilteringEnabled

Determines whether Microsoft ActiveX Filtering is enabled by the user.

msAddTrackingProtectionList

Adds an external Tracking Protection list.

MSApp Methods

This section describes MSApp methods, which support Windows Store apps using JavaScript.

msElementsFromPoint

Returns a node list of elements that are “underneath” or intersect a point defined by given x/y coordinates.

msElementsFromRect

Returns an node list of elements that are under a rectangle defined by left, top, width, and height.

msGetWeakWinRTProperty

Retrieves the object that is the target of the specified weak reference that was created by the msSetWeakWinRTProperty function.

msLaunchUri

This method is used to start a service or app, such as an email client, that handles a given protocol. The URI contains the protocol for the default service or app, such as mailto://john@contoso.com.

msProvisionNetworks method

Attempts to configure a connection profile using credentials specified in an XML document.

msReportSafeUrl method

Reports the current URL as a safe URL.

msSaveBlob

Saves the File or Blob to disk.

msSaveOrOpenBlob

Launches the associated application for a File or Blob.

msSetWeakWinRTProperty

Retrieves the object that is the target of the specified weak reference that was created by the msSetWeakWinRTProperty function.

msTrackingProtectionEnabled

Determines whether any Tracking Protection lists are enabled by the user.

namedItem

Returns an object by its id or name from an array.

navigate

Loads the specified URL to the current window.

normalize

Merges adjacent DOM objects to produce a normalized document object model.

observe

Registers a node to observe and specifies the change information to record.

postMessage

Asynchronously posts the provided message to the message queue of the target window corresponding to the MSAppView object.

pushState

Pushes the given data with the given title, and the given URL, if provided, onto the session history .

refresh

This method is supported only for older scripts. It does not affect pluginArray.

refresh

Refreshes the content of the collection.

Note  This behavior is not implemented in Windows Store apps using JavaScript.
 

releaseEvents

No appreciable effect. Do not use.

reload

Reloads the current document.

removeAttributeNode

Removes an attribute object from the object.

removeAttributeNS

Removes the specified attribute from the object.

removeChild

Removes a child node from the object.

removeNamedItem

Removes an attribute specified with the name property from an element by using the attributes collection.

removeNamedItemNS

Removes a named item that is specified by a namespace and local name.

removeNode

Removes the object from the document hierarchy.

removeSiteSpecificTrackingException

Removes a previously-granted tracking exception for a domain.

removeWebWideTrackingException

Removes a previously-granted tracking exception for a service host.

replace

Replaces the current document by loading another document at the specified URL.

replaceChild

Replaces an existing child element with a new child element.

replaceData

Replaces a specified range of characters in the object with a new character string.

replaceNode

Replaces the object with another element.

replaceState

Updates the current entry in the session history to have the given data, title, and, if provided, URL.

replaceWholeText

Replaces the text of the current object.

requestFullscreen

Request that the browser display an element in full-screen mode.

requestPointerLock

Requests that the pointer be locked to the target element.

setAttributeNode

Sets an attribute object node as part of the object.

setAttributeNodeNS

Sets an attribute object as part of the object.

setAttributeNS

Sets the value of the specified attribute within the specified namespace.

setData

(Deprecated.) Assigns data in a specified format to the dataTransfer object or the clipboardData object.

setNamedItem

Adds an attribute to an element by using an attributes collection.

setNamedItemNS

Adds an attribute to an element by using its namespaceURI and localName properties.

ShowBrowserUI

Opens the specified browser dialog box.

showHelp

Displays a Help file. This method can be used with Microsoft HTML Help.

splitText

Divides a text node at the specified index.

storeSiteSpecificTrackingException

Requests an exemption to the "Do not Track" (DNT) rule for a given website.

storeWebWideTrackingException

Requests an exemption to the "Do not Track" (DNT) rule for services used by other websites.

substringData

Extracts a range of characters from the object.

swapNode

Exchanges the location of two objects in the document hierarchy.

taintEnabled

Returns whether data tainting is enabled.

takeRecords

Empties the MutationObserver's record queue and returns what was previously there.

toggle

Adds a token if it is not present, or removes it if it is. Returns true if the token is now present (it was added); returns false if it is not (it was removed).

toString

Stringifies the token list.

toString (DOMError, DOMException)

Returns the name property of a DOMError and any associated message defined with the error.

 

 

 

Show:
© 2016 Microsoft