Skip to content

Commit

Permalink
Add btoa back to domstubs.js
Browse files Browse the repository at this point in the history
  • Loading branch information
ydfzgyj committed Nov 28, 2017
1 parent 3e34eb3 commit 27a6192
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions examples/node/domstubs.js
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,10 @@ DOMElementSerializer.prototype = {
},
};

function btoa (chars) {
return Buffer.from(chars, 'binary').toString('base64');
}

const document = {
childNodes : [],

Expand Down Expand Up @@ -241,6 +245,7 @@ Image.prototype = {
}
}

exports.btoa = btoa;
exports.document = document;
exports.Image = Image;

Expand Down

0 comments on commit 27a6192

Please sign in to comment.