mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 10:48:11 +00:00
LibJS: Set length property in Object::put_native_function()
This commit is contained in:
parent
b3c4514902
commit
cd3e2690eb
14 changed files with 25 additions and 23 deletions
|
@ -44,7 +44,7 @@ CanvasRenderingContext2DWrapper::CanvasRenderingContext2DWrapper(CanvasRendering
|
|||
: m_impl(impl)
|
||||
{
|
||||
put_native_property("fillStyle", fill_style_getter, fill_style_setter);
|
||||
put_native_function("fillRect", fill_rect);
|
||||
put_native_function("fillRect", fill_rect, 4);
|
||||
}
|
||||
|
||||
CanvasRenderingContext2DWrapper::~CanvasRenderingContext2DWrapper()
|
||||
|
|
|
@ -40,8 +40,8 @@ namespace Bindings {
|
|||
DocumentWrapper::DocumentWrapper(Document& document)
|
||||
: NodeWrapper(document)
|
||||
{
|
||||
put_native_function("getElementById", get_element_by_id);
|
||||
put_native_function("querySelectorAll", query_selector_all);
|
||||
put_native_function("getElementById", get_element_by_id, 1);
|
||||
put_native_function("querySelectorAll", query_selector_all, 1);
|
||||
}
|
||||
|
||||
DocumentWrapper::~DocumentWrapper()
|
||||
|
|
|
@ -39,7 +39,7 @@ namespace Bindings {
|
|||
EventTargetWrapper::EventTargetWrapper(EventTarget& impl)
|
||||
: m_impl(impl)
|
||||
{
|
||||
put_native_function("addEventListener", add_event_listener);
|
||||
put_native_function("addEventListener", add_event_listener, 2);
|
||||
}
|
||||
|
||||
EventTargetWrapper::~EventTargetWrapper()
|
||||
|
|
|
@ -40,7 +40,7 @@ namespace Bindings {
|
|||
HTMLCanvasElementWrapper::HTMLCanvasElementWrapper(HTMLCanvasElement& element)
|
||||
: ElementWrapper(element)
|
||||
{
|
||||
put_native_function("getContext", get_context);
|
||||
put_native_function("getContext", get_context, 1);
|
||||
|
||||
put_native_property("width", width_getter, nullptr);
|
||||
put_native_property("height", height_getter, nullptr);
|
||||
|
|
|
@ -43,9 +43,9 @@ WindowObject::WindowObject(Window& impl)
|
|||
{
|
||||
put_native_property("document", document_getter, document_setter);
|
||||
put_native_function("alert", alert);
|
||||
put_native_function("setInterval", set_interval);
|
||||
put_native_function("requestAnimationFrame", request_animation_frame);
|
||||
put_native_function("cancelAnimationFrame", cancel_animation_frame);
|
||||
put_native_function("setInterval", set_interval, 1);
|
||||
put_native_function("requestAnimationFrame", request_animation_frame, 1);
|
||||
put_native_function("cancelAnimationFrame", cancel_animation_frame, 1);
|
||||
|
||||
put("navigator", heap().allocate<NavigatorObject>());
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue