--- a/wp/wp-includes/js/dist/blob.js Fri Sep 05 18:40:08 2025 +0200
+++ b/wp/wp-includes/js/dist/blob.js Fri Sep 05 18:52:52 2025 +0200
@@ -43,17 +43,15 @@
/* harmony export */ isBlobURL: () => (/* binding */ isBlobURL),
/* harmony export */ revokeBlobURL: () => (/* binding */ revokeBlobURL)
/* harmony export */ });
-/**
- * @type {Record<string, File|undefined>}
- */
+/* wp:polyfill */
const cache = {};
/**
* Create a blob URL from a file.
*
- * @param {File} file The file to create a blob URL for.
+ * @param file The file to create a blob URL for.
*
- * @return {string} The blob URL.
+ * @return The blob URL.
*/
function createBlobURL(file) {
const url = window.URL.createObjectURL(file);
@@ -66,9 +64,9 @@
* `createBlobURL` and not removed by `revokeBlobURL`, otherwise it will return
* `undefined`.
*
- * @param {string} url The blob URL.
+ * @param url The blob URL.
*
- * @return {File|undefined} The file for the blob URL.
+ * @return The file for the blob URL.
*/
function getBlobByURL(url) {
return cache[url];
@@ -79,9 +77,9 @@
* `createBlobURL` and not removed by `revokeBlobURL`, otherwise it will return
* `undefined`.
*
- * @param {string} url The blob URL.
+ * @param url The blob URL.
*
- * @return {string|undefined} The blob type.
+ * @return The blob type.
*/
function getBlobTypeByURL(url) {
return getBlobByURL(url)?.type.split('/')[0]; // 0: media type , 1: file extension eg ( type: 'image/jpeg' ).
@@ -90,7 +88,7 @@
/**
* Remove the resource and file cache from memory.
*
- * @param {string} url The blob URL.
+ * @param url The blob URL.
*/
function revokeBlobURL(url) {
if (cache[url]) {
@@ -102,9 +100,9 @@
/**
* Check whether a url is a blob url.
*
- * @param {string|undefined} url The URL.
+ * @param url The URL.
*
- * @return {boolean} Is the url a blob url?
+ * @return Is the url a blob url?
*/
function isBlobURL(url) {
if (!url || !url.indexOf) {
@@ -132,9 +130,9 @@
* downloadBlob( filename, fileContent, 'application/json' );
* ```
*
- * @param {string} filename File name.
- * @param {BlobPart} content File content (BufferSource | Blob | string).
- * @param {string} contentType (Optional) File mime type. Default is `''`.
+ * @param filename File name.
+ * @param content File content (BufferSource | Blob | string).
+ * @param contentType (Optional) File mime type. Default is `''`.
*/
function downloadBlob(filename, content, contentType = '') {
if (!filename || !content) {