From 0aa4466ce9cde72df8140c647a2d3ea58b01731a Mon Sep 17 00:00:00 2001 From: Timothy Flynn Date: Tue, 14 Mar 2023 07:28:08 -0400 Subject: LibWeb: Port {set,clear}{Timeout,Interval} to IDL --- Userland/Libraries/LibWeb/HTML/WindowOrWorkerGlobalScope.idl | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'Userland/Libraries/LibWeb/HTML/WindowOrWorkerGlobalScope.idl') diff --git a/Userland/Libraries/LibWeb/HTML/WindowOrWorkerGlobalScope.idl b/Userland/Libraries/LibWeb/HTML/WindowOrWorkerGlobalScope.idl index dc734395af..fda12c65dd 100644 --- a/Userland/Libraries/LibWeb/HTML/WindowOrWorkerGlobalScope.idl +++ b/Userland/Libraries/LibWeb/HTML/WindowOrWorkerGlobalScope.idl @@ -5,6 +5,9 @@ // FIXME: Support VoidFunction in the IDL parser callback VoidFunction = undefined (); +// https://html.spec.whatwg.org/#timerhandler +typedef (DOMString or Function) TimerHandler; + // https://html.spec.whatwg.org/multipage/webappapis.html#windoworworkerglobalscope interface mixin WindowOrWorkerGlobalScope { [Replaceable] readonly attribute USVString origin; @@ -18,10 +21,10 @@ interface mixin WindowOrWorkerGlobalScope { 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); + long setTimeout(TimerHandler handler, optional long timeout = 0, any... arguments); + undefined clearTimeout(optional long id = 0); + long setInterval(TimerHandler handler, optional long timeout = 0, any... arguments); + undefined clearInterval(optional long id = 0); // microtask queuing undefined queueMicrotask(VoidFunction callback); -- cgit v1.2.3