Converts the given html content into nodes and returns a nodelist. A shared rendering div is used for this conversion, so the caller needs to remove the nodes from their parent (the shared div) and should not keep a reference to the nodelist.
Parameter | Type | Description |
---|---|---|
htmlContent | Object | HTML content to convert. |
targetDocument | Object |
Example usage:
// Set up spacer & content divs: spacers = Mojo.View.convertToNodeList(" <div name='topSpacer' style='background-color:#e4e4e2;'></div> <div name='bottomSpacer' style='background-color:#e4e4e2;'></div>", this.controller.document); this.topSpacer = spacers[0]; this.bottomSpacer = spacers[1]; Element.remove(this.topSpacer); Element.remove(this.bottomSpacer);
0 Comments