public void walkDomFragment(Node node, AbstractBehavior parentBehavior = null) { investigateNode(node, parentBehavior); //free this for GC when we are done, it has references to a lot of DOM elements this.extensionsToBeApplied = null; }
public void walkDomChildren(Node parentNode, AbstractBehavior parentBehavior = null) { //The fact that we have two entry point into here walkChildren and walkDomFragment continues to screw us walkChildren(parentNode, parentBehavior); //free this for GC when we are done, it has references to a lot of DOM elements this.extensionsToBeApplied = null; }
public void walkChildren(Node parentNode, InjectionClassBuilder classBuilder, AbstractBehavior parentBehavior = null) { var node = parentNode.firstChild; while (node != null) { investigateNode(node, classBuilder, parentBehavior); node = node.nextSibling; } }
public void investigateTextNode(Node textNode) { //We have a list of matches within the text node which tell us what we need to get //further we have the original node, which we need to preserve as there may be only parts getting translated //even though this is bad form <div>[labels.monkey] is a type of [labels.animal]</div> we still need to support it var result = getElementLocalizationComponents(textNode); if (result != null) { for ( int i=0; i<result.length;i++) { requestTranslation( result[ i ], textNode ); } scheduleTranslation(); } }
public int compareDocumentPosition(Node other) { return default(int); }
public RandoriApplication(Node rootNode) { this.rootNode = rootNode; }
public bool isEqualNode(Node other) { return default(bool); }
public XPathResult evaluate(string expression, Node contextNode, XPathNSResolver resolver, int type, XPathResult inResult) { return default(XPathResult); }
public short acceptNode(Node nodeArg) { return default(short); }
public Node replaceChild(Node newChild, Node oldChild) { return default(Node); }
public Node appendChild(Node newChild) { return default(Node); }
public void importStylesheet(Node stylesheet) {}
public DocumentFragment transformToFragment(Node source, Document docVal) { return default(DocumentFragment); }
public bool writeToURI(Node nodeArg, string uri) { return default(bool); }
public JsString writeToString(Node nodeArg) { return default(JsString); }
public bool write(Node nodeArg, LSOutput destination) { return default(bool); }
public void observe(Node target, object options) {}
public Node parseWithContext(LSInput input, Node contextArg, short action) { return default(Node); }
public bool contains(Node other) { return default(bool); }
public Document transformToDocument(Node source) { return default(Document); }
public Node insertBefore(Node newChild, Node refChild) { return default(Node); }
private void investigateNode(Node node, InjectionClassBuilder classBuilder, AbstractBehavior parentBehavior) { if (node.nodeType == Node.ELEMENT_NODE) { //Just an optimization, need to create constants for all of these things if (node.nodeName == "SCRIPT" || node.nodeName == "META") { return; } if ( node.nodeName == "LINK" ) { investigateLinkElement(node.As<HtmlLinkElement>()); } else { investigateDomElement(node.As<HtmlElement>(), classBuilder, parentBehavior); } } else if (node.nodeType == Node.TEXT_NODE) { //This is a text node, check to see if it needs internationalization localizationProvider.investigateTextNode(node); } else { walkChildren(node, classBuilder, parentBehavior); } }
public Node removeChild(Node oldChild) { return default(Node); }
public object evaluate(string expression, Node contextNode, XPathNSResolver resolver, short type, object result) { return default(object); }
public XPathNSResolver createNSResolver(Node nodeResolver) { return default(XPathNSResolver); }
public void walkDomFragment(Node node, InjectionClassBuilder classBuilder, AbstractBehavior parentBehavior = null) { investigateNode(node, classBuilder, parentBehavior); }
public static Range Get(Node node) { throw new NotImplementedException(); }
public bool isSameNode(Node other) { return default(bool); }
public XPathResult evaluate(Node contextNode, int type, XPathResult inResult) { return default(XPathResult); }
public void dirxml(Node node) { }