Pārlūkot izejas kodu

LibWeb: Add spec link and comment to HTMLTableElement::caption()

Andreas Kling 2 gadi atpakaļ
vecāks
revīzija
6e127f62d7
1 mainītis faili ar 3 papildinājumiem un 0 dzēšanām
  1. 3 0
      Userland/Libraries/LibWeb/HTML/HTMLTableElement.cpp

+ 3 - 0
Userland/Libraries/LibWeb/HTML/HTMLTableElement.cpp

@@ -54,8 +54,11 @@ void HTMLTableElement::apply_presentational_hints(CSS::StyleProperties& style) c
     });
 }
 
+// https://html.spec.whatwg.org/multipage/tables.html#dom-table-caption
 JS::GCPtr<HTMLTableCaptionElement> HTMLTableElement::caption()
 {
+    // The caption IDL attribute must return, on getting, the first caption element child of the table element,
+    // if any, or null otherwise.
     return first_child_of_type<HTMLTableCaptionElement>();
 }