From 2e8080d24bf2d91103e05e1f9b1dd75f7deb2ba1 Mon Sep 17 00:00:00 2001 From: Maxime Mangel Date: Fri, 20 Sep 2024 15:36:45 +0200 Subject: [PATCH] Add register with `URL` overload to `ServiceWorkerContainer` Fix #141 --- src/Worker/Browser.Worker.fs | 1 + src/Worker/Browser.Worker.fsproj | 5 +++-- src/Worker/RELEASE_NOTES.md | 4 ++++ 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/src/Worker/Browser.Worker.fs b/src/Worker/Browser.Worker.fs index da0650b..feac99d 100644 --- a/src/Worker/Browser.Worker.fs +++ b/src/Worker/Browser.Worker.fs @@ -73,6 +73,7 @@ type [] ServiceWorkerContainer = abstract onerror: (Event -> unit) with get, set abstract onmessage: (Event -> unit) with get, set abstract register: url: string * ?options: ServiceWorkerRegistrationOptions -> JS.Promise + abstract register: url: URL * ?options: ServiceWorkerRegistrationOptions -> JS.Promise abstract getRegistration: ?scope: string -> JS.Promise abstract getRegistrations: unit -> JS.Promise abstract startMessages: unit -> unit diff --git a/src/Worker/Browser.Worker.fsproj b/src/Worker/Browser.Worker.fsproj index 22327da..50ca659 100644 --- a/src/Worker/Browser.Worker.fsproj +++ b/src/Worker/Browser.Worker.fsproj @@ -2,8 +2,8 @@ Fable.Browser.Worker - 1.3.0 - 1.3.0 + 1.4.0 + 1.4.0 netstandard2.0 true fable;fable-binding;fable-javascript @@ -16,6 +16,7 @@ + diff --git a/src/Worker/RELEASE_NOTES.md b/src/Worker/RELEASE_NOTES.md index 29492cc..5de8bb9 100644 --- a/src/Worker/RELEASE_NOTES.md +++ b/src/Worker/RELEASE_NOTES.md @@ -1,3 +1,7 @@ +### 1.4.0 + +* Add `abstract register: url: URL * ?options: ServiceWorkerRegistrationOptions -> JS.Promise` overload to `ServiceWorkerContainer` (by @MangelMaxime) + ### 1.3.0 * Align Fable.Core version to 3.2.8 for all of fable-browser packages