You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// Prints ["https://www.example.com/","https://test.example.org/"]
609
609
```
610
610
611
+
#### `URL.createObjectURL(blob)`
612
+
<!-- YAML
613
+
added: REPLACEME
614
+
-->
615
+
616
+
> Stability: 1 - Experimental
617
+
618
+
*`blob` {Blob}
619
+
* Returns: {string}
620
+
621
+
Creates a `'blob:nodedata:...'` URL string that represents the given {Blob}
622
+
object and can be used to retrieve the `Blob` later.
623
+
624
+
```js
625
+
const {
626
+
Blob,
627
+
resolveObjectURL,
628
+
} =require('buffer');
629
+
630
+
constblob=newBlob(['hello']);
631
+
constid=URL.createObjectURL(blob);
632
+
633
+
// later...
634
+
635
+
constotherBlob=resolveObjectURL(id);
636
+
console.log(otherBlob.size);
637
+
```
638
+
639
+
The data stored by the registered {Blob} will be retained in memory until
640
+
`URL.revokeObjectURL()` is called to remove it.
641
+
642
+
`Blob` objects are registered within the current thread. If using Worker
643
+
Threads, `Blob` objects registered within one Worker will not be available
644
+
to other workers or the main thread.
645
+
646
+
#### `URL.revokeObjectURL(id)`
647
+
<!-- YAML
648
+
added: REPLACEME
649
+
-->
650
+
651
+
> Stability: 1 - Experimental
652
+
653
+
*`id` {string} A `'blob:nodedata:...` URL string returned by a prior call to
654
+
`URL.createObjectURL()`.
655
+
656
+
Removes the stored {Blob} identified by the given ID.
0 commit comments