/*
 * Copyright (C) 2006, 2007, 2010 Apple Inc. All rights reserved.
 * Copyright (C) 2006 Samuel Weinig <sam.weinig@gmail.com>
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Library General Public
 * License as published by the Free Software Foundation; either
 * version 2 of the License, or (at your option) any later version.
 *
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Library General Public License for more details.
 *
 * You should have received a copy of the GNU Library General Public License
 * along with this library; see the file COPYING.LIB.  If not, write to
 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
 * Boston, MA 02110-1301, USA.
 */

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

    // obsolete members
    // https://html.spec.whatwg.org/#HTMLTableElement-partial
    [CEReactions, Reflect] attribute DOMString align;
    [CEReactions, Reflect] attribute DOMString border;
    [CEReactions, Reflect] attribute DOMString frame;
    [CEReactions, Reflect] attribute DOMString rules;
    [CEReactions, Reflect] attribute DOMString summary;
    [CEReactions, Reflect] attribute DOMString width;

    [CEReactions, Reflect] attribute [TreatNullAs=EmptyString] DOMString bgColor;
    [CEReactions, Reflect] attribute [TreatNullAs=EmptyString] DOMString cellPadding;
    [CEReactions, Reflect] attribute [TreatNullAs=EmptyString] DOMString cellSpacing;
};
