wp/wp-includes/js/dist/blob.js
changeset 16 a86126ab1dd4
parent 9 177826044cd9
child 18 be944660c56a
equal deleted inserted replaced
15:3d4e9c994f10 16:a86126ab1dd4
    80 /******/ 	// __webpack_public_path__
    80 /******/ 	// __webpack_public_path__
    81 /******/ 	__webpack_require__.p = "";
    81 /******/ 	__webpack_require__.p = "";
    82 /******/
    82 /******/
    83 /******/
    83 /******/
    84 /******/ 	// Load entry module and return exports
    84 /******/ 	// Load entry module and return exports
    85 /******/ 	return __webpack_require__(__webpack_require__.s = 255);
    85 /******/ 	return __webpack_require__(__webpack_require__.s = 284);
    86 /******/ })
    86 /******/ })
    87 /************************************************************************/
    87 /************************************************************************/
    88 /******/ ({
    88 /******/ ({
    89 
    89 
    90 /***/ 255:
    90 /***/ 284:
    91 /***/ (function(module, __webpack_exports__, __webpack_require__) {
    91 /***/ (function(module, __webpack_exports__, __webpack_require__) {
    92 
    92 
    93 "use strict";
    93 "use strict";
    94 __webpack_require__.r(__webpack_exports__);
    94 __webpack_require__.r(__webpack_exports__);
    95 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "createBlobURL", function() { return createBlobURL; });
    95 /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "createBlobURL", function() { return createBlobURL; });
   100  * Browser dependencies
   100  * Browser dependencies
   101  */
   101  */
   102 var _window$URL = window.URL,
   102 var _window$URL = window.URL,
   103     createObjectURL = _window$URL.createObjectURL,
   103     createObjectURL = _window$URL.createObjectURL,
   104     revokeObjectURL = _window$URL.revokeObjectURL;
   104     revokeObjectURL = _window$URL.revokeObjectURL;
       
   105 /**
       
   106  * @type {Record<string, File|undefined>}
       
   107  */
       
   108 
   105 var cache = {};
   109 var cache = {};
   106 /**
   110 /**
   107  * Create a blob URL from a file.
   111  * Create a blob URL from a file.
   108  *
   112  *
   109  * @param {File} file The file to create a blob URL for.
   113  * @param {File} file The file to create a blob URL for.
   121  * `createBlobURL` and not removed by `revokeBlobURL`, otherwise it will return
   125  * `createBlobURL` and not removed by `revokeBlobURL`, otherwise it will return
   122  * `undefined`.
   126  * `undefined`.
   123  *
   127  *
   124  * @param {string} url The blob URL.
   128  * @param {string} url The blob URL.
   125  *
   129  *
   126  * @return {?File} The file for the blob URL.
   130  * @return {File|undefined} The file for the blob URL.
   127  */
   131  */
   128 
   132 
   129 function getBlobByURL(url) {
   133 function getBlobByURL(url) {
   130   return cache[url];
   134   return cache[url];
   131 }
   135 }