mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-09-11 05:25:32 +03:00
LibWeb: Extract the WindowOrWorkerGlobalScope IDL mixin
`Window` itself isn't generated from an IDL file so it doesn't get to make use of this mixin, but it ideally would do so.
This commit is contained in:
parent
899fa30bdd
commit
b456adcb59
Notes:
sideshowbarker
2024-07-17 08:30:36 +09:00
Author: https://github.com/AtkinsSJ Commit: https://github.com/SerenityOS/serenity/commit/b456adcb59 Pull-request: https://github.com/SerenityOS/serenity/pull/14716 Reviewed-by: https://github.com/kennethmyhra Reviewed-by: https://github.com/linusg
28
Userland/Libraries/LibWeb/HTML/WindowOrWorkerGlobalScope.idl
Normal file
28
Userland/Libraries/LibWeb/HTML/WindowOrWorkerGlobalScope.idl
Normal file
@ -0,0 +1,28 @@
|
||||
// https://html.spec.whatwg.org/multipage/webappapis.html#windoworworkerglobalscope
|
||||
interface mixin WindowOrWorkerGlobalScope {
|
||||
[Replaceable] readonly attribute USVString origin;
|
||||
readonly attribute boolean isSecureContext;
|
||||
readonly attribute boolean crossOriginIsolated;
|
||||
|
||||
// FIXME: undefined reportError(any e);
|
||||
|
||||
// base64 utility methods
|
||||
DOMString btoa(DOMString data);
|
||||
ByteString atob(DOMString data);
|
||||
|
||||
// timers
|
||||
// FIXME: long setTimeout(TimerHandler handler, optional long timeout = 0, any... arguments);
|
||||
// FIXME: undefined clearTimeout(optional long id = 0);
|
||||
// FIXME: long setInterval(TimerHandler handler, optional long timeout = 0, any... arguments);
|
||||
// FIXME: undefined clearInterval(optional long id = 0);
|
||||
|
||||
// microtask queuing
|
||||
// FIXME: undefined queueMicrotask(VoidFunction callback);
|
||||
|
||||
// ImageBitmap
|
||||
// FIXME: Promise<ImageBitmap> createImageBitmap(ImageBitmapSource image, optional ImageBitmapOptions options = {});
|
||||
// FIXME: Promise<ImageBitmap> createImageBitmap(ImageBitmapSource image, long sx, long sy, long sw, long sh, optional ImageBitmapOptions options = {});
|
||||
|
||||
// structured cloning
|
||||
// FIXME: any structuredClone(any value, optional StructuredSerializeOptions options = {});
|
||||
};
|
@ -1,8 +1,10 @@
|
||||
#import <DOM/EventTarget.idl>
|
||||
#import <DOM/EventHandler.idl>
|
||||
#import <HTML/WindowOrWorkerGlobalScope.idl>
|
||||
#import <HTML/WorkerLocation.idl>
|
||||
#import <HTML/WorkerNavigator.idl>
|
||||
|
||||
// https://html.spec.whatwg.org/multipage/workers.html#workerglobalscope
|
||||
[Exposed=Worker]
|
||||
interface WorkerGlobalScope : EventTarget {
|
||||
readonly attribute WorkerGlobalScope self;
|
||||
@ -16,13 +18,6 @@ interface WorkerGlobalScope : EventTarget {
|
||||
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);
|
||||
};
|
||||
|
||||
WorkerGlobalScope includes WindowOrWorkerGlobalScope;
|
||||
|
Loading…
Reference in New Issue
Block a user