Modernize RPC client/server class.
Modernize the `RPC` class in `src/shared/frame-rpc` that serves as both the client and server for RPC requests between frames. This code was originally imported from https://github.com/substack/frame-rpc but now that we've adopted it, it makes sense to modernize it to match the conventions and requirements of the rest of our code. - Convert `frame-rpc.js` to modern syntax - Update JSDoc documentation for methods and class - Convert `RPC` class to a named rather than default export - Inline the `apply` method into the `call` method, since only `call` was used externally - Remove unused option for `methods` constructor argument to be a function - Rename `src` and `dest` public fields to the more explicit `sourceFrame` and `destFrame`
Showing
Please register or sign in to comment