From 9fb755b7544c6a618a260f5c1a6c8724265bf735 Mon Sep 17 00:00:00 2001 From: Michael Drake Date: Mon, 1 Feb 2016 18:48:42 +0000 Subject: [PATCH] Handle known HTML elements without specialisations. --- javascript/duktape/dukky.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/javascript/duktape/dukky.c b/javascript/duktape/dukky.c index 6e40549d3..ec52fa897 100644 --- a/javascript/duktape/dukky.c +++ b/javascript/duktape/dukky.c @@ -342,10 +342,16 @@ static void dukky_html_element_class_from_tag_type(dom_html_element_type type, break; case DOM_HTML_ELEMENT_TYPE__COUNT: assert(type != DOM_HTML_ELEMENT_TYPE__COUNT); - default: case DOM_HTML_ELEMENT_TYPE__UNKNOWN: SET_HTML_CLASS(UNKNOWN) break; + default: + /* Known HTML element without a specialisation */ + *html_class = PROTO_NAME(HTMLELEMENT); + *html_class_len = + SLEN(PROTO_NAME(HTML)) + + SLEN("ELEMENT"); + break; } return; }