summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibWeb/HTML/WorkerGlobalScope.idl
diff options
context:
space:
mode:
authorAndrew Kaster <akaster@serenityos.org>2022-02-06 19:12:57 -0700
committerAndreas Kling <kling@serenityos.org>2022-02-09 17:21:05 +0100
commit820e99f97d4ad6de697a89838086f50be9c38661 (patch)
tree07d0ae1e1746ede70f086df78e2f1c36186e07fd /Userland/Libraries/LibWeb/HTML/WorkerGlobalScope.idl
parent8b38df72a32d9052c003c706bc95ff40794c50be (diff)
downloadserenity-820e99f97d4ad6de697a89838086f50be9c38661.zip
LibWeb: Add initial implementation for WorkerGlobalScope
This initial implementation stubs out the WorkerGlobalScope, WorkerLocation and WorkerNavigator classes. It doesn't take into account all the things that actually need passed into the constructors for these objects, nor the extra abstract operations that need to be performed on them by the rest of the Browser infrastructure. However, it does create bindings that compile and link :^)
Diffstat (limited to 'Userland/Libraries/LibWeb/HTML/WorkerGlobalScope.idl')
-rw-r--r--Userland/Libraries/LibWeb/HTML/WorkerGlobalScope.idl25
1 files changed, 25 insertions, 0 deletions
diff --git a/Userland/Libraries/LibWeb/HTML/WorkerGlobalScope.idl b/Userland/Libraries/LibWeb/HTML/WorkerGlobalScope.idl
new file mode 100644
index 0000000000..d827dc315a
--- /dev/null
+++ b/Userland/Libraries/LibWeb/HTML/WorkerGlobalScope.idl
@@ -0,0 +1,25 @@
+[Exposed=Worker]
+interface WorkerGlobalScope : EventTarget {
+ readonly attribute WorkerGlobalScope self;
+ readonly attribute WorkerLocation location;
+ readonly attribute WorkerNavigator navigator;
+ undefined importScripts(USVString... urls);
+
+ // FIXME: Should be an OnErrorEventHandler
+ attribute EventHandler onerror;
+
+ attribute EventHandler onlanguagechange;
+ attribute EventHandler onoffline;
+ attribute EventHandler ononline;
+ attribute EventHandler onrejectionhandled;
+ attribute EventHandler onunhandledrejection;
+
+ // FIXME: These should all come from a WindowOrWorkerGlobalScope mixin
+ [Replaceable] readonly attribute USVString origin;
+ readonly attribute boolean isSecureContext;
+ readonly attribute boolean crossOriginIsolated;
+
+ // base64 utility methods
+ DOMString btoa(DOMString data);
+ ByteString atob(DOMString data);
+};