
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
web-tab-transponder
Advanced tools
web-tab-transponder is a browser tab(or iframe) communication tool, which is built with localStorage.Using NPM (or YARN) tool to install, or import directly with <script> tag.
// npm / yarn
npm install web-tab-transponder
// or
yarn add web-tab-transponder
// es6 module
import Transponder from "web-tab-transponder"
// commonjs module
const Transponder = require("web-tab-transponder")
<!-- Offline: -->
<script type="text/javascript" src="*/**/build/transponder.js"></script>
<!-- Online: -->
<script type="text/javascript" src="https://unpkg.com/web-tab-transponder"></script>
<script type="text/javascript">
// use Transponder as global variable
const Transponder = window.Transponder
</script>
<!-- for IE8 -->
<!-- you must enable "DOM storage" in IE8, see: https://askinglot.com/how-do-i-enable-dom-storage-in-internet-explorer -->
<script type="text/javascript" src="https://unpkg.com/web-tab-transponder/build/transponder-IE.js"></script>
<script type="text/javascript">
// use Transponder as global variable
var Transponder = window.Transponder
</script>
// in page "parent"
import Transponder from "web-tab-transponder"
const parentPage = new Transponder('parent').onMessage((e) => {
console.log('parent received data: ', e)
})
// send data to page "child", data is "I am parent"
parentPage.send('I am parent', ['child'])
// or send data to other page, each page of domain (except self) will receive data 'I am parent'
parentPage.send('I am parent')
// in page "child"
import Transponder from "web-tab-transponder"
const childPage = new Transponder('child').onMessage((e) => {
console.log('child received data: ', e)
})
// send data to page "parent", data is "I am child"
childPage.send('I am child', ['parent'])
// or send data to other page, each page of domain (except self) will receive data 'I am child'
childPage.send('I am child')
| params | required | e.g. |
|---|---|---|
| id: String | true | to build a instance of Transponder: const transponder = new Transponder('id'), if you want to build multiple instance, please use different id! |
| method | param | desc | e.g. |
|---|---|---|---|
| send | send(data: any, toId?: String[] | String): Transponder | send data to other page(or iframe), param toId is a string[] or string, which has used in other transponder, toId is optional, default will send data to each page (except self) of domain. | transponder.send(any, ['parent']); transponder.send(any, 'child'); transponder.send(any) |
| onMessage | onMessage(callback?: Function): Transponder | callback of data receiving, param is ({ data, from }) | transponder.onMessage(({ data, from }) => { console.log('parent received data: ', { data, from }) } |
| destory | destory(): void | destory the instance of Transponder | transponder.destroy() |
e.from is: { href, pathname, hostname, port, protocol, hash, search, pagetype, id }, href, pathname, hostname, port, protocol, hash, search is parent page's location deconstruction, pagetype is 'page' or 'iframe', id is parent page's id.FAQs
web-tab-transponder
We found that web-tab-transponder demonstrated a not healthy version release cadence and project activity because the last version was released 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
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.