[HtmlUnit] SVN: [14447] trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/ javascript/host/html/HTMLTableElement.java

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

[HtmlUnit] SVN: [14447] trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/ javascript/host/html/HTMLTableElement.java

asashour-2
Revision: 14447
          http://sourceforge.net/p/htmlunit/code/14447
Author:   asashour
Date:     2017-05-13 15:16:10 +0000 (Sat, 13 May 2017)
Log Message:
-----------
HTMLTableElement.createTBody()

Modified Paths:
--------------
    trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLTableElement.java

Modified: trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLTableElement.java
===================================================================
--- trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLTableElement.java 2017-05-13 15:12:19 UTC (rev 14446)
+++ trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/html/HTMLTableElement.java 2017-05-13 15:16:10 UTC (rev 14447)
@@ -196,6 +196,18 @@
     }
 
     /**
+     * If this table does not have a tbody element, this method creates an empty tbody
+     * element, adds it to the table and then returns it. If this table already has a
+     * tbody element, this method returns the existing tbody element.
+     * @see <a href="http://msdn.microsoft.com/en-us/library/ms536402.aspx">MSDN Documentation</a>
+     * @return a newly added caption if no caption exists, or the first existing caption
+     */
+    @JsxFunction
+    public Object createTBody() {
+        return getScriptableFor(getDomNodeOrDie().appendChildIfNoneExists("tbody"));
+    }
+
+    /**
      * If this table does not have a thead element, this method creates an empty
      * thead element, adds it to the table and then returns it. If this table
      * already has a thead element, this method returns the existing thead element.


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
HtmlUnit-develop mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/htmlunit-develop
Loading...