| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent dd054ca commit c160d88
2 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -2,12 +2,14 @@ | |||
| 2 | 2 | ||
| 3 | 3 | const { | |
| 4 | 4 | ArrayFrom, | |
| 5 | + ObjectDefineProperty, | ||
| 5 | 6 | ObjectSetPrototypeOf, | |
| 6 | 7 | PromiseResolve, | |
| 7 | 8 | RegExpPrototypeTest, | |
| 8 | 9 | StringPrototypeToLowerCase, | |
| 9 | 10 | Symbol, | |
| 10 | 11 | SymbolIterator, | |
| 12 | + SymbolToStringTag, | ||
| 11 | 13 | Uint8Array, | |
| 12 | 14 | } = primordials; | |
| 13 | 15 | ||
@@ -217,6 +219,11 @@ class Blob extends JSTransferable { | |||
| 217 | 219 | } | |
| 218 | 220 | } | |
| 219 | 221 | ||
| 222 | + ObjectDefineProperty(Blob.prototype, SymbolToStringTag, { | ||
| 223 | + configurable: true, | ||
| 224 | + value: 'Blob', | ||
| 225 | + }); | ||
| 226 | + | ||
| 220 | 227 | InternalBlob.prototype.constructor = Blob; | |
| 221 | 228 | ObjectSetPrototypeOf( | |
| 222 | 229 | InternalBlob.prototype, | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -184,3 +184,14 @@ assert.throws(() => new Blob(['test', 1]), { | |||
| 184 | 184 | const b = new Blob(['hello'], { type: '\x01' }); | |
| 185 | 185 | assert.strictEqual(b.type, ''); | |
| 186 | 186 | } | |
| 187 | + | ||
| 188 | + { | ||
| 189 | + const descriptor = | ||
| 190 | + Object.getOwnPropertyDescriptor(Blob.prototype, Symbol.toStringTag); | ||
| 191 | + assert.deepStrictEqual(descriptor, { | ||
| 192 | + configurable: true, | ||
| 193 | + enumerable: false, | ||
| 194 | + value: 'Blob', | ||
| 195 | + writable: false | ||
| 196 | + }); | ||
| 197 | + } | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments