Slottable.cpp 843 B

1234567891011121314151617181920212223242526272829303132
  1. /*
  2. * Copyright (c) 2023, Tim Flynn <trflynn89@serenityos.org>
  3. *
  4. * SPDX-License-Identifier: BSD-2-Clause
  5. */
  6. #include <LibWeb/Bindings/MainThreadVM.h>
  7. #include <LibWeb/DOM/Element.h>
  8. #include <LibWeb/DOM/Node.h>
  9. #include <LibWeb/DOM/ShadowRoot.h>
  10. #include <LibWeb/DOM/Slottable.h>
  11. #include <LibWeb/DOM/Text.h>
  12. #include <LibWeb/HTML/HTMLSlotElement.h>
  13. namespace Web::DOM {
  14. SlottableMixin::~SlottableMixin() = default;
  15. void SlottableMixin::visit_edges(JS::Cell::Visitor& visitor)
  16. {
  17. visitor.visit(m_assigned_slot);
  18. visitor.visit(m_manual_slot_assignment);
  19. }
  20. // https://dom.spec.whatwg.org/#dom-slotable-assignedslot
  21. JS::GCPtr<HTML::HTMLSlotElement> SlottableMixin::assigned_slot()
  22. {
  23. // FIXME: The assignedSlot getter steps are to return the result of find a slot given this and with the open flag set.
  24. return nullptr;
  25. }
  26. }