| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent f90b22d commit e7cf2ef
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 | ||
@@ -219,6 +221,11 @@ class Blob extends JSTransferable { | |||
| 219 | 221 | } | |
| 220 | 222 | } | |
| 221 | 223 | ||
| 224 | + ObjectDefineProperty(Blob.prototype, SymbolToStringTag, { | ||
| 225 | + configurable: true, | ||
| 226 | + value: 'Blob', | ||
| 227 | + }); | ||
| 228 | + | ||
| 222 | 229 | InternalBlob.prototype.constructor = Blob; | |
| 223 | 230 | ObjectSetPrototypeOf( | |
| 224 | 231 | InternalBlob.prototype, | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -185,3 +185,14 @@ assert.throws(() => new Blob(['test', 1]), { | |||
| 185 | 185 | const b = new Blob(['hello'], { type: '\x01' }); | |
| 186 | 186 | assert.strictEqual(b.type, ''); | |
| 187 | 187 | } | |
| 188 | + | ||
| 189 | + { | ||
| 190 | + const descriptor = | ||
| 191 | + Object.getOwnPropertyDescriptor(Blob.prototype, Symbol.toStringTag); | ||
| 192 | + assert.deepStrictEqual(descriptor, { | ||
| 193 | + configurable: true, | ||
| 194 | + enumerable: false, | ||
| 195 | + value: 'Blob', | ||
| 196 | + writable: false | ||
| 197 | + }); | ||
| 198 | + } | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments