@tolgee/core
Advanced tools
Comparing version 1.8.4 to 1.9.0
@@ -99,7 +99,26 @@ var __assign = (this && this.__assign) || function () { | ||
staticData: undefined, targetElement: undefined, _targetElement: undefined, ui: undefined }) }); | ||
_this.messages.send('TOLGEE_READY', sharedConfiguration); | ||
var timer = null; | ||
var ping = function () { | ||
_this.messages.send('TOLGEE_READY', sharedConfiguration); | ||
}; | ||
var finish = function () { | ||
clearInterval(timer); | ||
}; | ||
_this.messages.listen('TOLGEE_PLUGIN_READY', function () { | ||
_this.handshakeSucceed = true; | ||
_this.messages.send('TOLGEE_READY', sharedConfiguration); | ||
finish(); | ||
}); | ||
ping(); | ||
// try ping 5 times as sometimes extension doesn't respond right away | ||
var counter = 0; | ||
timer = setInterval(function () { | ||
if (!_this.handshakeSucceed && counter < 5) { | ||
ping(); | ||
counter += 1; | ||
} | ||
else { | ||
finish(); | ||
} | ||
}, 200); | ||
}; | ||
@@ -106,0 +125,0 @@ } |
{ | ||
"name": "@tolgee/core", | ||
"version": "1.8.4", | ||
"version": "1.9.0", | ||
"description": "Library providing ability to translate messages directly in context of developed application.", | ||
@@ -61,3 +61,3 @@ "main": "index.js", | ||
}, | ||
"gitHead": "b8a4cf681f813a1a4a31c34895cd2a2a15510e7b", | ||
"gitHead": "7dde9ae29f37c62d988de554f7eb79b52b36886c", | ||
"publishConfig": { | ||
@@ -64,0 +64,0 @@ "access": "public" |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
2767304
183
23302