src/js/ui/web/ui.web.core.js
function $resolveDOMParent(c) {
                // try to find an HTML element in zebkit (pay attention, in zebkit hierarchy !)
                // hierarchy that has to be a DOM parent for the given component
                var parentElement = null;
                for(var p = c.parent; p !== null; p = p.parent) {
                    if (p.isDOMElement === true) {
                        parentElement = p.$container;
                        break;
                    }
                }

                // parentElement is null means the component has
                // not been inserted into DOM hierarchy
                if (parentElement !== null && c.$container.parentNode === null) {
                    // parent DOM element of the component is null, but a DOM container
                    // for the element has been detected. We need to add it to DOM
                    // than we have to add the DOM to the found DOM parent element
                    parentElement.appendChild(c.$container);

                    // adjust location of just attached DOM component
                    $adjustLocation(c);
                } else {
                    // test consistency whether the DOM element already has
                    // parent node that doesn't match the discovered
                    if (parentElement           !== null &&
                        c.$container.parentNode !== null &&
                        c.$container.parentNode !== parentElement)
                    {
                        throw new Error("DOM parent inconsistent state ");
                    }
                }
            }
function $resolveDOMParent(c) {
                // try to find an HTML element in zebkit (pay attention, in zebkit hierarchy !)
                // hierarchy that has to be a DOM parent for the given component
                var parentElement = null;
                for(var p = c.parent; p !== null; p = p.parent) {
                    if (p.isDOMElement === true) {
                        parentElement = p.$container;
                        break;
                    }
                }

                // parentElement is null means the component has
                // not been inserted into DOM hierarchy
                if (parentElement !== null && c.$container.parentNode === null) {
                    // parent DOM element of the component is null, but a DOM container
                    // for the element has been detected. We need to add it to DOM
                    // than we have to add the DOM to the found DOM parent element
                    parentElement.appendChild(c.$container);

                    // adjust location of just attached DOM component
                    $adjustLocation(c);
                } else {
                    // test consistency whether the DOM element already has
                    // parent node that doesn't match the discovered
                    if (parentElement           !== null &&
                        c.$container.parentNode !== null &&
                        c.$container.parentNode !== parentElement)
                    {
                        throw new Error("DOM parent inconsistent state ");
                    }
                }
            }
function $resolveDOMParent ( c ) { // try to find an HTML element in zebkit (pay attention, in zebkit hierarchy !) // hierarchy that has to be a DOM parent for the given component var parentElement = null ; for ( var p = c . parent ; p !== null ; p = p . parent ) { if ( p . isDOMElement === true ) { parentElement = p . $container ; break ; } } // parentElement is null means the component has // not been inserted into DOM hierarchy if ( parentElement !== null && c . $container . parentNode === null ) { // parent DOM element of the component is null, but a DOM container // for the element has been detected. We need to add it to DOM // than we have to add the DOM to the found DOM parent element parentElement . appendChild ( c . $container ) ; // adjust location of just attached DOM component $adjustLocation ( c ) ; } else { // test consistency whether the DOM element already has // parent node that doesn't match the discovered if ( parentElement !== null && c . $container . parentNode !== null && c . $container . parentNode !== parentElement ) { throw new Error ( "DOM parent inconsistent state " ) ; } } }
attach to appropriate DOM parent if necessary c parameter has to be DOM element
attach to appropriate DOM parent if necessary c parameter has to be DOM element