Skip to content
This repository was archived by the owner on Mar 13, 2018. It is now read-only.

Commit a16b028

Browse files
committed
Merge pull request #473 from arv/firefox-os-apps-disable-eval
Disable eval for Firefox OS Apps
2 parents c669777 + c966f90 commit a16b028

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/wrappers.js

+7
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,13 @@ window.ShadowDOMPolyfill = {};
1818
return false;
1919
}
2020

21+
// Firefox OS Apps do not allow eval. This feature detection is very hacky
22+
// but even if some other platform adds support for this function this code
23+
// will continue to work.
24+
if (navigator.getDeviceStorage) {
25+
return false;
26+
}
27+
2128
try {
2229
var f = new Function('return true;');
2330
return f();

0 commit comments

Comments
 (0)