mirror of
https://github.com/netsurf-browser/netsurf
synced 2025-01-18 16:49:18 +03:00
complete binding for HTML BR element
This commit is contained in:
parent
315339cbc8
commit
b5f1c5eee2
@ -693,8 +693,6 @@ getter HTMLBodyElement::text();\n
|
|||||||
setter HTMLBodyElement::text();\n
|
setter HTMLBodyElement::text();\n
|
||||||
getter HTMLBodyElement::vLink();\n
|
getter HTMLBodyElement::vLink();\n
|
||||||
setter HTMLBodyElement::vLink();\n
|
setter HTMLBodyElement::vLink();\n
|
||||||
getter HTMLBRElement::clear();\n
|
|
||||||
setter HTMLBRElement::clear();\n
|
|
||||||
getter HTMLButtonElement::autofocus();\n
|
getter HTMLButtonElement::autofocus();\n
|
||||||
setter HTMLButtonElement::autofocus();\n
|
setter HTMLButtonElement::autofocus();\n
|
||||||
method HTMLButtonElement::checkValidity();\n
|
method HTMLButtonElement::checkValidity();\n
|
||||||
|
50
javascript/duktape/HTMLBRElement.bnd
Normal file
50
javascript/duktape/HTMLBRElement.bnd
Normal file
@ -0,0 +1,50 @@
|
|||||||
|
/* HTML br element binding using duktape and libdom
|
||||||
|
*
|
||||||
|
* Copyright 2015 Vincent Sanders <vince@netsurf-browser.org>
|
||||||
|
*
|
||||||
|
* 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 HTMLBRElement(struct dom_html_element *html_br_element::html_element);
|
||||||
|
|
||||||
|
getter HTMLBRElement::clear()
|
||||||
|
%{
|
||||||
|
dom_exception exc;
|
||||||
|
dom_string *str;
|
||||||
|
|
||||||
|
exc = dom_html_br_element_get_clear(((node_private_t*)priv)->node, &str);
|
||||||
|
if (exc != DOM_NO_ERR) {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
duk_push_lstring(ctx, dom_string_data(str), dom_string_length(str));
|
||||||
|
dom_string_unref(str);
|
||||||
|
|
||||||
|
return 1;
|
||||||
|
|
||||||
|
%}
|
||||||
|
|
||||||
|
setter HTMLBRElement::clear()
|
||||||
|
%{
|
||||||
|
dom_exception exc;
|
||||||
|
dom_string *content;
|
||||||
|
duk_size_t slen;
|
||||||
|
const char *s;
|
||||||
|
s = duk_safe_to_lstring(ctx, 0, &slen);
|
||||||
|
|
||||||
|
exc = dom_string_create((const uint8_t *)s, slen, &content);
|
||||||
|
if (exc != DOM_NO_ERR) {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
exc = dom_html_br_element_set_clear(((node_private_t*)priv)->node, content);
|
||||||
|
dom_string_unref(content);
|
||||||
|
if (exc != DOM_NO_ERR) {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
%}
|
@ -61,6 +61,7 @@ struct dom_html_br_element;
|
|||||||
#include "HTMLCollection.bnd"
|
#include "HTMLCollection.bnd"
|
||||||
#include "Location.bnd"
|
#include "Location.bnd"
|
||||||
#include "Navigator.bnd"
|
#include "Navigator.bnd"
|
||||||
|
#include "HTMLBRElement.bnd"
|
||||||
|
|
||||||
/* specialisations of html_element */
|
/* specialisations of html_element */
|
||||||
init HTMLUnknownElement(struct dom_html_element *html_unknown_element::html_element);
|
init HTMLUnknownElement(struct dom_html_element *html_unknown_element::html_element);
|
||||||
@ -110,7 +111,6 @@ init HTMLImageElement(struct dom_html_element *html_image_element::html_element)
|
|||||||
init HTMLSourceElement(struct dom_html_element *html_source_element::html_element);
|
init HTMLSourceElement(struct dom_html_element *html_source_element::html_element);
|
||||||
init HTMLPictureElement(struct dom_html_element *html_picture_element::html_element);
|
init HTMLPictureElement(struct dom_html_element *html_picture_element::html_element);
|
||||||
init HTMLModElement(struct dom_html_element *html_mod_element::html_element);
|
init HTMLModElement(struct dom_html_element *html_mod_element::html_element);
|
||||||
init HTMLBRElement(struct dom_html_element *html_br_element::html_element);
|
|
||||||
init HTMLSpanElement(struct dom_html_element *html_span_element::html_element);
|
init HTMLSpanElement(struct dom_html_element *html_span_element::html_element);
|
||||||
init HTMLTimeElement(struct dom_html_element *html_time_element::html_element);
|
init HTMLTimeElement(struct dom_html_element *html_time_element::html_element);
|
||||||
init HTMLDataElement(struct dom_html_element *html_data_element::html_element);
|
init HTMLDataElement(struct dom_html_element *html_data_element::html_element);
|
||||||
|
Loading…
Reference in New Issue
Block a user