Add btoa back to domstubs.js

This commit is contained in:
巴里切罗 2017-11-28 16:32:58 +08:00
parent 3e34eb31d9
commit 27a619246f

View File

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