Skip to content

Commit

Permalink
fixed the window.id issue in the embed code as well (and made a note …
Browse files Browse the repository at this point in the history
…about it with the original patch)
  • Loading branch information
mjpizz committed Nov 10, 2011
1 parent d8aa96a commit d37af8f
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 9 deletions.
4 changes: 3 additions & 1 deletion lightningjs-bootstrap.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,11 +46,13 @@ window.lightningjs || (function(window, parentLightningjs){
parentLoadPendingIdLookup = {},
parentLoaded = false;

// this is a workaround for potential issue when window.id was set
// in older versions of the embed code
if(deferredApiCalls && deferredApiCalls[0]) {
var promiseFunctionId = deferredApiCalls[0][1];
responses[promiseFunctionId] = api;
}

// NOTE: root.lv contains the embed version
api._load = function() {
// this method gets called whenever the parent.window.onload event fires
Expand Down
7 changes: 4 additions & 3 deletions lightningjs-bootstrap.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion lightningjs-embed.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ window.lightningjs || (function(modules){
// (used to deserialize the callstack with proper dependency
// ordering later on)
promiseResponseId = ++responseCounter,
promiseFunctionId = context ? (context.id || 0) : 0;
promiseFunctionId = (context && context != theWindow) ? (context.id || 0) : 0;

// push this call onto the callstack
(internalModule.s = internalModule.s || []).push([promiseResponseId, promiseFunctionId, theArguments]);
Expand Down
8 changes: 4 additions & 4 deletions lightningjs-embed.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit d37af8f

Please sign in to comment.