-
Notifications
You must be signed in to change notification settings - Fork 204
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove deprecated uses of window.postMessage
#3649
Conversation
Codecov Report
@@ Coverage Diff @@
## master #3649 +/- ##
==========================================
+ Coverage 98.67% 98.89% +0.21%
==========================================
Files 210 210
Lines 7716 7671 -45
Branches 1744 1731 -13
==========================================
- Hits 7614 7586 -28
+ Misses 102 85 -17
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Added a minor note about the RPC class documentation. It might be a good idea as a follow-up to rename the RPC
and frame-rpc
classes to reflect the fact that they now use MessagePort (PortRPC
for the class name and port-rpc.js
for the module name?).
@@ -59,42 +59,15 @@ const PROTOCOL = 'frame-rpc'; | |||
*/ | |||
export class RPC { | |||
/** | |||
* Create an RPC client for sending RPC requests from `sourceFrame` to | |||
* `destFrame`, and receiving RPC responses from `destFrame` to `sourceFrame`. | |||
* Create an RPC client for sending and receiving RPC message using a |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The class documentation could use an update as well. eg.
RPC provides remote procedure calls between frames.
It uses the Channel Messaging API [1] for inter-frame communication.
[1] https://developer.mozilla.org/en-US/docs/Web/API/Channel_Messaging_API
After #3611 there is no more need to support `window.postMessage` on `RPC` and `Bridge` classes.
c63ee46
to
2e65209
Compare
I updated the class documentation. |
The `methods` argument constructor could be an object that uses `this`. However, we do not rely in this feature, so I am suggesting to simplify the execution of the callbacks.
After #3611 there is no need to support
window.postMessage
onRPC
andBridge
classes.