mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 22:57:44 +00:00
LibWeb: Add HTMLCanvasElement.{width,height} properties
This commit is contained in:
parent
f1715bbd5e
commit
c4c549625f
1 changed files with 12 additions and 0 deletions
|
@ -47,6 +47,18 @@ HTMLCanvasElementWrapper::HTMLCanvasElementWrapper(HTMLCanvasElement& element)
|
||||||
}
|
}
|
||||||
return JS::js_undefined();
|
return JS::js_undefined();
|
||||||
});
|
});
|
||||||
|
put_native_property(
|
||||||
|
"width",
|
||||||
|
[this](JS::Object*) {
|
||||||
|
return JS::Value(node().preferred_width());
|
||||||
|
},
|
||||||
|
nullptr);
|
||||||
|
put_native_property(
|
||||||
|
"height",
|
||||||
|
[this](JS::Object*) {
|
||||||
|
return JS::Value(node().preferred_height());
|
||||||
|
},
|
||||||
|
nullptr);
|
||||||
}
|
}
|
||||||
|
|
||||||
HTMLCanvasElementWrapper::~HTMLCanvasElementWrapper()
|
HTMLCanvasElementWrapper::~HTMLCanvasElementWrapper()
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue