Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create shared data space for YUI instances #2

Open
wants to merge 1 commit into
base: smugmug
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions src/event-custom/js/event-target.js
Original file line number Diff line number Diff line change
Expand Up @@ -805,17 +805,16 @@ Y.EventTarget = ET;
Y.mix(Y, ET.prototype);
ET.call(Y, { bubbles: false });

YUI.Env.globalEvents = YUI.Env.globalEvents || new ET();

/**
* Hosts YUI page level events. This is where events bubble to
* when the broadcast config is set to 2. This property is
* only available if the custom event module is loaded.
* @property Global
* @type EventTarget
* @type {EventTarget}
* @for YUI
*/
Y.Global = YUI.Env.globalEvents;
Y.Global = Y.shared.globalEventTarget ||
(Y.shared.globalEventTarget = new ET());

// @TODO implement a global namespace function on Y.Global?

Expand Down
2 changes: 1 addition & 1 deletion src/yui/js/yui-log.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ INSTANCE.log = function(msg, cat, src, silent) {
var bail, excl, incl, m, f,
Y = INSTANCE,
c = Y.config,
publisher = (Y.fire) ? Y : YUI.Env.globalEvents;
publisher = (Y.fire) ? Y : Y.shared.globalEventTarget;
// suppress log message if the config is off or the event stack
// or the event call stack contains a consumer of the yui:log event
if (c.debug) {
Expand Down
Loading