Merge pull request #9201 from ydfzgyj/btoa
Add `btoa` back to domstubs.js
This commit is contained in:
commit
fbf456f51e
@ -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;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user