@playruo/embed 1.3.0 → 1.3.2
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/README.md +9 -0
- package/dist/index.cjs +1354 -371
- package/dist/index.d.cts +22 -2
- package/dist/index.d.ts +22 -2
- package/dist/index.js +1354 -371
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,3 +1,12 @@
|
|
|
1
1
|
# @playruo/embed
|
|
2
2
|
|
|
3
3
|
React SDK to embed Playruo via iframe + postMessage.
|
|
4
|
+
|
|
5
|
+
## Event forwarding
|
|
6
|
+
|
|
7
|
+
When the embedded Playruo iframe sends `{ type: "playruo_event", data }`, the
|
|
8
|
+
React package forwards the payload through `onEvent(data)`.
|
|
9
|
+
|
|
10
|
+
If the package host is itself inside another iframe, the same message is also
|
|
11
|
+
forwarded one level up with `window.parent.postMessage({ type:
|
|
12
|
+
"playruo_event", data }, "*")`.
|