Skip to content

Commit 889c141

Browse files
committed
chore: publish v0.7.1
1 parent 1b7a04e commit 889c141

File tree

3 files changed

+20
-13
lines changed

3 files changed

+20
-13
lines changed

README.md

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -66,21 +66,25 @@ export { obj, fn };
6666
## Compatibility
6767
|IE|Edge|Firefox|Chrome|Safari|Opera|
6868
|:-:|:-:|:-:|:-:|:-:|:-:|
69-
|10<sup>[1][2][3]</sup>|12<sup>[1][2][3]</sup>|19<sup>[1][2][3]</sup>|19<sup>[1][2][3]</sup>|6<sup>[1][2][3]</sup>|15<sup>[1][2][3]</sup>|
70-
||14|29<sup>[1][3]</sup>|32<sup>[1][3]</sup>|8<sup>[3]</sup>|19<sup>[1][3]</sup>|
71-
|||41|49|10.1|36|
69+
|10<sup>[1][2][3]</sup>|12<sup>[1][2][3]</sup>|4<sup>[1][2][3][4]</sup>|13<sup>[1][2][3][4]</sup>|6<sup>[1][2][3]</sup>|12.1<sup>[1][2][3][4]</sup>|
70+
||14|19<sup>[1][2][3]</sup>|19<sup>[1][2][3]</sup>|8<sup>[3]</sup>|15<sup>[1][2][3]</sup>|
71+
|||29<sup>[1][3]</sup>|32<sup>[1][3]</sup>|10.1|19<sup>[1][3]</sup>|
72+
|||41|49||36|
7273

7374
> Notes:
7475
> 1. Don't support destructuring assignment in ESM statement;
7576
> 1. Need `Promise` polyfill in ShadowRealm;
7677
> 1. Need `fetch` polyfill in top window;
78+
> 1. Need `URL` polyfill in top window;
7779
78-
Use fetch polyfill:
80+
Use `fetch` or `URL` polyfill:
7981
```js
80-
import "your fetch polyfill";
82+
import "fetch polyfill";
83+
import "URL polyfill";
84+
import "shadowrealm-api/browser/polyfill.mjs";
8185
// Your codes
8286
```
83-
Use Promise polyfill:
87+
Use `Promise` polyfill:
8488
```js
8589
ShadowRealm.__shims = [
8690
'path/to/promise-polyfill.js',

README.zh-CN.md

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -67,18 +67,22 @@ export { obj, fn };
6767
## 兼容性
6868
|IE|Edge|Firefox|Chrome|Safari|Opera|
6969
|:-:|:-:|:-:|:-:|:-:|:-:|
70-
|10<sup>[1][2][3]</sup>|12<sup>[1][2][3]</sup>|19<sup>[1][2][3]</sup>|19<sup>[1][2][3]</sup>|6<sup>[1][2][3]</sup>|15<sup>[1][2][3]</sup>|
71-
||14|29<sup>[1][3]</sup>|32<sup>[1][3]</sup>|8<sup>[3]</sup>|19<sup>[1][3]</sup>|
72-
|||41|49|10.1|36|
70+
|10<sup>[1][2][3]</sup>|12<sup>[1][2][3]</sup>|4<sup>[1][2][3][4]</sup>|13<sup>[1][2][3][4]</sup>|6<sup>[1][2][3]</sup>|12.1<sup>[1][2][3][4]</sup>|
71+
||14|19<sup>[1][2][3]</sup>|19<sup>[1][2][3]</sup>|8<sup>[3]</sup>|15<sup>[1][2][3]</sup>|
72+
|||29<sup>[1][3]</sup>|32<sup>[1][3]</sup>|10.1|19<sup>[1][3]</sup>|
73+
|||41|49||36|
7374

7475
> Notes:
7576
> 1. ESM 语句不支持解构赋值;
7677
> 1. ShadowRealm 中需要`Promise`垫片;
7778
> 1. 顶层作用域需要`fetch`垫片;
79+
> 1. 顶层作用域需要`URL`垫片;
7880
79-
使用 fetch 垫片:
81+
使用 fetch 或 URL 垫片:
8082
```js
81-
import "your fetch polyfill";
83+
import "fetch polyfill";
84+
import "URL polyfill";
85+
import "shadowrealm-api/browser/polyfill.mjs";
8286
// Your codes
8387
```
8488
使用 Promise 垫片:

package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "shadowrealm-api",
3-
"version": "0.7.0",
3+
"version": "0.7.1",
44
"description": "ShadowRealm polyfill for browser",
55
"author": {
66
"name": "Ambit Tsai",
@@ -39,7 +39,6 @@
3939
"realm",
4040
"realms",
4141
"sandbox",
42-
"api",
4342
"polyfill",
4443
"ponyfill",
4544
"shim",

0 commit comments

Comments
 (0)