mirror of
https://github.com/nodejs/node.git
synced 2025-08-15 13:48:44 +02:00
lib: make properties on Blob and URL enumerable
PR-URL: https://github.com/nodejs/node/pull/44918 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
This commit is contained in:
parent
4264b19861
commit
6fb466bc38
4 changed files with 49 additions and 0 deletions
|
@ -4,6 +4,7 @@ const {
|
|||
ArrayFrom,
|
||||
MathMax,
|
||||
MathMin,
|
||||
ObjectDefineProperties,
|
||||
ObjectDefineProperty,
|
||||
PromiseResolve,
|
||||
PromiseReject,
|
||||
|
@ -45,6 +46,7 @@ const {
|
|||
createDeferredPromise,
|
||||
customInspectSymbol: kInspect,
|
||||
kEmptyObject,
|
||||
kEnumerableProperty,
|
||||
} = require('internal/util');
|
||||
const { inspect } = require('internal/util/inspect');
|
||||
|
||||
|
@ -364,6 +366,15 @@ ObjectDefineProperty(Blob.prototype, SymbolToStringTag, {
|
|||
value: 'Blob',
|
||||
});
|
||||
|
||||
ObjectDefineProperties(Blob.prototype, {
|
||||
size: kEnumerableProperty,
|
||||
type: kEnumerableProperty,
|
||||
slice: kEnumerableProperty,
|
||||
stream: kEnumerableProperty,
|
||||
text: kEnumerableProperty,
|
||||
arrayBuffer: kEnumerableProperty,
|
||||
});
|
||||
|
||||
function resolveObjectURL(url) {
|
||||
url = `${url}`;
|
||||
try {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue