Skip to content

thiagomdo1/framev

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

41 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Framev

Send and receive data across iframes.

npm version

Installation

npm i framev

Usage

Import Framev:

import { Framev } from "framev";

Or add it via script tag:

<script src="framev.js"></script>

Emitting an event:

const framev = new Framev();
framev.emit("helloworld", "Hello world");

// sending objects
framev.emit("helloworld2", { message: "Hello world" });

Receiving an event:

const framev = new Framev();
framev.on("helloworld", (message) => {
  console.log(message);
});

To remove a subscription:

framev.off("helloworld");

About

Send and receive data across iframes

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published