Skip to content

Commit 6dd1b31

Browse files
committed
Prepare 0.1.3 release
1 parent af22685 commit 6dd1b31

File tree

5 files changed

+9
-4
lines changed

5 files changed

+9
-4
lines changed

CHANGELOG

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
iframe-worker-0.1.3 (2020-03-02)
2+
3+
* Fixed polyfill runtime initialization
4+
15
iframe-worker-0.1.2 (2020-03-02)
26

37
* Fixed polyfill missing in package

package-lock.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "iframe-worker",
3-
"version": "0.1.2",
3+
"version": "0.1.3",
44
"description": "A tiny WebWorker polyfill for the file:// protocol",
55
"keywords": [
66
"webworker",

src/polyfill/index.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ import { IFrameWorker } from "../worker"
2828

2929
declare global {
3030
interface Window {
31-
IFrameWorker: IFrameWorker
31+
IFrameWorker: typeof IFrameWorker
3232
}
3333
}
3434

@@ -37,5 +37,6 @@ declare global {
3737
* ------------------------------------------------------------------------- */
3838

3939
/* istanbul ignore next */
40+
window.IFrameWorker = IFrameWorker
4041
if (location.protocol === "file:")
4142
window.Worker = IFrameWorker

src/worker/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,13 +96,13 @@ export class IFrameWorker implements Worker {
9696
<body>
9797
<script>
9898
postMessage = parent.postMessage.bind(parent)
99+
importScripts = ${importScripts.toString()}
99100
addEventListener("error", ev => {
100101
parent.dispatchEvent(new ErrorEvent("error", {
101102
filename: "${this.url}",
102103
error: ev.error
103104
}))
104105
})
105-
${importScripts}
106106
</script>
107107
<script src="${url}"></script>
108108
</body>

0 commit comments

Comments
 (0)