mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 19:27:44 +00:00
LibWeb: Make factory method of IntersectionObserver fallible
This commit is contained in:
parent
f0fd1cae3d
commit
385b880862
2 changed files with 3 additions and 3 deletions
|
@ -11,13 +11,13 @@
|
||||||
namespace Web::IntersectionObserver {
|
namespace Web::IntersectionObserver {
|
||||||
|
|
||||||
// https://w3c.github.io/IntersectionObserver/#dom-intersectionobserver-intersectionobserver
|
// https://w3c.github.io/IntersectionObserver/#dom-intersectionobserver-intersectionobserver
|
||||||
JS::NonnullGCPtr<IntersectionObserver> IntersectionObserver::construct_impl(JS::Realm& realm, WebIDL::CallbackType* callback, IntersectionObserverInit const& options)
|
WebIDL::ExceptionOr<JS::NonnullGCPtr<IntersectionObserver>> IntersectionObserver::construct_impl(JS::Realm& realm, WebIDL::CallbackType* callback, IntersectionObserverInit const& options)
|
||||||
{
|
{
|
||||||
// FIXME: Implement
|
// FIXME: Implement
|
||||||
(void)callback;
|
(void)callback;
|
||||||
(void)options;
|
(void)options;
|
||||||
|
|
||||||
return realm.heap().allocate<IntersectionObserver>(realm, realm).release_allocated_value_but_fixme_should_propagate_errors();
|
return MUST_OR_THROW_OOM(realm.heap().allocate<IntersectionObserver>(realm, realm));
|
||||||
}
|
}
|
||||||
|
|
||||||
IntersectionObserver::IntersectionObserver(JS::Realm& realm)
|
IntersectionObserver::IntersectionObserver(JS::Realm& realm)
|
||||||
|
|
|
@ -22,7 +22,7 @@ class IntersectionObserver : public Bindings::PlatformObject {
|
||||||
WEB_PLATFORM_OBJECT(IntersectionObserver, Bindings::PlatformObject);
|
WEB_PLATFORM_OBJECT(IntersectionObserver, Bindings::PlatformObject);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
static JS::NonnullGCPtr<IntersectionObserver> construct_impl(JS::Realm&, WebIDL::CallbackType* callback, IntersectionObserverInit const& options = {});
|
static WebIDL::ExceptionOr<JS::NonnullGCPtr<IntersectionObserver>> construct_impl(JS::Realm&, WebIDL::CallbackType* callback, IntersectionObserverInit const& options = {});
|
||||||
|
|
||||||
virtual ~IntersectionObserver() override;
|
virtual ~IntersectionObserver() override;
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue