/* * Copyright (c) 2025, Johannes Gustafsson * * SPDX-License-Identifier: BSD-2-Clause */ #include #include #include #include #include "XPathNSResolver.h" namespace Web::XPath { GC_DEFINE_ALLOCATOR(XPathNSResolver); GC::Ref XPathNSResolver::create(JS::Realm& realm, GC::Ref callback) { return realm.create(realm, callback); } XPathNSResolver::XPathNSResolver(JS::Realm& realm, GC::Ref callback) : JS::Object(ConstructWithPrototypeTag::Tag, realm.intrinsics().object_prototype()) , m_callback(callback) { } void XPathNSResolver::visit_edges(Cell::Visitor& visitor) { Base::visit_edges(visitor); visitor.visit(m_callback); } }