Пример #1
0
        /// <summary>Finds any focusable element before / after this one.</summary>
        public bool SearchFocusable(bool after, int search, ref int bestSoFar, ref HtmlElement best)
        {
            // Current parent:
            HtmlElement parent          = parentNode as HtmlElement;
            HtmlElement currentRelative = this;

            // Go down the parent chain:
            while (parent != null)
            {
                if (parent.SearchRelativeFocusable(currentRelative, after, search, ref bestSoFar, ref best))
                {
                    // Found an ideal match - stop.
                    return(true);
                }

                currentRelative = parent;

                // Next parent:
                parent = parent.parentNode_ as HtmlElement;
            }

            return(false);
        }