mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-06 00:25:12 +00:00
Bindings: Implement is_supported_property_index in terms of item_value
Greatly simplifying the code :^)
This commit is contained in:
committed by
Andreas Kling
parent
c5c1a8fcc7
commit
9b1af542e7
@@ -59,14 +59,6 @@ Vector<FlyString> PluginArray::supported_property_names() const
|
||||
return plugin_names;
|
||||
}
|
||||
|
||||
// https://html.spec.whatwg.org/multipage/system-state.html#pdf-viewing-support:supports-indexed-properties
|
||||
bool PluginArray::is_supported_property_index(u32 index) const
|
||||
{
|
||||
// The PluginArray interface supports indexed properties. The supported property indices are the indices of this's relevant global object's PDF viewer plugin objects.
|
||||
auto& window = verify_cast<HTML::Window>(HTML::relevant_global_object(*this));
|
||||
return index < window.pdf_viewer_plugin_objects().size();
|
||||
}
|
||||
|
||||
// https://html.spec.whatwg.org/multipage/system-state.html#dom-pluginarray-length
|
||||
size_t PluginArray::length() const
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user