1 module libwasm.bindings.URL;
2 
3 import libwasm.types;
4 
5 import memutils.ct: tuple;
6 import libwasm.bindings.Blob;
7 import libwasm.bindings.MediaSource;
8 import libwasm.bindings.URLSearchParams;
9 
10 @safe:
11 nothrow:
12 
13 struct URL {
14   nothrow:
15   JsHandle handle;
16   alias handle this;
17   this(Handle h) {
18     this.handle = JsHandle(h);
19   }
20   void href()(string href) {
21     Object_Call_string__void(this.handle, "href", href);
22   }
23   string href()() {
24     return Object_Getter__string(this.handle, "href");
25   }
26   string origin()() {
27     return Object_Getter__string(this.handle, "origin");
28   }
29   void protocol()(string protocol) {
30     Object_Call_string__void(this.handle, "protocol", protocol);
31   }
32   string protocol()() {
33     return Object_Getter__string(this.handle, "protocol");
34   }
35   void username()(string username) {
36     Object_Call_string__void(this.handle, "username", username);
37   }
38   string username()() {
39     return Object_Getter__string(this.handle, "username");
40   }
41   void password()(string password) {
42     Object_Call_string__void(this.handle, "password", password);
43   }
44   string password()() {
45     return Object_Getter__string(this.handle, "password");
46   }
47   void host()(string host) {
48     Object_Call_string__void(this.handle, "host", host);
49   }
50   string host()() {
51     return Object_Getter__string(this.handle, "host");
52   }
53   void hostname()(string hostname) {
54     Object_Call_string__void(this.handle, "hostname", hostname);
55   }
56   string hostname()() {
57     return Object_Getter__string(this.handle, "hostname");
58   }
59   void port()(string port) {
60     Object_Call_string__void(this.handle, "port", port);
61   }
62   string port()() {
63     return Object_Getter__string(this.handle, "port");
64   }
65   void pathname()(string pathname) {
66     Object_Call_string__void(this.handle, "pathname", pathname);
67   }
68   string pathname()() {
69     return Object_Getter__string(this.handle, "pathname");
70   }
71   void search()(string search) {
72     Object_Call_string__void(this.handle, "search", search);
73   }
74   string search()() {
75     return Object_Getter__string(this.handle, "search");
76   }
77   auto searchParams()() {
78     return URLSearchParams(Object_Getter__Handle(this.handle, "searchParams"));
79   }
80   void hash()(string hash) {
81     Object_Call_string__void(this.handle, "hash", hash);
82   }
83   string hash()() {
84     return Object_Getter__string(this.handle, "hash");
85   }
86   string toJSON()() {
87     return Object_Getter__string(this.handle, "toJSON");
88   }
89   string createObjectURL()(scope ref Blob blob) {
90     return Serialize_Object_VarArgCall!string(this.handle, "createObjectURL", "Handle", tuple(cast(Handle)blob.handle));
91   }
92   void revokeObjectURL()(string url) {
93     Object_Call_string__void(this.handle, "revokeObjectURL", url);
94   }
95   bool isValidURL()(string url) {
96     return Object_Call_string__bool(this.handle, "isValidURL", url);
97   }
98   string createObjectURL()(scope ref MediaSource source) {
99     return Serialize_Object_VarArgCall!string(this.handle, "createObjectURL", "Handle", tuple(cast(Handle)source._parent));
100   }
101 }
102 
103