
rows returns a HTMLCollection of all the tr elements contained within the table. We leave the SameObject attribute off the attribute in the IDL as we cannot currently return the same HTMLCollection every time (see the FIXME on DOM::Document::applets) The WrapperGenerator currently does not correctly handle the default value for the type long on insertRow. Currently not specifying the index will insert a row at index 0.
30 lines
762 B
C++
30 lines
762 B
C++
/*
|
|
* Copyright (c) 2020, Andreas Kling <kling@serenityos.org>
|
|
*
|
|
* SPDX-License-Identifier: BSD-2-Clause
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
#include <LibWeb/DOM/ExceptionOr.h>
|
|
#include <LibWeb/HTML/HTMLElement.h>
|
|
#include <LibWeb/HTML/HTMLTableRowElement.h>
|
|
|
|
namespace Web::HTML {
|
|
|
|
class HTMLTableElement final : public HTMLElement {
|
|
public:
|
|
using WrapperType = Bindings::HTMLTableElementWrapper;
|
|
|
|
HTMLTableElement(DOM::Document&, QualifiedName);
|
|
virtual ~HTMLTableElement() override;
|
|
|
|
NonnullRefPtr<DOM::HTMLCollection> rows();
|
|
DOM::ExceptionOr<NonnullRefPtr<HTMLTableRowElement>> insert_row(long index);
|
|
DOM::ExceptionOr<void> delete_row(long index);
|
|
|
|
private:
|
|
virtual void apply_presentational_hints(CSS::StyleProperties&) const override;
|
|
};
|
|
|
|
}
|