Merge pull request #9201 from ydfzgyj/btoa

Add `btoa` back to domstubs.js
This commit is contained in:
Brendan Dahl 2017-11-28 17:29:16 -08:00 committed by GitHub
commit fbf456f51e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -197,6 +197,10 @@ DOMElementSerializer.prototype = {
},
};
function btoa (chars) {
return Buffer.from(chars, 'binary').toString('base64');
}
const document = {
childNodes : [],
@ -241,6 +245,7 @@ Image.prototype = {
}
}
exports.btoa = btoa;
exports.document = document;
exports.Image = Image;