Skip to content

Commit 1fc4c55

Browse files
authored
Merge pull request #16 from SpringRoll/bugfix/bellhop2-support
Bugfix/bellhop2 support
2 parents 82b8f3d + f11f686 commit 1fc4c55

8 files changed

+29
-49
lines changed

bower.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "springroll-container",
3-
"version": "1.1.1",
3+
"version": "1.1.2",
44
"main": "dist/container.min.js",
55
"dependencies":
66
{

dist/container.js

+13-23
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/*! SpringRoll Container 1.1.1 */
1+
/*! SpringRoll Container 1.1.2 */
22
/**
33
* @module Core
44
* @namespace window
@@ -1389,9 +1389,9 @@
13891389
* @property {String} version
13901390
* @static
13911391
* @readOnly
1392-
* @default "1.1.1"
1392+
* @default "1.1.2"
13931393
*/
1394-
Container.version = "1.1.1";
1394+
Container.version = "1.1.2";
13951395

13961396
//Reference to the prototype
13971397
var s = EventDispatcher.prototype;
@@ -1521,15 +1521,11 @@
15211521
this.client.connect(this.dom);
15221522

15231523
//Handle bellhop events coming from the application
1524-
this.client.on(
1525-
{
1526-
loading: onLoading.bind(this),
1527-
progress: onProgress.bind(this),
1528-
loadDone: onLoadDone.bind(this), // @deprecated use 'loaded' instead
1529-
loaded: onLoadDone.bind(this),
1530-
endGame: onEndGame.bind(this),
1531-
localError: onLocalError.bind(this)
1532-
});
1524+
this.client.on('loading', onLoading.bind(this));
1525+
this.client.on('progress', onProgress.bind(this));
1526+
this.client.on('loaded', onLoadDone.bind(this));
1527+
this.client.on('endGame', onEndGame.bind(this));
1528+
this.client.on('localError', onLocalError.bind(this));
15331529
};
15341530

15351531
/**
@@ -2422,11 +2418,8 @@
24222418

24232419
plugin.open = function()
24242420
{
2425-
this.client.on(
2426-
{
2427-
focus: onFocus.bind(this),
2428-
keepFocus: onKeepFocus.bind(this)
2429-
});
2421+
this.client.on('focus', onFocus.bind(this));
2422+
this.client.on('keepFocus', onKeepFocus.bind(this));
24302423
};
24312424

24322425
plugin.opened = function()
@@ -3182,12 +3175,9 @@
31823175

31833176
plugin.open = function()
31843177
{
3185-
this.client.on(
3186-
{
3187-
userDataRemove: onUserDataRemove.bind(this),
3188-
userDataRead: onUserDataRead.bind(this),
3189-
userDataWrite: onUserDataWrite.bind(this),
3190-
});
3178+
this.client.on('userDataRemove', onUserDataRemove.bind(this));
3179+
this.client.on('userDataRead', onUserDataRead.bind(this));
3180+
this.client.on('userDataWrite', onUserDataWrite.bind(this));
31913181
};
31923182

31933183
/**

dist/container.min.js

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

library.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "SpringRoll Container",
3-
"version": "1.1.1",
3+
"version": "1.1.2",
44
"description": "The iframe controller for interacting with SpringRoll applications",
55
"url": "https://github.com/SpringRoll/SpringRollContainer",
66
"output": "container",

package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "springroll-container",
3-
"version": "1.1.1",
3+
"version": "1.1.2",
44
"description": "The iframe controller for interacting with SpringRoll applications",
55
"main": "./dist/container.min.js",
66
"author":
@@ -16,7 +16,7 @@
1616
},
1717
"dependencies":
1818
{
19-
"bellhop-iframe": "*"
19+
"bellhop-iframe": "~2.0.0"
2020
},
2121
"devDependencies":
2222
{

src/container/Container.js

+5-9
Original file line numberDiff line numberDiff line change
@@ -235,15 +235,11 @@
235235
this.client.connect(this.dom);
236236

237237
//Handle bellhop events coming from the application
238-
this.client.on(
239-
{
240-
loading: onLoading.bind(this),
241-
progress: onProgress.bind(this),
242-
loadDone: onLoadDone.bind(this), // @deprecated use 'loaded' instead
243-
loaded: onLoadDone.bind(this),
244-
endGame: onEndGame.bind(this),
245-
localError: onLocalError.bind(this)
246-
});
238+
this.client.on('loading', onLoading.bind(this));
239+
this.client.on('progress', onProgress.bind(this));
240+
this.client.on('loaded', onLoadDone.bind(this));
241+
this.client.on('endGame', onEndGame.bind(this));
242+
this.client.on('localError', onLocalError.bind(this));
247243
};
248244

249245
/**

src/container/plugins/FocusPlugin.js

+2-5
Original file line numberDiff line numberDiff line change
@@ -223,11 +223,8 @@
223223

224224
plugin.open = function()
225225
{
226-
this.client.on(
227-
{
228-
focus: onFocus.bind(this),
229-
keepFocus: onKeepFocus.bind(this)
230-
});
226+
this.client.on('focus', onFocus.bind(this));
227+
this.client.on('keepFocus', onKeepFocus.bind(this));
231228
};
232229

233230
plugin.opened = function()

src/container/plugins/UserDataPlugin.js

+3-6
Original file line numberDiff line numberDiff line change
@@ -26,12 +26,9 @@
2626

2727
plugin.open = function()
2828
{
29-
this.client.on(
30-
{
31-
userDataRemove: onUserDataRemove.bind(this),
32-
userDataRead: onUserDataRead.bind(this),
33-
userDataWrite: onUserDataWrite.bind(this),
34-
});
29+
this.client.on('userDataRemove', onUserDataRemove.bind(this));
30+
this.client.on('userDataRead', onUserDataRead.bind(this));
31+
this.client.on('userDataWrite', onUserDataWrite.bind(this));
3532
};
3633

3734
/**

0 commit comments

Comments
 (0)