aboutsummaryrefslogtreecommitdiffstats
path: root/package.json
diff options
context:
space:
mode:
authorDan Finlay <dan@danfinlay.com>2016-07-26 07:34:29 +0800
committerDan Finlay <dan@danfinlay.com>2016-07-26 07:38:07 +0800
commit913a9e85bd24a286c3399ab6e9a0c47fdfbeae0d (patch)
tree6f674ee2aea359d0da71689ffd1c3bd611b60159 /package.json
parent6fa1d6efff0bcb5a41a2c3d5e35374e4259dd70b (diff)
downloadtangerine-wallet-browser-913a9e85bd24a286c3399ab6e9a0c47fdfbeae0d.tar
tangerine-wallet-browser-913a9e85bd24a286c3399ab6e9a0c47fdfbeae0d.tar.gz
tangerine-wallet-browser-913a9e85bd24a286c3399ab6e9a0c47fdfbeae0d.tar.bz2
tangerine-wallet-browser-913a9e85bd24a286c3399ab6e9a0c47fdfbeae0d.tar.lz
tangerine-wallet-browser-913a9e85bd24a286c3399ab6e9a0c47fdfbeae0d.tar.xz
tangerine-wallet-browser-913a9e85bd24a286c3399ab6e9a0c47fdfbeae0d.tar.zst
tangerine-wallet-browser-913a9e85bd24a286c3399ab6e9a0c47fdfbeae0d.zip
Inject inpage script synchronously
Huge thanks to the Firefox team, for their help on the issue of our long-standing inpage script race condition. http://stackoverflow.com/questions/38577656/how-can-i-make-a-firefox-add-on-contentscript-inject-and-run-a-script-before-oth The problem is that we were injecting a `script` tag and assigning its `src` attribute, which triggers an asynchronous fetch request, and does not guarantee execution order! (That was news to me!) Instead, I'm now assigning the `script` tag a `textContent` value of the script to inject, and it seems to fix the problem! There is also a Firefox-only API that could solve this whole problem in an even more elegant way, so we might want to expose a code path for that solution later on: https://developer.mozilla.org/en-US/docs/Mozilla/Tech/XPCOM/Language_Bindings/Components.utils.exportFunction Allows you to expose an object from one scope to another. There was even talk of creating a polyfill for it that does virtually what we do, message passing between contexts.
Diffstat (limited to 'package.json')
-rw-r--r--package.json1
1 files changed, 1 insertions, 0 deletions
diff --git a/package.json b/package.json
index ef570fb94..1691f769a 100644
--- a/package.json
+++ b/package.json
@@ -86,6 +86,7 @@
"deep-freeze-strict": "^1.1.1",
"del": "^2.2.0",
"gulp": "github:gulpjs/gulp#4.0",
+ "gulp-brfs": "^0.1.0",
"gulp-livereload": "^3.8.1",
"gulp-sourcemaps": "^1.6.0",
"gulp-util": "^3.0.7",