mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 07:47:37 +00:00
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 :^)
This commit is contained in:
parent
8b38df72a3
commit
820e99f97d
11 changed files with 527 additions and 0 deletions
25
Userland/Libraries/LibWeb/HTML/WorkerGlobalScope.idl
Normal file
25
Userland/Libraries/LibWeb/HTML/WorkerGlobalScope.idl
Normal file
|
@ -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);
|
||||
};
|
Loading…
Add table
Add a link
Reference in a new issue