Security News
New axobject-query Maintainer Faces Backlash Over Controversial Decision to Support Legacy Node.js Versions
A JavaScript library maintainer is under fire after merging a controversial PR to support legacy versions of Node.js.
iframe-rpc-util
Advanced tools
Readme
RPC between cross-origin iframe using postMessage
$ npm install iframe-rpc-util
$ yarn add iframe-rpc-util
$ pnpm install iframe-rpc-util
<iframe src="xx" id="iframeNode"></iframe>
import iframeRpc from 'iframe-rpc-util'
// init rpc instance
const iframeProxy = iframeRpc('iframeNode')
// iframe init event
iframeProxy.onInit = (data) => {
// get rpc register function
iframeProxy.getKeys().then((data) => {
console.log('parent getKeys', data)
})
// call children function
iframeProxy.childrenFunc('parent params').then((data) => {
console.log('parent', data)
})
}
// register function
iframeProxy.parentFunc = (data) => {
// return remote data
return 'parent function'
}
import iframeRpc from 'iframe-rpc-util'
const iframeProxy = iframeRpc()
// register function
iframeProxy.childrenFunc = (data) => {
// return remote data
return 'children function'
}
iframeProxy.parentFunc('children params').then((data) => {
console.log('children', data)
})
FAQs
RPC between cross-origin iframe using postMessage
The npm package iframe-rpc-util receives a total of 5 weekly downloads. As such, iframe-rpc-util popularity was classified as not popular.
We found that iframe-rpc-util demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
A JavaScript library maintainer is under fire after merging a controversial PR to support legacy versions of Node.js.
Security News
Results from the 2023 State of JavaScript Survey highlight key trends, including Vite's dominance, rising TypeScript adoption, and the enduring popularity of React. Discover more insights on developer preferences and technology usage.
Security News
The US Justice Department has penalized two consulting firms $11.3 million for failing to meet cybersecurity requirements on federally funded projects, emphasizing strict enforcement to protect sensitive government data.