1 module libwasm.bindings.HTMLDocument; 2 3 import libwasm.types; 4 5 import memutils.ct: tuple; 6 import libwasm.bindings.Document; 7 import libwasm.bindings.HTMLAllCollection; 8 import libwasm.bindings.NodeList; 9 10 @safe: 11 nothrow: 12 13 struct HTMLDocument { 14 nothrow: 15 libwasm.bindings.Document.Document _parent; 16 alias _parent this; 17 this(Handle h) { 18 _parent = .Document(h); 19 } 20 void domain()(string domain) { 21 Object_Call_string__void(this._parent, "domain", domain); 22 } 23 string domain()() { 24 return Object_Getter__string(this._parent, "domain"); 25 } 26 void cookie()(string cookie) { 27 Object_Call_string__void(this._parent, "cookie", cookie); 28 } 29 string cookie()() { 30 return Object_Getter__string(this._parent, "cookie"); 31 } 32 auto opIndex()(string name) { 33 return JsObject(Object_Call_string__Handle(this._parent, "getter", name)); 34 } 35 auto opDispatch(string name)() { 36 return JsObject(Object_Call_string__Handle(this._parent, "getter", name)); 37 } 38 auto open()(string type, string replace /* = "" */) { 39 return Document(Object_Call_string_string__Handle(this._parent, "open", type, replace)); 40 } 41 auto open()(string type) { 42 return Document(Object_Call_string__Handle(this._parent, "open", type)); 43 } 44 auto open()() { 45 return Document(Object_Getter__Handle(this._parent, "open")); 46 } 47 auto open()(string url, string name, string features, bool replace /* = false */) { 48 return recastOpt!(WindowProxy)(Serialize_Object_VarArgCall!(Optional!Handle)(this._parent, "open", "string;string;string;bool", tuple(url, name, features, replace))); 49 } 50 auto open()(string url, string name, string features) { 51 return recastOpt!(WindowProxy)(Serialize_Object_VarArgCall!(Optional!Handle)(this._parent, "open", "string;string;string", tuple(url, name, features))); 52 } 53 void close()() { 54 Object_Call__void(this._parent, "close"); 55 } 56 void write()(string text) { 57 Object_Call_string__void(this._parent, "write", text); 58 } 59 void writeln()(string text) { 60 Object_Call_string__void(this._parent, "writeln", text); 61 } 62 void designMode()(string designMode) { 63 Object_Call_string__void(this._parent, "designMode", designMode); 64 } 65 string designMode()() { 66 return Object_Getter__string(this._parent, "designMode"); 67 } 68 bool execCommand()(string commandId, bool showUI /* = false */, string value /* = "" */) { 69 return Serialize_Object_VarArgCall!bool(this._parent, "execCommand", "string;bool;string", tuple(commandId, showUI, value)); 70 } 71 bool execCommand()(string commandId, bool showUI /* = false */) { 72 return Serialize_Object_VarArgCall!bool(this._parent, "execCommand", "string;bool", tuple(commandId, showUI)); 73 } 74 bool execCommand()(string commandId) { 75 return Object_Call_string__bool(this._parent, "execCommand", commandId); 76 } 77 bool queryCommandEnabled()(string commandId) { 78 return Object_Call_string__bool(this._parent, "queryCommandEnabled", commandId); 79 } 80 bool queryCommandIndeterm()(string commandId) { 81 return Object_Call_string__bool(this._parent, "queryCommandIndeterm", commandId); 82 } 83 bool queryCommandState()(string commandId) { 84 return Object_Call_string__bool(this._parent, "queryCommandState", commandId); 85 } 86 bool queryCommandSupported()(string commandId) { 87 return Object_Call_string__bool(this._parent, "queryCommandSupported", commandId); 88 } 89 string queryCommandValue()(string commandId) { 90 return Object_Call_string__string(this._parent, "queryCommandValue", commandId); 91 } 92 void fgColor()(string fgColor) { 93 Object_Call_string__void(this._parent, "fgColor", fgColor); 94 } 95 string fgColor()() { 96 return Object_Getter__string(this._parent, "fgColor"); 97 } 98 void linkColor()(string linkColor) { 99 Object_Call_string__void(this._parent, "linkColor", linkColor); 100 } 101 string linkColor()() { 102 return Object_Getter__string(this._parent, "linkColor"); 103 } 104 void vlinkColor()(string vlinkColor) { 105 Object_Call_string__void(this._parent, "vlinkColor", vlinkColor); 106 } 107 string vlinkColor()() { 108 return Object_Getter__string(this._parent, "vlinkColor"); 109 } 110 void alinkColor()(string alinkColor) { 111 Object_Call_string__void(this._parent, "alinkColor", alinkColor); 112 } 113 string alinkColor()() { 114 return Object_Getter__string(this._parent, "alinkColor"); 115 } 116 void bgColor()(string bgColor) { 117 Object_Call_string__void(this._parent, "bgColor", bgColor); 118 } 119 string bgColor()() { 120 return Object_Getter__string(this._parent, "bgColor"); 121 } 122 void clear()() { 123 Object_Call__void(this._parent, "clear"); 124 } 125 auto all()() { 126 return HTMLAllCollection(Object_Getter__Handle(this._parent, "all")); 127 } 128 void captureEvents()() { 129 Object_Call__void(this._parent, "captureEvents"); 130 } 131 void releaseEvents()() { 132 Object_Call__void(this._parent, "releaseEvents"); 133 } 134 int blockedNodeByClassifierCount()() { 135 return Object_Getter__int(this._parent, "blockedNodeByClassifierCount"); 136 } 137 auto blockedNodesByClassifier()() { 138 return NodeList(Object_Getter__Handle(this._parent, "blockedNodesByClassifier")); 139 } 140 void userInteractionForTesting()() { 141 Object_Call__void(this._parent, "userInteractionForTesting"); 142 } 143 void setKeyPressEventModel()(ushort aKeyPressEventModel) { 144 Serialize_Object_VarArgCall!void(this._parent, "setKeyPressEventModel", "ushort", tuple(aKeyPressEventModel)); 145 } 146 } 147 148