1
2
3
4
5
6
7
8
9
10
11
12
13
14
15 package org.htmlunit.javascript.host.html;
16
17 import org.htmlunit.html.HtmlDefinitionList;
18 import org.htmlunit.javascript.JavaScriptEngine;
19 import org.htmlunit.javascript.configuration.JsxClass;
20 import org.htmlunit.javascript.configuration.JsxConstructor;
21 import org.htmlunit.javascript.configuration.JsxGetter;
22 import org.htmlunit.javascript.configuration.JsxSetter;
23
24
25
26
27
28
29
30 @JsxClass(domClass = HtmlDefinitionList.class)
31 public class HTMLDListElement extends HTMLElement {
32
33
34
35
36 @Override
37 @JsxConstructor
38 public void jsConstructor() {
39 super.jsConstructor();
40 }
41
42
43
44
45
46 @JsxGetter
47 public boolean isCompact() {
48 return getDomNodeOrDie().hasAttribute("compact");
49 }
50
51
52
53
54
55 @JsxSetter
56 public void setCompact(final Object compact) {
57 if (JavaScriptEngine.toBoolean(compact)) {
58 getDomNodeOrDie().setAttribute("compact", "");
59 }
60 else {
61 getDomNodeOrDie().removeAttribute("compact");
62 }
63 }
64 }