mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 20:37:34 +00:00
LibJS: Rename Function => FunctionObject
This commit is contained in:
parent
e389ae3c97
commit
ba9d5c4d54
114 changed files with 263 additions and 262 deletions
|
@ -4,7 +4,7 @@
|
|||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
||||
#include <LibJS/Runtime/Function.h>
|
||||
#include <LibJS/Runtime/FunctionObject.h>
|
||||
#include <LibJS/Runtime/GlobalObject.h>
|
||||
#include <LibWeb/Bindings/EventListenerWrapper.h>
|
||||
#include <LibWeb/DOM/EventListener.h>
|
||||
|
|
|
@ -40,7 +40,7 @@ JS::Value ImageConstructor::call()
|
|||
}
|
||||
|
||||
// https://html.spec.whatwg.org/multipage/embedded-content.html#dom-image
|
||||
JS::Value ImageConstructor::construct(Function&)
|
||||
JS::Value ImageConstructor::construct(FunctionObject&)
|
||||
{
|
||||
auto& window = static_cast<WindowObject&>(global_object());
|
||||
auto& document = window.impl().document();
|
||||
|
|
|
@ -17,7 +17,7 @@ public:
|
|||
virtual ~ImageConstructor() override;
|
||||
|
||||
virtual JS::Value call() override;
|
||||
virtual JS::Value construct(JS::Function& new_target) override;
|
||||
virtual JS::Value construct(JS::FunctionObject& new_target) override;
|
||||
|
||||
private:
|
||||
virtual bool has_constructor() const override { return true; }
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
#include <AK/String.h>
|
||||
#include <AK/Utf8View.h>
|
||||
#include <LibJS/Runtime/Error.h>
|
||||
#include <LibJS/Runtime/Function.h>
|
||||
#include <LibJS/Runtime/FunctionObject.h>
|
||||
#include <LibJS/Runtime/Shape.h>
|
||||
#include <LibTextCodec/Decoder.h>
|
||||
#include <LibWeb/Bindings/DocumentWrapper.h>
|
||||
|
@ -192,7 +192,7 @@ JS_DEFINE_NATIVE_FUNCTION(WindowObject::set_interval)
|
|||
interval = 0;
|
||||
}
|
||||
|
||||
auto timer_id = impl->set_interval(*static_cast<JS::Function*>(callback_object), interval);
|
||||
auto timer_id = impl->set_interval(*static_cast<JS::FunctionObject*>(callback_object), interval);
|
||||
return JS::Value(timer_id);
|
||||
}
|
||||
|
||||
|
@ -221,7 +221,7 @@ JS_DEFINE_NATIVE_FUNCTION(WindowObject::set_timeout)
|
|||
interval = 0;
|
||||
}
|
||||
|
||||
auto timer_id = impl->set_timeout(*static_cast<JS::Function*>(callback_object), interval);
|
||||
auto timer_id = impl->set_timeout(*static_cast<JS::FunctionObject*>(callback_object), interval);
|
||||
return JS::Value(timer_id);
|
||||
}
|
||||
|
||||
|
@ -273,7 +273,7 @@ JS_DEFINE_NATIVE_FUNCTION(WindowObject::request_animation_frame)
|
|||
vm.throw_exception<JS::TypeError>(global_object, JS::ErrorType::NotAFunctionNoParam);
|
||||
return {};
|
||||
}
|
||||
return JS::Value(impl->request_animation_frame(*static_cast<JS::Function*>(callback_object)));
|
||||
return JS::Value(impl->request_animation_frame(*static_cast<JS::FunctionObject*>(callback_object)));
|
||||
}
|
||||
|
||||
JS_DEFINE_NATIVE_FUNCTION(WindowObject::cancel_animation_frame)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue