From 5719ac52fa4b17a1c197985d96c07ba1650c7402 Mon Sep 17 00:00:00 2001 From: Tony Fettes Date: Sun, 16 Jun 2024 22:12:27 +0800 Subject: [PATCH 1/4] feat: add worker related doms --- jscomp/others/dom.ml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/jscomp/others/dom.ml b/jscomp/others/dom.ml index 85f9b30eb..401a080f1 100644 --- a/jscomp/others/dom.ml +++ b/jscomp/others/dom.ml @@ -14,6 +14,12 @@ type cssStyleSheet (* events (early) *) type 'a eventTarget_like type eventTarget = _baseClass eventTarget_like +type _messagePort +type messagePort = _messagePort eventTarget_like +type _serviceWorker +type serviceWorker = _serviceWorker eventTarget_like +type _worker +type worker = _worker eventTarget_like (* nodes *) type 'a _node @@ -203,6 +209,7 @@ type _htmlVideoElement type htmlVideoElement = _htmlVideoElement htmlElement_like type location type window +type windowProxy type _xmlDocument type xmlDocument = _xmlDocument document_like @@ -236,6 +243,8 @@ type _inputEvent type inputEvent = _inputEvent uiEvent_like type _keyboardEvent type keyboardEvent = _keyboardEvent uiEvent_like +type _messageEvent +type messageEvent = _messageEvent event_like type 'a _mouseEvent type 'a mouseEvent_like = 'a _mouseEvent uiEvent_like type mouseEvent = _baseClass mouseEvent_like @@ -291,5 +300,6 @@ type svgPoint (* special *) type eventPointerId +type messageChannel module Storage = Dom_storage From 5fad45ed01c256bb91dff027754d7e94fa58611b Mon Sep 17 00:00:00 2001 From: Tony Fettes Date: Mon, 15 Jul 2024 01:46:09 +0800 Subject: [PATCH 2/4] add WorkerGlobalScopes --- jscomp/others/dom.ml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/jscomp/others/dom.ml b/jscomp/others/dom.ml index 401a080f1..d6c78a23d 100644 --- a/jscomp/others/dom.ml +++ b/jscomp/others/dom.ml @@ -20,6 +20,15 @@ type _serviceWorker type serviceWorker = _serviceWorker eventTarget_like type _worker type worker = _worker eventTarget_like +type 'a _workerGlobalScope +type 'a workerGlobalScope_like = 'a _workerGlobalScope eventTarget_like +type workerGlobalScope = _baseClass workerGlobalScope_like +type _dedicatedWorkerGlobalScope +type dedicatedWorkerGlobalScope = _dedicatedWorkerGlobalScope workerGlobalScope_like +type _serviceWorkerGlobalScope +type serviceWorkerGlobalScope = _serviceWorkerGlobalScope workerGlobalScope_like +type _sharedWorkerGlobalScope +type sharedWorkerGlobalScope = _sharedWorkerGlobalScope workerGlobalScope_like (* nodes *) type 'a _node From 87fa74e01fbf644e3acbc5d60c18e2775350d82c Mon Sep 17 00:00:00 2001 From: Tony Fettes Date: Tue, 6 Aug 2024 00:37:10 +0800 Subject: [PATCH 3/4] fix: remove windowProxy --- jscomp/others/dom.ml | 1 - 1 file changed, 1 deletion(-) diff --git a/jscomp/others/dom.ml b/jscomp/others/dom.ml index d6c78a23d..3ad9f016d 100644 --- a/jscomp/others/dom.ml +++ b/jscomp/others/dom.ml @@ -218,7 +218,6 @@ type _htmlVideoElement type htmlVideoElement = _htmlVideoElement htmlElement_like type location type window -type windowProxy type _xmlDocument type xmlDocument = _xmlDocument document_like From 62f307f7b463c2da12d32166126105d6272dff13 Mon Sep 17 00:00:00 2001 From: Antonio Nuno Monteiro Date: Sat, 10 Aug 2024 19:12:34 -0700 Subject: [PATCH 4/4] Update jscomp/others/dom.ml --- jscomp/others/dom.ml | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/jscomp/others/dom.ml b/jscomp/others/dom.ml index 3ad9f016d..229359652 100644 --- a/jscomp/others/dom.ml +++ b/jscomp/others/dom.ml @@ -21,14 +21,13 @@ type serviceWorker = _serviceWorker eventTarget_like type _worker type worker = _worker eventTarget_like type 'a _workerGlobalScope -type 'a workerGlobalScope_like = 'a _workerGlobalScope eventTarget_like -type workerGlobalScope = _baseClass workerGlobalScope_like +type workerGlobalScope = _baseClass 'a _workerGlobalScope eventTarget_like type _dedicatedWorkerGlobalScope -type dedicatedWorkerGlobalScope = _dedicatedWorkerGlobalScope workerGlobalScope_like +type dedicatedWorkerGlobalScope = _dedicatedWorkerGlobalScope 'a _workerGlobalScope eventTarget_like type _serviceWorkerGlobalScope -type serviceWorkerGlobalScope = _serviceWorkerGlobalScope workerGlobalScope_like +type serviceWorkerGlobalScope = _serviceWorkerGlobalScope 'a _workerGlobalScope eventTarget_like type _sharedWorkerGlobalScope -type sharedWorkerGlobalScope = _sharedWorkerGlobalScope workerGlobalScope_like +type sharedWorkerGlobalScope = _sharedWorkerGlobalScope 'a _workerGlobalScope eventTarget_like (* nodes *) type 'a _node