MediaError.cpp 621 B

123456789101112131415161718192021222324252627
  1. /*
  2. * Copyright (c) 2023, Tim Flynn <trflynn89@serenityos.org>
  3. *
  4. * SPDX-License-Identifier: BSD-2-Clause
  5. */
  6. #include <LibJS/Runtime/Realm.h>
  7. #include <LibWeb/Bindings/Intrinsics.h>
  8. #include <LibWeb/Bindings/MediaErrorPrototype.h>
  9. #include <LibWeb/HTML/MediaError.h>
  10. namespace Web::HTML {
  11. MediaError::MediaError(JS::Realm& realm, Code code, String message)
  12. : Base(realm)
  13. , m_code(code)
  14. , m_message(move(message))
  15. {
  16. }
  17. void MediaError::initialize(JS::Realm& realm)
  18. {
  19. Base::initialize(realm);
  20. set_prototype(&Bindings::ensure_web_prototype<Bindings::MediaErrorPrototype>(realm, "MediaError"));
  21. }
  22. }