コード例 #1
0
ファイル: HtmlTable.cs プロジェクト: riyanhax/Maui
        /// <summary>
        /// Returns the TR element embedding the given element.
        /// If the given element itself is a TR, this one is returned.
        /// </summary>
        public static IHtmlElement GetEmbeddingTR(IHtmlElement e)
        {
            e.Require(x => e != null);

            if (e.TagName == "TR")
            {
                return(e);
            }
            else
            {
                var parent = e.FindParent(p => p.TagName == "TR", p => e.IsTableOrTBody());
                return(parent == null ? null : parent);
            }
        }
コード例 #2
0
ファイル: HtmlTable.cs プロジェクト: bg0jr/Maui
        /// <summary>
        /// Returns the TR element embedding the given element.
        /// If the given element itself is a TR, this one is returned.
        /// </summary>
        public static IHtmlElement GetEmbeddingTR( IHtmlElement e )
        {
            e.Require( x => e != null );

            if ( e.TagName == "TR" )
            {
                return e;
            }
            else
            {
                var parent = e.FindParent( p => p.TagName == "TR", p => e.IsTableOrTBody() );
                return (parent == null ? null : parent);
            }
        }