|
@ -56,10 +56,10 @@ if (self.chrome) { |
|
|
vAPI.chrome = true; |
|
|
vAPI.chrome = true; |
|
|
vAPI.messaging = { |
|
|
vAPI.messaging = { |
|
|
port: null, |
|
|
port: null, |
|
|
|
|
|
channels: {}, |
|
|
|
|
|
listeners: {}, |
|
|
requestId: 0, |
|
|
requestId: 0, |
|
|
connectorId: uniqueId(), |
|
|
connectorId: uniqueId(), |
|
|
listeners: {}, |
|
|
|
|
|
channels: {}, |
|
|
|
|
|
connector: messagingConnector, |
|
|
connector: messagingConnector, |
|
|
setup: function() { |
|
|
setup: function() { |
|
|
this.port = chrome.runtime.connect({name: this.connectorId}); |
|
|
this.port = chrome.runtime.connect({name: this.connectorId}); |
|
@ -111,10 +111,10 @@ if (self.chrome) { |
|
|
// relevant?
|
|
|
// relevant?
|
|
|
// https://developer.apple.com/library/safari/documentation/Tools/Conceptual/SafariExtensionGuide/MessagesandProxies/MessagesandProxies.html#//apple_ref/doc/uid/TP40009977-CH14-SW12
|
|
|
// https://developer.apple.com/library/safari/documentation/Tools/Conceptual/SafariExtensionGuide/MessagesandProxies/MessagesandProxies.html#//apple_ref/doc/uid/TP40009977-CH14-SW12
|
|
|
vAPI.messaging = { |
|
|
vAPI.messaging = { |
|
|
connectorId: uniqueId(), |
|
|
|
|
|
requestId: 0, |
|
|
|
|
|
listeners: {}, |
|
|
|
|
|
channels: {}, |
|
|
channels: {}, |
|
|
|
|
|
listeners: {}, |
|
|
|
|
|
requestId: 0, |
|
|
|
|
|
connectorId: uniqueId(), |
|
|
connector: messagingConnector, |
|
|
connector: messagingConnector, |
|
|
setup: function() { |
|
|
setup: function() { |
|
|
this._connector = function(msg) { |
|
|
this._connector = function(msg) { |
|
|