/* * Copyright (c) 2022, Andreas Kling * * SPDX-License-Identifier: BSD-2-Clause */ #include #include #include #include namespace Web::DOM { GC_DEFINE_ALLOCATOR(NodeFilter); GC::Ref NodeFilter::create(JS::Realm& realm, WebIDL::CallbackType& callback) { return realm.create(realm, callback); } NodeFilter::NodeFilter(JS::Realm& realm, WebIDL::CallbackType& callback) : PlatformObject(realm.intrinsics().object_prototype()) , m_callback(callback) { } void NodeFilter::visit_edges(Cell::Visitor& visitor) { Base::visit_edges(visitor); visitor.visit(m_callback); } }