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 = {
|
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;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user