Skip to content

Commit

Permalink
Update: support Microsoft Edge
Browse files Browse the repository at this point in the history
  • Loading branch information
linuxwolf committed Dec 18, 2015
1 parent 4c8e24e commit 5ea3c88
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ var KARMA_CONFIG = {
};
var KARMA_BROWSERS = {
local: ["Chrome", "Firefox"],
saucelabs: ["SL_Chrome", "SL_Firefox", "SL_Safari_7", "SL_Safari_8", "SL_Safari_9", "SL_IE_10", "SL_IE_11"]
saucelabs: ["SL_Chrome", "SL_Firefox", "SL_Safari_7", "SL_Safari_8", "SL_Safari_9", "SL_IE_10", "SL_IE_11", "SL_EDGE"]
};
// allow for IE on windows
if (/^win/.test(process.platform)) {
Expand Down
5 changes: 4 additions & 1 deletion lib/algorithms/helpers.js
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,10 @@ exports.setupFallback = function(nodejs, webcrypto, fallback) {

function check(err) {
if (err.code === DOMException.NOT_SUPPORTED_ERR ||
err.message === "Only ArrayBuffer and ArrayBufferView objects can be passed as CryptoOperationData") {
// Firefox rejects some operations erroneously complaining about inputs
err.message === "Only ArrayBuffer and ArrayBufferView objects can be passed as CryptoOperationData" ||
// MS Edge rejects with not an Error
!(err instanceof Error)) {
// not actually supported -- always use fallback
impl = fallback;
return impl.apply(null, args);
Expand Down

0 comments on commit 5ea3c88

Please sign in to comment.