mirror of
https://github.com/netsurf-browser/netsurf
synced 2024-11-23 14:59:47 +03:00
implement Element::className
This commit is contained in:
parent
16d938dd63
commit
7ab835df8f
@ -163,6 +163,22 @@ getter id %{
|
||||
}
|
||||
%}
|
||||
|
||||
/* attribute DOMString Element::className; */
|
||||
getter className %{
|
||||
dom_string *value;
|
||||
dom_exception exc;
|
||||
|
||||
exc = dom_element_get_attribute(private->node, corestring_dom_class, &value);
|
||||
if (exc != DOM_NO_ERR) {
|
||||
return JS_FALSE;
|
||||
}
|
||||
|
||||
if (value != NULL) {
|
||||
jsret = JS_NewStringCopyN(cx, dom_string_data(value), dom_string_length(value));
|
||||
dom_string_unref(value);
|
||||
}
|
||||
%}
|
||||
|
||||
/* DOMString? Element::getAttribute(DOMString name); */
|
||||
operation getAttribute %{
|
||||
dom_string *value;
|
||||
|
@ -134,6 +134,7 @@ dom_string *corestring_dom_cellpadding;
|
||||
dom_string *corestring_dom_cellspacing;
|
||||
dom_string *corestring_dom_change;
|
||||
dom_string *corestring_dom_charset;
|
||||
dom_string *corestring_dom_class;
|
||||
dom_string *corestring_dom_click;
|
||||
dom_string *corestring_dom_close;
|
||||
dom_string *corestring_dom_color;
|
||||
@ -357,6 +358,7 @@ void corestrings_fini(void)
|
||||
CSS_DOM_STRING_UNREF(cellspacing);
|
||||
CSS_DOM_STRING_UNREF(change);
|
||||
CSS_DOM_STRING_UNREF(charset);
|
||||
CSS_DOM_STRING_UNREF(class);
|
||||
CSS_DOM_STRING_UNREF(click);
|
||||
CSS_DOM_STRING_UNREF(close);
|
||||
CSS_DOM_STRING_UNREF(color);
|
||||
@ -611,6 +613,7 @@ nserror corestrings_init(void)
|
||||
CSS_DOM_STRING_INTERN(cellspacing);
|
||||
CSS_DOM_STRING_INTERN(change);
|
||||
CSS_DOM_STRING_INTERN(charset);
|
||||
CSS_DOM_STRING_INTERN(class);
|
||||
CSS_DOM_STRING_INTERN(click);
|
||||
CSS_DOM_STRING_INTERN(close);
|
||||
CSS_DOM_STRING_INTERN(color);
|
||||
|
@ -140,6 +140,7 @@ extern struct dom_string *corestring_dom_cellpadding;
|
||||
extern struct dom_string *corestring_dom_cellspacing;
|
||||
extern struct dom_string *corestring_dom_change;
|
||||
extern struct dom_string *corestring_dom_charset;
|
||||
extern struct dom_string *corestring_dom_class;
|
||||
extern struct dom_string *corestring_dom_click;
|
||||
extern struct dom_string *corestring_dom_close;
|
||||
extern struct dom_string *corestring_dom_color;
|
||||
|
Loading…
Reference in New Issue
Block a user