mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 15:17:36 +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:
parent
a2ccb00e1d
commit
f0c5f77f99
122 changed files with 334 additions and 317 deletions
|
@ -6,6 +6,7 @@
|
|||
|
||||
#pragma once
|
||||
|
||||
#include <LibJS/Heap/GCPtr.h>
|
||||
#include <LibWeb/Bindings/PlatformObject.h>
|
||||
#include <LibWeb/DOM/Document.h>
|
||||
#include <LibWeb/Forward.h>
|
||||
|
@ -18,14 +19,14 @@ class DOMParser final : public Bindings::PlatformObject {
|
|||
WEB_PLATFORM_OBJECT(DOMParser, Bindings::PlatformObject);
|
||||
|
||||
public:
|
||||
static WebIDL::ExceptionOr<JS::NonnullGCPtr<DOMParser>> create_with_global_object(HTML::Window&);
|
||||
static WebIDL::ExceptionOr<JS::NonnullGCPtr<DOMParser>> construct_impl(JS::Realm&);
|
||||
|
||||
virtual ~DOMParser() override;
|
||||
|
||||
JS::NonnullGCPtr<DOM::Document> parse_from_string(String const&, Bindings::DOMParserSupportedType type);
|
||||
|
||||
private:
|
||||
explicit DOMParser(HTML::Window&);
|
||||
explicit DOMParser(JS::Realm&);
|
||||
};
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue