Sha256: ce2968c4232d39f11a4a116a539934c906a5990e8b21571e02403a5e5fa0fd03

Contents?: true

Size: 1.95 KB

Versions: 12

Compression:

Stored size: 1.95 KB

Contents

/*
	MIT License http://www.opensource.org/licenses/mit-license.php
	Author Tobias Koppers @sokra
*/
/*globals installedChunks hotAddUpdateChunk parentHotUpdateCallback importScripts XMLHttpRequest $require$ $hotChunkFilename$ $hotMainFilename$ */
module.exports = function() {
	// eslint-disable-next-line no-unused-vars
	function webpackHotUpdateCallback(chunkId, moreModules) {
		hotAddUpdateChunk(chunkId, moreModules);
		if (parentHotUpdateCallback) parentHotUpdateCallback(chunkId, moreModules);
	} //$semicolon

	// eslint-disable-next-line no-unused-vars
	function hotDownloadUpdateChunk(chunkId) {
		importScripts($require$.p + $hotChunkFilename$);
	}

	// eslint-disable-next-line no-unused-vars
	function hotDownloadManifest(requestTimeout) {
		requestTimeout = requestTimeout || 10000;
		return new Promise(function(resolve, reject) {
			if (typeof XMLHttpRequest === "undefined") {
				return reject(new Error("No browser support"));
			}
			try {
				var request = new XMLHttpRequest();
				var requestPath = $require$.p + $hotMainFilename$;
				request.open("GET", requestPath, true);
				request.timeout = requestTimeout;
				request.send(null);
			} catch (err) {
				return reject(err);
			}
			request.onreadystatechange = function() {
				if (request.readyState !== 4) return;
				if (request.status === 0) {
					// timeout
					reject(
						new Error("Manifest request to " + requestPath + " timed out.")
					);
				} else if (request.status === 404) {
					// no update available
					resolve();
				} else if (request.status !== 200 && request.status !== 304) {
					// other failure
					reject(new Error("Manifest request to " + requestPath + " failed."));
				} else {
					// success
					try {
						var update = JSON.parse(request.responseText);
					} catch (e) {
						reject(e);
						return;
					}
					resolve(update);
				}
			};
		});
	}

	//eslint-disable-next-line no-unused-vars
	function hotDisposeChunk(chunkId) {
		delete installedChunks[chunkId];
	}
};

Version data entries

12 entries across 12 versions & 5 rubygems

Version Path
disco_app-0.18.0 test/dummy/node_modules/webpack/lib/webworker/WebWorkerMainTemplate.runtime.js
disco_app-0.18.2 test/dummy/node_modules/webpack/lib/webworker/WebWorkerMainTemplate.runtime.js
enju_library-0.3.8 spec/dummy/node_modules/webpack/lib/webworker/WebWorkerMainTemplate.runtime.js
jester-data-8.0.0 node_modules/webpack/lib/webworker/WebWorkerMainTemplate.runtime.js
ezii-os-5.2.1 node_modules/webpack/lib/webworker/WebWorkerMainTemplate.runtime.js
ezii-os-2.0.1 node_modules/webpack/lib/webworker/WebWorkerMainTemplate.runtime.js
ezii-os-1.1.0 node_modules/webpack/lib/webworker/WebWorkerMainTemplate.runtime.js
ezii-os-1.0.0 node_modules/webpack/lib/webworker/WebWorkerMainTemplate.runtime.js
ezii-os-0.0.0.1.0 node_modules/webpack/lib/webworker/WebWorkerMainTemplate.runtime.js
ezii-os-0.0.0.0.1 node_modules/webpack/lib/webworker/WebWorkerMainTemplate.runtime.js
locomotivecms-4.0.0.alpha1 app/javascript/node_modules/webpack/lib/webworker/WebWorkerMainTemplate.runtime.js
locomotivecms-3.4.0 app/javascript/node_modules/webpack/lib/webworker/WebWorkerMainTemplate.runtime.js