1 module libwasm.bindings.CSPReport; 2 3 import libwasm.types; 4 5 import memutils.ct: tuple; 6 @safe: 7 nothrow: 8 9 struct CSPReport { 10 nothrow: 11 JsHandle handle; 12 alias handle this; 13 this(Handle h) { 14 this.handle = JsHandle(h); 15 } 16 static auto create() { 17 return CSPReport(libwasm_add__object()); 18 } 19 void csp_report()(scope ref CSPReportProperties csp_report) { 20 Object_Call_Handle__void(this.handle, "csp-report", csp_report.handle); 21 } 22 auto csp_report()() { 23 return CSPReportProperties(Object_Getter__Handle(this.handle, "csp-report")); 24 } 25 } 26 struct CSPReportProperties { 27 nothrow: 28 JsHandle handle; 29 alias handle this; 30 this(Handle h) { 31 this.handle = JsHandle(h); 32 } 33 static auto create() { 34 return CSPReportProperties(libwasm_add__object()); 35 } 36 void document_uri()(string document_uri) { 37 Object_Call_string__void(this.handle, "document-uri", document_uri); 38 } 39 string document_uri()() { 40 return Object_Getter__string(this.handle, "document-uri"); 41 } 42 void referrer()(string referrer) { 43 Object_Call_string__void(this.handle, "referrer", referrer); 44 } 45 string referrer()() { 46 return Object_Getter__string(this.handle, "referrer"); 47 } 48 void blocked_uri()(string blocked_uri) { 49 Object_Call_string__void(this.handle, "blocked-uri", blocked_uri); 50 } 51 string blocked_uri()() { 52 return Object_Getter__string(this.handle, "blocked-uri"); 53 } 54 void violated_directive()(string violated_directive) { 55 Object_Call_string__void(this.handle, "violated-directive", violated_directive); 56 } 57 string violated_directive()() { 58 return Object_Getter__string(this.handle, "violated-directive"); 59 } 60 void original_policy()(string original_policy) { 61 Object_Call_string__void(this.handle, "original-policy", original_policy); 62 } 63 string original_policy()() { 64 return Object_Getter__string(this.handle, "original-policy"); 65 } 66 void source_file()(string source_file) { 67 Object_Call_string__void(this.handle, "source-file", source_file); 68 } 69 string source_file()() { 70 return Object_Getter__string(this.handle, "source-file"); 71 } 72 void script_sample()(string script_sample) { 73 Object_Call_string__void(this.handle, "script-sample", script_sample); 74 } 75 string script_sample()() { 76 return Object_Getter__string(this.handle, "script-sample"); 77 } 78 void line_number()(int line_number) { 79 Object_Call_int__void(this.handle, "line-number", line_number); 80 } 81 int line_number()() { 82 return Object_Getter__int(this.handle, "line-number"); 83 } 84 void column_number()(int column_number) { 85 Object_Call_int__void(this.handle, "column-number", column_number); 86 } 87 int column_number()() { 88 return Object_Getter__int(this.handle, "column-number"); 89 } 90 } 91 92