Example #1
0
        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);
        }
Example #2
0
        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);
        }
Example #3
0
        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);
        }
Example #4
0
        //----------------------------------------------------------------------------------------------------
        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;
        }
Example #6
0
 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;
        }