예제 #1
0
        public IElement QuerySelector(string selectors)
        {
            if (selectors.Contains("|"))
            {
                selectors = selectors.Replace("|", "\\:");
            }

            return(ChildNodes.QuerySelector(selectors, Parser));
        }
예제 #2
0
        public IElement QuerySelectorWithSelf(string selectors)
        {
            if (this.Matches(selectors))
            {
                return(this);
            }

            var selector = cachedSelectorProvider.GetOrAdd(selectors, parser.ParseSelector);

            return(ChildNodes.QuerySelector(selector));
        }
예제 #3
0
        public IElement QuerySelectorWithSelf(string selectors)
        {
            if (selectors.Contains("|"))
            {
                selectors = selectors.Replace("|", "\\:");
            }

            if (this.Matches(selectors))
            {
                return(this);
            }

            return(ChildNodes.QuerySelector(selectors, Parser));
        }
예제 #4
0
        public IDomElement <TDependencyObject> QuerySelectorWithSelf(StyleSheet styleSheet, ISelector selector)
        {
            var match = Matches(styleSheet, selector);

            if (match.IsSuccess)
            {
                return(this);
            }
            else if (match.HasGeneralParentFailed)
            {
                // return null;
            }

            //var selector = cachedSelectorProvider.GetOrAdd(selectors);

            return(ChildNodes.QuerySelector(styleSheet, selector));
        }
예제 #5
0
 /// <summary>
 /// Returns the first element within the document (using depth-first
 /// pre-order traversal of the document's nodes) that matches the
 /// specified group of selectors.
 /// </summary>
 /// <param name="selectors">
 /// A string containing one or more CSS selectors separated by commas.
 /// </param>
 /// <returns>An element object.</returns>
 public IElement QuerySelector(String selectors)
 {
     return(ChildNodes.QuerySelector(selectors));
 }
예제 #6
0
        public IElement QuerySelector(string selectors)
        {
            var selector = cachedSelectorProvider.GetOrAdd(selectors, parser.ParseSelector);

            return(ChildNodes.QuerySelector(selector));
        }
예제 #7
0
 public IElement?QuerySelector(String selectors) => ChildNodes.QuerySelector(selectors, null);
예제 #8
0
        public IDomElement <TDependencyObject> QuerySelector(StyleSheet styleSheet, ISelector selector)
        {
            // var selector = cachedSelectorProvider.GetOrAdd(selectors);

            return(ChildNodes.QuerySelector(styleSheet, selector));
        }