Skip to content

Commit

Permalink
Add register with URL overload to ServiceWorkerContainer
Browse files Browse the repository at this point in the history
Fix #141
  • Loading branch information
MangelMaxime committed Sep 20, 2024
1 parent 8300b75 commit 2e8080d
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
1 change: 1 addition & 0 deletions src/Worker/Browser.Worker.fs
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ type [<Global>] ServiceWorkerContainer =
abstract onerror: (Event -> unit) with get, set
abstract onmessage: (Event -> unit) with get, set
abstract register: url: string * ?options: ServiceWorkerRegistrationOptions -> JS.Promise<ServiceWorkerRegistration>
abstract register: url: URL * ?options: ServiceWorkerRegistrationOptions -> JS.Promise<ServiceWorkerRegistration>
abstract getRegistration: ?scope: string -> JS.Promise<ServiceWorkerRegistration>
abstract getRegistrations: unit -> JS.Promise<ServiceWorkerRegistration[]>
abstract startMessages: unit -> unit
Expand Down
5 changes: 3 additions & 2 deletions src/Worker/Browser.Worker.fsproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<PackageId>Fable.Browser.Worker</PackageId>
<Version>1.3.0</Version>
<PackageVersion>1.3.0</PackageVersion>
<Version>1.4.0</Version>
<PackageVersion>1.4.0</PackageVersion>
<TargetFramework>netstandard2.0</TargetFramework>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<Tags>fable;fable-binding;fable-javascript</Tags>
Expand All @@ -16,6 +16,7 @@
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Event\Browser.Event.fsproj" />
<ProjectReference Include="..\Url\Browser.Url.fsproj" />
</ItemGroup>
<!-- This package doesn't contain actual code
so we don't need to add the sources -->
Expand Down
4 changes: 4 additions & 0 deletions src/Worker/RELEASE_NOTES.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
### 1.4.0

* Add `abstract register: url: URL * ?options: ServiceWorkerRegistrationOptions -> JS.Promise<ServiceWorkerRegistration>` overload to `ServiceWorkerContainer` (by @MangelMaxime)

### 1.3.0

* Align Fable.Core version to 3.2.8 for all of fable-browser packages
Expand Down

0 comments on commit 2e8080d

Please sign in to comment.