mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 09:07:44 +00:00
LibWeb: Implement document.applets
This is a legacy interface that returns an always-empty HTMLCollection.
This commit is contained in:
parent
e4df1b223f
commit
43d16fa5b6
3 changed files with 11 additions and 0 deletions
|
@ -510,6 +510,13 @@ NonnullRefPtr<HTMLCollection> Document::get_elements_by_class_name(FlyString con
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
NonnullRefPtr<HTMLCollection> Document::applets()
|
||||||
|
{
|
||||||
|
// FIXME: This should return the same HTMLCollection object every time,
|
||||||
|
// but that would cause a reference cycle since HTMLCollection refs the root.
|
||||||
|
return HTMLCollection::create(*this, [] { return false; });
|
||||||
|
}
|
||||||
|
|
||||||
Color Document::link_color() const
|
Color Document::link_color() const
|
||||||
{
|
{
|
||||||
if (m_link_color.has_value())
|
if (m_link_color.has_value())
|
||||||
|
|
|
@ -140,6 +140,8 @@ public:
|
||||||
NonnullRefPtr<HTMLCollection> get_elements_by_tag_name(FlyString const&);
|
NonnullRefPtr<HTMLCollection> get_elements_by_tag_name(FlyString const&);
|
||||||
NonnullRefPtr<HTMLCollection> get_elements_by_class_name(FlyString const&);
|
NonnullRefPtr<HTMLCollection> get_elements_by_class_name(FlyString const&);
|
||||||
|
|
||||||
|
NonnullRefPtr<HTMLCollection> applets();
|
||||||
|
|
||||||
const String& source() const { return m_source; }
|
const String& source() const { return m_source; }
|
||||||
void set_source(const String& source) { m_source = source; }
|
void set_source(const String& source) { m_source = source; }
|
||||||
|
|
||||||
|
|
|
@ -18,6 +18,8 @@ interface Document : Node {
|
||||||
HTMLCollection getElementsByTagName(DOMString tagName);
|
HTMLCollection getElementsByTagName(DOMString tagName);
|
||||||
HTMLCollection getElementsByClassName(DOMString className);
|
HTMLCollection getElementsByClassName(DOMString className);
|
||||||
|
|
||||||
|
readonly attribute HTMLCollection applets;
|
||||||
|
|
||||||
Element createElement(DOMString tagName);
|
Element createElement(DOMString tagName);
|
||||||
Element createElementNS(DOMString? namespace, DOMString qualifiedName);
|
Element createElementNS(DOMString? namespace, DOMString qualifiedName);
|
||||||
DocumentFragment createDocumentFragment();
|
DocumentFragment createDocumentFragment();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue