mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-25 10:48:41 +00:00
LibWeb: Remove unecessary dependence on Window from HTML classes
These classes only needed Window to get at its realm. Pass a realm directly to construct HTML classes.
This commit is contained in:
committed by
Linus Groh
parent
a2ccb00e1d
commit
f0c5f77f99
@@ -13,7 +13,7 @@ namespace Web::HTML {
|
||||
HTMLButtonElement::HTMLButtonElement(DOM::Document& document, DOM::QualifiedName qualified_name)
|
||||
: HTMLElement(document, move(qualified_name))
|
||||
{
|
||||
set_prototype(&window().cached_web_prototype("HTMLButtonElement"));
|
||||
set_prototype(&Bindings::cached_web_prototype(realm(), "HTMLButtonElement"));
|
||||
|
||||
// https://html.spec.whatwg.org/multipage/form-elements.html#the-button-element:activation-behaviour
|
||||
activation_behavior = [this](auto&) {
|
||||
|
||||
Reference in New Issue
Block a user