servo/components/script/dom/webidls/HTMLTableElement.webidl
author Yoav Alon <yoava333@gmail.com>
Tue, 12 Apr 2016 23:00:45 +0500
changeset 338491 8ebe1b758ee1af13d4e9cc8a600a4d1ebe3b8402
parent 338465 d07ee1178d980f2d5ff8a86d6c429eb0d3e9a82b
child 338559 4036fbc9a7134ae10955fb3aeaf2675d96f0cc18
permissions -rw-r--r--
servo: Merge #9980 - Implement the table section IDL attributes for HTML tables (from yoava333:master); r=nox a pull request that solves #9769. I fixed on review note, and couldn't reproduce the second one. Fixes #10506. Source-Repo: https://github.com/servo/servo Source-Revision: ea97c8905580e67e96ae00572d1c4e7af3d58736

/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */

// https://html.spec.whatwg.org/multipage/#htmltableelement
interface HTMLTableElement : HTMLElement {
           attribute HTMLTableCaptionElement? caption;
  HTMLElement createCaption();
  void deleteCaption();
  [SetterThrows]
           attribute HTMLTableSectionElement? tHead;
  HTMLTableSectionElement createTHead();
  void deleteTHead();
  [SetterThrows]
           attribute HTMLTableSectionElement? tFoot;
  HTMLTableSectionElement createTFoot();
  void deleteTFoot();
  readonly attribute HTMLCollection tBodies;
  HTMLTableSectionElement createTBody();
  readonly attribute HTMLCollection rows;
  //HTMLElement insertRow(optional long index = -1);
  //void deleteRow(long index);
  //         attribute boolean sortable;
  //void stopSorting();

  // also has obsolete members
};

// https://html.spec.whatwg.org/multipage/#HTMLTableElement-partial
partial interface HTMLTableElement {
  //         attribute DOMString align;
  //         attribute DOMString border;
  //         attribute DOMString frame;
  //         attribute DOMString rules;
  //         attribute DOMString summary;
  attribute DOMString width;

  [TreatNullAs=EmptyString] attribute DOMString bgColor;
  //[TreatNullAs=EmptyString] attribute DOMString cellPadding;
  //[TreatNullAs=EmptyString] attribute DOMString cellSpacing;
};