mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 03:17:35 +00:00
LibWeb: Move passing of Web object prototypes out of constructors
This commit is contained in:
parent
834202aeb9
commit
af75493883
35 changed files with 157 additions and 23 deletions
|
@ -12,7 +12,7 @@
|
|||
namespace Web::DOM {
|
||||
|
||||
NodeIterator::NodeIterator(Node& root)
|
||||
: PlatformObject(Bindings::cached_web_prototype(root.realm(), "NodeIterator"))
|
||||
: PlatformObject(root.realm())
|
||||
, m_root(root)
|
||||
, m_reference({ root })
|
||||
{
|
||||
|
@ -21,6 +21,12 @@ NodeIterator::NodeIterator(Node& root)
|
|||
|
||||
NodeIterator::~NodeIterator() = default;
|
||||
|
||||
void NodeIterator::initialize(JS::Realm& realm)
|
||||
{
|
||||
Base::initialize(realm);
|
||||
set_prototype(&Bindings::ensure_web_prototype<Bindings::NodeIteratorPrototype>(realm, "NodeIterator"));
|
||||
}
|
||||
|
||||
void NodeIterator::finalize()
|
||||
{
|
||||
Base::finalize();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue