private JsArray <HtmlElement> findChildNodesForCompoundSelector(HtmlElement element, JsString selector) { //lets start with simple ones var selectors = selector.split(" "); var ar = new JsArray <HtmlElement>(); ar.push(element); var elements = findChildNodesForSelector(ar, selectors); return(elements); }
private static JsNamespace ResolveNamespace(JsString nsText) { var ns = window.As <JsNamespace>(); var tokens = nsText.split('.'); for (var i = 0; i < tokens.length; i++) { var token = tokens[i]; if (@typeof(ns[token]) == "undefined") { ns[token] = new JsNamespace(); } ns[token].As <JsNamespace>().name = tokens.slice(0, i).join("."); ns = ns[token].As <JsNamespace>(); } return(ns); }
private JsObject resolveComplexName(JsObject root, JsString name) { JsObject nextLevel = root; JsArray <JsString> path = name.split("."); for (int i = 0; i < path.length; i++) { nextLevel = nextLevel[path[i]].As <JsObject>(); if (nextLevel.As <JsString>() == JsContext.undefined) { return(null); } } return(nextLevel); }
//---------------------------------------------------------------------------------------------------- public void SendAESTest_Return(ASPdb.Ajax.AjaxResponse ajaxResponse) { if (this.HandleError(ajaxResponse, "SendAESTest_Return")) { return; } JsString response = ajaxResponse.ReturnObj.As <string>(); var arr = response.split(" ... "); if (arr[0] == "Your message: Hello Secure World!") { this.OnReady.After.Fire(); } else { alert("Error in SendAESTest_Return()"); } }
private JsObject resolveComplexName(JsObject root, JsString name) { JsObject nextLevel = root; JsArray<JsString> path = name.split("."); for (int i = 0; i < path.length; i++) { nextLevel = nextLevel[path[i]].As<JsObject>(); if (nextLevel.As<JsString>() == JsContext.undefined) { return null; } } return nextLevel; }
private static JsNamespace ResolveNamespace(JsString nsText) { var ns = window.As<JsNamespace>(); var tokens = nsText.split('.'); for (var i = 0; i < tokens.length; i++) { var token = tokens[i]; if (@typeof(ns[token]) == "undefined") ns[token] = new JsNamespace(); ns[token].As<JsNamespace>().name = tokens.slice(0, i).join("."); ns = ns[token].As<JsNamespace>(); } return ns; }
private JsArray<HtmlElement> findChildNodesForCompoundSelector(HtmlElement element, JsString selector) { //lets start with simple ones var selectors = selector.split( " " ); var ar = new JsArray<HtmlElement>(); ar.push(element); var elements = findChildNodesForSelector( ar, selectors ); return elements; }