projects
/
platform
/
framework
/
web
/
crosswalk-tizen.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a6e3eee
)
Setup protocol after ready has already fired
author
Kevin Sawicki
<kevinsawicki@gmail.com>
Thu, 16 Jun 2016 23:23:08 +0000
(16:23 -0700)
committer
Kevin Sawicki
<kevinsawicki@gmail.com>
Thu, 16 Jun 2016 23:23:08 +0000
(16:23 -0700)
lib/browser/api/protocol.js
patch
|
blob
|
history
diff --git
a/lib/browser/api/protocol.js
b/lib/browser/api/protocol.js
index
4daf4ed
..
1f72924
100644
(file)
--- a/
lib/browser/api/protocol.js
+++ b/
lib/browser/api/protocol.js
@@
-9,9
+9,15
@@
exports.registerStandardSchemes = function (schemes) {
registerStandardSchemes(schemes)
}
-
app.once('ready',
function () {
+
const setupProtocol =
function () {
let protocol = session.defaultSession.protocol
for (let method in protocol) {
exports[method] = protocol[method].bind(protocol)
}
-})
+}
+
+if (app.isReady()) {
+ setupProtocol()
+} else {
+ app.once('ready', setupProtocol)
+}