WriteStream
Stream static html to an element, where "static html" denotes "html without scripts".
This class maintains a history of writes devoid of any attributes or "proxy history".
Injecting the proxy history into a temporary div has no side-effects, other than to create proxy elements for previously written elements.
Given the staticHtml
of a new write, a tempDiv
's innerHTML is set to
proxy_history + staticHtml
.
The structure of tempDiv
's contents, (i.e., the placement of new nodes
beside or inside of proxy elements), reflects the DOM structure that would
have resulted if all writes had been squashed into a single write.
For each descendent node
of tempDiv
whose parentNode is a proxy,
node
is appended to the corresponding real element within the DOM.
Proxy elements are mapped to actual elements in the DOM by injecting a
data-id
attribute into each start tag in staticHtml
.
Constructor Summary
Public Constructor | ||
public |
constructor(root: Object, options: Object) Constructor. |
Member Summary
Public Members | ||
public |
actuals: * |
|
public |
|
|
public |
doc: * |
|
public |
options: * |
|
public |
parser: * |
|
public |
|
|
public |
proxyRoot: * |
|
public |
root: * |
|
public |
scriptStack: * |
|
public |
win: * |
|
public |
writeQueue: * |