DOMPointReadOnly.cpp 745 B

1234567891011121314151617181920212223242526272829
  1. /*
  2. * Copyright (c) 2022, Andreas Kling <kling@serenityos.org>
  3. *
  4. * SPDX-License-Identifier: BSD-2-Clause
  5. */
  6. #include <LibWeb/Bindings/Intrinsics.h>
  7. #include <LibWeb/Geometry/DOMPointReadOnly.h>
  8. namespace Web::Geometry {
  9. JS::NonnullGCPtr<DOMPointReadOnly> DOMPointReadOnly::construct_impl(JS::Realm& realm, double x, double y, double z, double w)
  10. {
  11. return *realm.heap().allocate<DOMPointReadOnly>(realm, realm, x, y, z, w);
  12. }
  13. DOMPointReadOnly::DOMPointReadOnly(JS::Realm& realm, double x, double y, double z, double w)
  14. : PlatformObject(realm)
  15. , m_x(x)
  16. , m_y(y)
  17. , m_z(z)
  18. , m_w(w)
  19. {
  20. set_prototype(&Bindings::cached_web_prototype(realm, "DOMPointReadOnly"));
  21. }
  22. DOMPointReadOnly::~DOMPointReadOnly() = default;
  23. }