From 0d4942d42c7b96a5b8c672d0c7075fda534f1262 Mon Sep 17 00:00:00 2001 From: Vincent Sanders Date: Mon, 12 Oct 2015 09:10:03 +0100 Subject: [PATCH] add automaticaly generated property setter and getters to HTMLElement --- Docs/UnimplementedJavascript.txt | 6 ------ javascript/duktape/HTMLElement.bnd | 20 ++++++++++++++++++++ javascript/duktape/netsurf.bnd | 2 +- 3 files changed, 21 insertions(+), 7 deletions(-) create mode 100644 javascript/duktape/HTMLElement.bnd diff --git a/Docs/UnimplementedJavascript.txt b/Docs/UnimplementedJavascript.txt index 91f7bfdbe..9722f6040 100644 --- a/Docs/UnimplementedJavascript.txt +++ b/Docs/UnimplementedJavascript.txt @@ -703,8 +703,6 @@ setter HTMLElement::contentEditable(string);\n getter HTMLElement::contextMenu(user);\n setter HTMLElement::contextMenu(user);\n getter HTMLElement::dataset(user);\n -getter HTMLElement::dir(string);\n -setter HTMLElement::dir(string);\n getter HTMLElement::draggable(boolean);\n setter HTMLElement::draggable(boolean);\n getter HTMLElement::dropzone(user);\n @@ -713,8 +711,6 @@ method HTMLElement::forceSpellCheck();\n getter HTMLElement::hidden(boolean);\n setter HTMLElement::hidden(boolean);\n getter HTMLElement::isContentEditable(boolean);\n -getter HTMLElement::lang(string);\n -setter HTMLElement::lang(string);\n getter HTMLElement::onabort(user);\n setter HTMLElement::onabort(user);\n getter HTMLElement::onautocompleteerror(user);\n @@ -845,8 +841,6 @@ getter HTMLElement::spellcheck(boolean);\n setter HTMLElement::spellcheck(boolean);\n getter HTMLElement::tabIndex(long);\n setter HTMLElement::tabIndex(long);\n -getter HTMLElement::title(string);\n -setter HTMLElement::title(string);\n getter HTMLElement::translate(boolean);\n setter HTMLElement::translate(boolean);\n getter HTMLEmbedElement::align(string);\n diff --git a/javascript/duktape/HTMLElement.bnd b/javascript/duktape/HTMLElement.bnd new file mode 100644 index 000000000..7a3424913 --- /dev/null +++ b/javascript/duktape/HTMLElement.bnd @@ -0,0 +1,20 @@ +/* HTML element binding using duktape and libdom + * + * Copyright 2015 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 HTMLHtmlElement(struct dom_html_element *html_html_element::html_element); + +getter HTMLElement::dir(); +setter HTMLElement::dir(); + +getter HTMLElement::lang(); +setter HTMLElement::lang(); + +getter HTMLElement::title(); +setter HTMLElement::title(); diff --git a/javascript/duktape/netsurf.bnd b/javascript/duktape/netsurf.bnd index dd208d373..bc48204f3 100644 --- a/javascript/duktape/netsurf.bnd +++ b/javascript/duktape/netsurf.bnd @@ -69,6 +69,7 @@ struct dom_html_br_element; #include "HTMLBodyElement.bnd" #include "HTMLButtonElement.bnd" #include "HTMLBRElement.bnd" +#include "HTMLElement.bnd" #include "HTMLHRElement.bnd" /* specialisations of html_element */ @@ -133,7 +134,6 @@ init HTMLMetaElement(struct dom_html_element *html_meta_element::html_element); init HTMLLinkElement(struct dom_html_element *html_link_element::html_element); init HTMLTitleElement(struct dom_html_element *html_title_element::html_element); init HTMLHeadElement(struct dom_html_element *html_head_element::html_element); -init HTMLHtmlElement(struct dom_html_element *html_html_element::html_element); /* specialisations of HTMLTableCellElement */ init HTMLTableHeaderCellElement(struct dom_html_element *html_table_header_cell_element::html_table_cell_element);