Skip to content

Commit 56c0724

Browse files
Add stubbed sessionStorage object.
1 parent df8d580 commit 56c0724

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

boilerplate.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1223,6 +1223,10 @@ var exports = {};
12231223
function fetch(url, data) {
12241224
lib.logIOC("fetch", {url: url, data: data}, "The script fetch()ed a URL.");
12251225
lib.logUrl("fetch", url);
1226+
return {
1227+
ok : true,
1228+
json : function() { return "1"; },
1229+
};
12261230
};
12271231

12281232
// Image class stub.
@@ -1317,3 +1321,8 @@ var history = {
13171321
pushState: function() {},
13181322
};
13191323

1324+
// Fake sessionStorage object.
1325+
var sessionStorage = {
1326+
getItem: function() {},
1327+
setItem: function() {},
1328+
};

0 commit comments

Comments
 (0)