resize-iframe 0.1.0 → 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +11 -0
- package/README.md +19 -2
- package/package.json +25 -4
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# resize-iframe
|
|
2
|
+
|
|
3
|
+
## 0.1.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- d9fd60f: Document the third-party embedding flow and cover the library with a Playwright suite.
|
|
8
|
+
|
|
9
|
+
- README: Storage Access API setup for cross-site embeds, including the `allow="storage-access"` and `allow-storage-access-by-user-activation` requirements, and why the request has to come from a click inside the frame.
|
|
10
|
+
- README: note that `sendMessage` is dropped if the frame is still on `about:blank`, so send it after `ready`.
|
|
11
|
+
- 33 specs across Chromium, Firefox and WebKit, served from two origins so they run against real cross-site restrictions rather than same-document shortcuts.
|
package/README.md
CHANGED
|
@@ -175,6 +175,8 @@ turned off for.
|
|
|
175
175
|
Parent, on the handle returned by `iframeResize` (also at `iframe.iframeResizer`):
|
|
176
176
|
|
|
177
177
|
```javascript
|
|
178
|
+
// Wait for ready first: a message posted at a frame still on about:blank is
|
|
179
|
+
// dropped, and nothing retries it.
|
|
178
180
|
frame.sendMessage({ hello: 'world' }, 'https://anotherdomain.com');
|
|
179
181
|
frame.disconnect(); // call before removing the iframe from the page
|
|
180
182
|
```
|
|
@@ -220,10 +222,25 @@ declare module 'react' {
|
|
|
220
222
|
## Testing
|
|
221
223
|
|
|
222
224
|
```bash
|
|
223
|
-
|
|
225
|
+
pnpm install
|
|
226
|
+
pnpm exec playwright install
|
|
227
|
+
pnpm test
|
|
224
228
|
```
|
|
225
229
|
|
|
226
|
-
|
|
230
|
+
33 Playwright specs across Chromium, Firefox and WebKit. The suite serves the
|
|
231
|
+
parent page and the child pages from two different origins — `localhost` and
|
|
232
|
+
`127.0.0.1`, which are cross-*site*, not merely cross-origin — so every test runs
|
|
233
|
+
against the same partitioning and `contentDocument` restrictions as production.
|
|
234
|
+
|
|
235
|
+
## Testing
|
|
236
|
+
|
|
237
|
+
```bash
|
|
238
|
+
pnpm install
|
|
239
|
+
pnpm exec playwright install
|
|
240
|
+
pnpm test
|
|
241
|
+
```
|
|
242
|
+
|
|
243
|
+
21 Playwright specs, run across Chromium, Firefox and WebKit.
|
|
227
244
|
|
|
228
245
|
## Browser Support
|
|
229
246
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "resize-iframe",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.1",
|
|
4
4
|
"description": "Iframes that size themselves to their content, cross-origin included. No build step, no dependencies.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "resize-iframe.js",
|
|
@@ -9,8 +9,13 @@
|
|
|
9
9
|
"files": [
|
|
10
10
|
"resize-iframe.js",
|
|
11
11
|
"resize-iframe-child.js",
|
|
12
|
-
"resize-iframe.d.ts"
|
|
12
|
+
"resize-iframe.d.ts",
|
|
13
|
+
"CHANGELOG.md"
|
|
13
14
|
],
|
|
15
|
+
"publishConfig": {
|
|
16
|
+
"access": "public",
|
|
17
|
+
"provenance": true
|
|
18
|
+
},
|
|
14
19
|
"keywords": [
|
|
15
20
|
"iframe",
|
|
16
21
|
"iframe-resizer",
|
|
@@ -23,8 +28,24 @@
|
|
|
23
28
|
],
|
|
24
29
|
"repository": {
|
|
25
30
|
"type": "git",
|
|
26
|
-
"url": "https://github.com/jagreehal/resize-iframe"
|
|
31
|
+
"url": "git+https://github.com/jagreehal/resize-iframe.git"
|
|
27
32
|
},
|
|
33
|
+
"homepage": "https://github.com/jagreehal/resize-iframe#readme",
|
|
34
|
+
"bugs": "https://github.com/jagreehal/resize-iframe/issues",
|
|
28
35
|
"author": "Jag Reehal <jag@jagreehal.com>",
|
|
29
|
-
"license": "MIT"
|
|
36
|
+
"license": "MIT",
|
|
37
|
+
"devDependencies": {
|
|
38
|
+
"@changesets/cli": "2.31.0",
|
|
39
|
+
"@playwright/test": "1.60.0",
|
|
40
|
+
"serve": "14.2.6",
|
|
41
|
+
"typescript": "6.0.3"
|
|
42
|
+
},
|
|
43
|
+
"scripts": {
|
|
44
|
+
"test": "playwright test",
|
|
45
|
+
"test:ui": "playwright test --ui",
|
|
46
|
+
"typecheck": "tsc --noEmit --strict --lib es2022,dom resize-iframe.d.ts",
|
|
47
|
+
"changeset": "changeset",
|
|
48
|
+
"version-packages": "changeset version",
|
|
49
|
+
"release": "changeset publish"
|
|
50
|
+
}
|
|
30
51
|
}
|