diff --git a/Changes.md b/Changes.md index 0f8263ddf..904dc0c6e 100644 --- a/Changes.md +++ b/Changes.md @@ -7,6 +7,8 @@ Unreleased ([#1137](https://github.com/melange-re/melange/pull/1137)) - support `[@mel.*]` attributes in uncurried externals ([#1140](https://github.com/melange-re/melange/pull/1140)) +- add Worker types to `melange.dom` + ([#1147](https://github.com/melange-re/melange/pull/1147)) 4.0.1 2024-06-07 --------------- diff --git a/jscomp/others/dom.ml b/jscomp/others/dom.ml index 229359652..ab1f6b0b6 100644 --- a/jscomp/others/dom.ml +++ b/jscomp/others/dom.ml @@ -21,13 +21,21 @@ type serviceWorker = _serviceWorker eventTarget_like type _worker type worker = _worker eventTarget_like type 'a _workerGlobalScope -type workerGlobalScope = _baseClass 'a _workerGlobalScope eventTarget_like +type workerGlobalScope = _baseClass _workerGlobalScope eventTarget_like type _dedicatedWorkerGlobalScope -type dedicatedWorkerGlobalScope = _dedicatedWorkerGlobalScope 'a _workerGlobalScope eventTarget_like + +type dedicatedWorkerGlobalScope = + _dedicatedWorkerGlobalScope _workerGlobalScope eventTarget_like + type _serviceWorkerGlobalScope -type serviceWorkerGlobalScope = _serviceWorkerGlobalScope 'a _workerGlobalScope eventTarget_like + +type serviceWorkerGlobalScope = + _serviceWorkerGlobalScope _workerGlobalScope eventTarget_like + type _sharedWorkerGlobalScope -type sharedWorkerGlobalScope = _sharedWorkerGlobalScope 'a _workerGlobalScope eventTarget_like + +type sharedWorkerGlobalScope = + _sharedWorkerGlobalScope _workerGlobalScope eventTarget_like (* nodes *) type 'a _node