Javascript Reference
Categories: Range

javascript Range createContextualFragment( )

@March 15, 2008, 1:22 a.m.
createContextualFragment( )Firefox/Netscape/NN 6 IE n/a Chrome/Safari/DOM n/a  

createContextualFragment(contentString)

  

The createContextualFragment( ) method was initially designed as an alternative to the innerHTML convenience property (because the W3C DOM provides little in the way of support for content strings consisting of tags). This method accepts any stringincluding tagged contentas a parameter, and returns a DocumentFragment type of node, ready for appending or inserting into the document tree. Subsequent adoption of the innerHTML property by the Mozilla browser makes this method redundant, except that it is more consistent with the overall nodeness of the W3C DOM.

 
Parameters
 
  • Document content in string form, including tags and attributes.
 
Returned Value

Reference to a document fragment type of node outside of the document tree. This node can then be applied to the document tree.


Powered by Linode.