Sha256: 3e7c36119dcacdc2e5aeedd590105ef15ea6201a41af650fb7375ae06b236310

Contents?: true

Size: 1.24 KB

Versions: 75

Compression:

Stored size: 1.24 KB

Contents

// @ts-nocheck
(function (undefined) {

// Detection from https://github.com/Financial-Times/polyfill-service/blob/master/packages/polyfill-library/polyfills/Document/detect.js
var detect = ("Document" in this);

if (detect) return

// Polyfill from https://cdn.polyfill.io/v2/polyfill.js?features=Document&flags=always
if ((typeof WorkerGlobalScope === "undefined") && (typeof importScripts !== "function")) {

	if (this.HTMLDocument) { // IE8

		// HTMLDocument is an extension of Document.  If the browser has HTMLDocument but not Document, the former will suffice as an alias for the latter.
		this.Document = this.HTMLDocument;

	} else {

		// Create an empty function to act as the missing constructor for the document object, attach the document object as its prototype.  The function needs to be anonymous else it is hoisted and causes the feature detect to prematurely pass, preventing the assignments below being made.
		this.Document = this.HTMLDocument = document.constructor = (new Function('return function Document() {}')());
		this.Document.prototype = document;
	}
}


})
.call('object' === typeof window && window || 'object' === typeof self && self || 'object' === typeof global && global || {});
//# sourceMappingURL=vendor/polyfills/Document.mjs.map

Version data entries

75 entries across 75 versions & 1 rubygems

Version Path
govuk_publishing_components-39.2.5 node_modules/govuk-frontend/govuk-esm/vendor/polyfills/Document.mjs
govuk_publishing_components-39.2.4 node_modules/govuk-frontend/govuk-esm/vendor/polyfills/Document.mjs
govuk_publishing_components-39.2.3 node_modules/govuk-frontend/govuk-esm/vendor/polyfills/Document.mjs
govuk_publishing_components-39.2.2 node_modules/govuk-frontend/govuk-esm/vendor/polyfills/Document.mjs
govuk_publishing_components-39.2.1 node_modules/govuk-frontend/govuk-esm/vendor/polyfills/Document.mjs
govuk_publishing_components-39.2.0 node_modules/govuk-frontend/govuk-esm/vendor/polyfills/Document.mjs
govuk_publishing_components-39.1.0 node_modules/govuk-frontend/govuk-esm/vendor/polyfills/Document.mjs
govuk_publishing_components-39.0.0 node_modules/govuk-frontend/govuk-esm/vendor/polyfills/Document.mjs
govuk_publishing_components-38.4.2 node_modules/govuk-frontend/govuk-esm/vendor/polyfills/Document.mjs
govuk_publishing_components-38.1.1 node_modules/govuk-frontend/govuk-esm/vendor/polyfills/Document.mjs
govuk_publishing_components-38.1.0 node_modules/govuk-frontend/govuk-esm/vendor/polyfills/Document.mjs
govuk_publishing_components-38.0.1 node_modules/govuk-frontend/govuk-esm/vendor/polyfills/Document.mjs
govuk_publishing_components-38.0.0 node_modules/govuk-frontend/govuk-esm/vendor/polyfills/Document.mjs
govuk_publishing_components-37.10.0 node_modules/govuk-frontend/govuk-esm/vendor/polyfills/Document.mjs
govuk_publishing_components-37.9.1 node_modules/govuk-frontend/govuk-esm/vendor/polyfills/Document.mjs
govuk_publishing_components-37.9.0 node_modules/govuk-frontend/govuk-esm/vendor/polyfills/Document.mjs
govuk_publishing_components-37.8.1 node_modules/govuk-frontend/govuk-esm/vendor/polyfills/Document.mjs
govuk_publishing_components-37.8.0 node_modules/govuk-frontend/govuk-esm/vendor/polyfills/Document.mjs
govuk_publishing_components-37.7.1 node_modules/govuk-frontend/govuk-esm/vendor/polyfills/Document.mjs
govuk_publishing_components-37.7.0 node_modules/govuk-frontend/govuk-esm/vendor/polyfills/Document.mjs