Changelog
5.0.0
Allow scoping to a specific channel for events
var bus = new Framebus({
channel: "some-unique-identifier-used-on-both-the-parent-and-child-pages",
});
Add verifyDomain
config to scope messages to specific domains
var bus = new Framebus({
verifyDomain: function (url) {
// only listens for events emitted from `https://parent-url.example.com` and `https://my-domain.example.com`
return url.indexOf("https://my-domain.example.com");
},
});
Add teardown
method for easy cleanup
Breaking Changes
Instantiate new instances of framebus
// v4
var bus = require("framebus");
bus.on(/* args */);
bus.emit(/* args */);
// v5
var Framebus = require("framebus");
var bus = new Framebus();
bus.on(/* args */);
bus.emit(/* args */);
Instantiating a framebus with target
method with an origin
param
now requires an options object (same object that is used to
instantiate the instance)
// v4
var bus = require("framebus");
var anotherBus = bus.target("example.com");
// v5
var Framebus = require("framebus");
var bus = Framebus.target({
origin: "example.com",
});
var anotherBus = bus.target({
origin: "example.com",
});
Changelog
v4.0.3 and v4.0.4
@braintree/uuid
package for uuid generationChangelog
v4.0.3 and v4.0.4
@braintree/uuid
package for uuid generationChangelog
v4.0.2
Changelog
v4.0.0
Breaking Changes
publish
, pub
, and trigger
methods. Use emit
subscribe
and sub
methods. Use on
unsubscribe
and unsub
methods. Use off
emit
, not it only
supports passing data
and reply
Changelog
3.0.2
Fix issue where framebus would error when trying to reply to a non-existent window/frame
Fix issue where broadcasts to frames would fail if parent page has overwritten the window.length variable
BREAKING CHANGES
Module is now CommonJS only, and must be used with npm with a build tool (Browserify, Webpack, etc)
Bower support dropped
Fall back to window.self
when window.top
is undefined in old
versions of IE.
Corrects a regression introduced in 2.0.6 that prevented CommonJS runtimes from working.
framebus can be required (but not executed) from Node.js® environments.
Only traverse to opener
from the top-level frame
Avoid exceptions while broadcasting events
Do not infinitely recurse when window.opener === window
[unpublished]