summaryrefslogtreecommitdiff
path: root/Libraries/LibWeb/Bindings/HTMLCanvasElementWrapper.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Libraries/LibWeb/Bindings/HTMLCanvasElementWrapper.cpp')
-rw-r--r--Libraries/LibWeb/Bindings/HTMLCanvasElementWrapper.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/Libraries/LibWeb/Bindings/HTMLCanvasElementWrapper.cpp b/Libraries/LibWeb/Bindings/HTMLCanvasElementWrapper.cpp
index 99b8f9df10..2c78580280 100644
--- a/Libraries/LibWeb/Bindings/HTMLCanvasElementWrapper.cpp
+++ b/Libraries/LibWeb/Bindings/HTMLCanvasElementWrapper.cpp
@@ -24,8 +24,9 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#include <AK/Function.h>
#include <AK/FlyString.h>
+#include <AK/Function.h>
+#include <LibJS/Interpreter.h>
#include <LibJS/Runtime/PrimitiveString.h>
#include <LibJS/Runtime/Value.h>
#include <LibWeb/Bindings/CanvasRenderingContext2DWrapper.h>
@@ -39,7 +40,8 @@ namespace Bindings {
HTMLCanvasElementWrapper::HTMLCanvasElementWrapper(HTMLCanvasElement& element)
: ElementWrapper(element)
{
- put_native_function("getContext", [this](JS::Object*, const Vector<JS::Value>& arguments) -> JS::Value {
+ put_native_function("getContext", [this](JS::Interpreter& interpreter) -> JS::Value {
+ auto& arguments = interpreter.call_frame().arguments;
if (arguments.size() >= 1) {
auto* context = node().get_context(arguments[0].to_string());
return wrap(heap(), *context);