Sha256: 40e4b74d9b1fbdcf2423c93f40af81f08781ea858f9c023af8ffe7e4e4cb96b7

Contents?: true

Size: 1.41 KB

Versions: 542

Compression:

Stored size: 1.41 KB

Contents

(function (global, factory) {
	typeof exports === 'object' && typeof module !== 'undefined' ? factory() :
	typeof define === 'function' && define.amd ? define('GOVUKFrontend', factory) :
	(factory());
}(this, (function () { 'use strict';

(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 || {});

})));

Version data entries

542 entries across 542 versions & 4 rubygems

Version Path
defra_ruby_template-3.15.1 node_modules/govuk-frontend/govuk/vendor/polyfills/Document.js
defra_ruby_template-3.15.0 node_modules/govuk-frontend/govuk/vendor/polyfills/Document.js
govuk_tech_docs-3.4.0 node_modules/govuk-frontend/govuk/vendor/polyfills/Document.js
govuk_tech_docs-3.3.1 node_modules/govuk-frontend/govuk/vendor/polyfills/Document.js
govuk_publishing_components-34.7.0 node_modules/govuk-frontend/govuk/vendor/polyfills/Document.js
govuk_publishing_components-34.6.0 node_modules/govuk-frontend/govuk/vendor/polyfills/Document.js
govuk_publishing_components-34.5.1 node_modules/govuk-frontend/govuk/vendor/polyfills/Document.js
govuk_publishing_components-34.5.0 node_modules/govuk-frontend/govuk/vendor/polyfills/Document.js
govuk_publishing_components-34.4.2 node_modules/govuk-frontend/govuk/vendor/polyfills/Document.js
govuk_publishing_components-34.4.1 node_modules/govuk-frontend/govuk/vendor/polyfills/Document.js
govuk_publishing_components-34.4.0 node_modules/govuk-frontend/govuk/vendor/polyfills/Document.js
govuk_publishing_components-34.3.0 node_modules/govuk-frontend/govuk/vendor/polyfills/Document.js
govuk_publishing_components-34.2.0 node_modules/govuk-frontend/govuk/vendor/polyfills/Document.js
govuk_publishing_components-34.1.3 node_modules/govuk-frontend/govuk/vendor/polyfills/Document.js
govuk_publishing_components-34.1.2 node_modules/govuk-frontend/govuk/vendor/polyfills/Document.js
govuk_tech_docs-3.3.0 node_modules/govuk-frontend/govuk/vendor/polyfills/Document.js
govuk_publishing_components-34.1.1 node_modules/govuk-frontend/govuk/vendor/polyfills/Document.js
govuk_publishing_components-34.1.0 node_modules/govuk-frontend/govuk/vendor/polyfills/Document.js
govuk_publishing_components-34.0.0 node_modules/govuk-frontend/govuk/vendor/polyfills/Document.js
govuk_publishing_components-33.1.0 node_modules/govuk-frontend/govuk/vendor/polyfills/Document.js