Add binding for DIV element's align getter/setter, and test.
Currently the second part of the test fails.
This commit is contained in:
parent
8ff9abf5b6
commit
6098646e72
|
@ -678,8 +678,6 @@ method HTMLDialogElement::show();\n
|
|||
method HTMLDialogElement::showModal();\n
|
||||
getter HTMLDirectoryElement::compact(boolean);\n
|
||||
setter HTMLDirectoryElement::compact(boolean);\n
|
||||
getter HTMLDivElement::align(string);\n
|
||||
setter HTMLDivElement::align(string);\n
|
||||
getter HTMLDListElement::compact(boolean);\n
|
||||
setter HTMLDListElement::compact(boolean);\n
|
||||
getter HTMLElement::accessKeyLabel(string);\n
|
||||
|
|
|
@ -0,0 +1,14 @@
|
|||
/* HTML div element binding using duktape and libdom
|
||||
*
|
||||
* Copyright 2015 Michael Drake <tlsa@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 HTMLDivElement(struct dom_html_element *html_div_element::html_element);
|
||||
|
||||
getter HTMLDivElement::align();
|
||||
setter HTMLDivElement::align();
|
|
@ -72,6 +72,7 @@ struct dom_html_br_element;
|
|||
#include "HTMLBodyElement.bnd"
|
||||
#include "HTMLButtonElement.bnd"
|
||||
#include "HTMLBRElement.bnd"
|
||||
#include "HTMLDivElement.bnd"
|
||||
#include "HTMLFontElement.bnd"
|
||||
#include "HTMLFormElement.bnd"
|
||||
#include "HTMLFrameElement.bnd"
|
||||
|
@ -132,7 +133,6 @@ init HTMLModElement(struct dom_html_element *html_mod_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 HTMLDataElement(struct dom_html_element *html_data_element::html_element);
|
||||
init HTMLDivElement(struct dom_html_element *html_div_element::html_element);
|
||||
init HTMLDListElement(struct dom_html_element *html_d_list_element::html_element);
|
||||
init HTMLUListElement(struct dom_html_element *html_u_list_element::html_element);
|
||||
init HTMLHeadElement(struct dom_html_element *html_head_element::html_element);
|
||||
|
|
|
@ -0,0 +1,22 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>document interface enumeration</title>
|
||||
<link rel="stylesheet" type="text/css" href="tst.css">
|
||||
</head>
|
||||
<body>
|
||||
<h1>HTMLDivElement test</h1>
|
||||
|
||||
<script>
|
||||
var e = document.createElement("Div");
|
||||
var t = document.createTextNode("This text should be aligned right.");
|
||||
e.appendChild(t);
|
||||
e.setAttribute("id", "test");
|
||||
e.align = "right";
|
||||
document.body.appendChild(e);
|
||||
var test = document.getElementById("test");
|
||||
document.write("The align attribute for the above text is set to: ", test.align, ".");
|
||||
</script>
|
||||
|
||||
</body>
|
||||
</html>
|
Loading…
Reference in New Issue