diff --git a/source/Ox.UI/js/Core/Event.js b/source/Ox.UI/js/Core/Event.js index 0ec5f08b..1294ebfe 100644 --- a/source/Ox.UI/js/Core/Event.js +++ b/source/Ox.UI/js/Core/Event.js @@ -63,13 +63,13 @@ if (message.data.oxid) { // The inner window receives the oxid of the outer iframe element Ox.oxid = message.data.oxid; - Ox.parent.postMessage('init', {}) + Ox.$parent.postMessage('init', {}) } else if (message.target) { // The outer window receives init from iframe Ox.elements[message.target].triggerEvent('init'); } } else { - (message.target ? Ox.elements[message.target] : Ox.parent) + (message.target ? Ox.elements[message.target] : Ox.$parent) .triggerMessage(message.event, message.data); } } @@ -186,9 +186,9 @@ } /*@ - Ox.parent Proxy to be used by iframes for messaging with outer window + Ox.$parent Proxy to be used by iframes for messaging with outer window @*/ - Ox.parent = Ox.$parent = (function() { + Ox.$parent = (function() { var self = {messageCallbacks: {}}, that = {oxid: Ox.uid()}; @@ -374,7 +374,7 @@ Adds handlers for multiple messages self Object with `messageCallbacks` (`Ox.Element`'s `self`) If `self` is missing and this method is not rebound, then the - handler is bound to the outer window (via `Ox.parent`) + handler is bound to the outer window (via `Ox.$parent`) message Message name callback Callback function data Message data (key/value pairs) @@ -399,7 +399,7 @@ Adds handlers for multiple messages self Object with `messageCallbacks` (`Ox.Element`'s `self`) If `self` is missing and this method is not rebound, then the - handler is bound to the outer window (via `Ox.parent`) + handler is bound to the outer window (via `Ox.$parent`) message Message name callback Callback function data Message data (key/value pairs) @@ -425,7 +425,7 @@ data Message data (key/value pairs) @*/ that.post = function() { - var isParent = this == Ox.parent, + var isParent = this == Ox.$parent, target = isParent ? window.parent : this[0].contentWindow; Ox.forEach( Ox.makeObject(Ox.slice(arguments)), @@ -472,7 +472,7 @@ Removes handlers for multiple messages self Object with `messageCallbacks` (`Ox.Element`'s `self`) If `self` is missing and this method is not rebound, then the - handler is bound to the outer window (via `Ox.parent`) + handler is bound to the outer window (via `Ox.$parent`) message Message name callback Message handler @*/