mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 21:07: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
|
@ -11,7 +11,7 @@
|
|||
namespace Web::DOM {
|
||||
|
||||
AbstractRange::AbstractRange(Node& start_container, u32 start_offset, Node& end_container, u32 end_offset)
|
||||
: Bindings::PlatformObject(Bindings::cached_web_prototype(start_container.realm(), "AbstractRange"))
|
||||
: Bindings::PlatformObject(start_container.realm())
|
||||
, m_start_container(start_container)
|
||||
, m_start_offset(start_offset)
|
||||
, m_end_container(end_container)
|
||||
|
@ -21,6 +21,12 @@ AbstractRange::AbstractRange(Node& start_container, u32 start_offset, Node& end_
|
|||
|
||||
AbstractRange::~AbstractRange() = default;
|
||||
|
||||
void AbstractRange::initialize(JS::Realm& realm)
|
||||
{
|
||||
Base::initialize(realm);
|
||||
set_prototype(&Bindings::ensure_web_prototype<Bindings::AbstractRangePrototype>(realm, "AbstractRange"));
|
||||
}
|
||||
|
||||
void AbstractRange::visit_edges(Cell::Visitor& visitor)
|
||||
{
|
||||
Base::visit_edges(visitor);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue