From bf4cbc95b0a4d57dd90908dca5524801af4ca91e Mon Sep 17 00:00:00 2001 From: Vincent Sanders Date: Fri, 24 Apr 2020 22:05:57 +0100 Subject: [PATCH] add bindings for canvas width and height --- .../javascript/duktape/HTMLCanvasElement.bnd | 18 ++++++++++++++++++ .../handlers/javascript/duktape/netsurf.bnd | 2 +- 2 files changed, 19 insertions(+), 1 deletion(-) create mode 100644 content/handlers/javascript/duktape/HTMLCanvasElement.bnd diff --git a/content/handlers/javascript/duktape/HTMLCanvasElement.bnd b/content/handlers/javascript/duktape/HTMLCanvasElement.bnd new file mode 100644 index 000000000..189ddb0f4 --- /dev/null +++ b/content/handlers/javascript/duktape/HTMLCanvasElement.bnd @@ -0,0 +1,18 @@ +/* HTML canvas element binding using duktape and libdom + * + * Copyright 2020 Vincent Sanders + * + * This file is part of NetSurf, http://www.netsurf-browser.org/ + * + * Released under the terms of the MIT License, + * http://www.opensource.org/licenses/mit-license + */ + +init HTMLCanvasElement(struct dom_html_element *html_canvas_element::html_element); + +getter HTMLCanvasElement::width(); +setter HTMLCanvasElement::width(); + +getter HTMLCanvasElement::height(); +setter HTMLCanvasElement::height(); + diff --git a/content/handlers/javascript/duktape/netsurf.bnd b/content/handlers/javascript/duktape/netsurf.bnd index 6dbdb70a9..5fc592771 100644 --- a/content/handlers/javascript/duktape/netsurf.bnd +++ b/content/handlers/javascript/duktape/netsurf.bnd @@ -109,6 +109,7 @@ init TrackEvent(struct dom_event *evt::evt); #include "HTMLBodyElement.bnd" #include "HTMLButtonElement.bnd" #include "HTMLBRElement.bnd" +#include "HTMLCanvasElement.bnd" #include "HTMLDivElement.bnd" #include "HTMLFontElement.bnd" #include "HTMLFormElement.bnd" @@ -149,7 +150,6 @@ init TrackEvent(struct dom_event *evt::evt); init HTMLUnknownElement(struct dom_html_element *html_unknown_element::html_element); init HTMLDirectoryElement(struct dom_html_element *html_directory_element::html_element); -init HTMLCanvasElement(struct dom_html_element *html_canvas_element::html_element); init HTMLTemplateElement(struct dom_html_element *html_template_element::html_element); init HTMLDialogElement(struct dom_html_element *html_dialog_element::html_element); init HTMLMenuItemElement(struct dom_html_element *html_menu_item_element::html_element);