1 module libwasm.bindings.XSLTProcessor; 2 3 import libwasm.types; 4 5 import memutils.ct: tuple; 6 import libwasm.bindings.Document; 7 import libwasm.bindings.DocumentFragment; 8 import libwasm.bindings.Node; 9 10 @safe: 11 nothrow: 12 13 struct XSLTProcessor { 14 nothrow: 15 JsHandle handle; 16 alias handle this; 17 this(Handle h) { 18 this.handle = JsHandle(h); 19 } 20 void importStylesheet()(scope ref Node style) { 21 Object_Call_Handle__void(this.handle, "importStylesheet", style._parent); 22 } 23 auto transformToFragment()(scope ref Node source, scope ref Document output) { 24 return DocumentFragment(Serialize_Object_VarArgCall!Handle(this.handle, "transformToFragment", "Handle;Handle", tuple(cast(Handle)source._parent, cast(Handle)output._parent))); 25 } 26 auto transformToDocument()(scope ref Node source) { 27 return Document(Object_Call_Handle__Handle(this.handle, "transformToDocument", source._parent)); 28 } 29 void setParameter(T2)(string namespaceURI, string localName, scope auto ref T2 value) { 30 // Any 31 Handle _handle_value = getOrCreateHandle(value); 32 Serialize_Object_VarArgCall!void(this.handle, "setParameter", "string;string;Handle", tuple(namespaceURI, localName, _handle_value)); 33 dropHandle!(T2)(_handle_value); 34 } 35 auto getParameter()(string namespaceURI, string localName) { 36 return recastOpt!(nsIVariant)(Serialize_Object_VarArgCall!(Optional!Handle)(this.handle, "getParameter", "string;string", tuple(namespaceURI, localName))); 37 } 38 void removeParameter()(string namespaceURI, string localName) { 39 Object_Call_string_string__void(this.handle, "removeParameter", namespaceURI, localName); 40 } 41 void clearParameters()() { 42 Object_Call__void(this.handle, "clearParameters"); 43 } 44 void reset()() { 45 Object_Call__void(this.handle, "reset"); 46 } 47 enum uint DISABLE_ALL_LOADS = 1; 48 void flags()(uint flags) { 49 Object_Call_uint__void(this.handle, "flags", flags); 50 } 51 uint flags()() { 52 return Object_Getter__uint(this.handle, "flags"); 53 } 54 } 55 56