/**
 * head.script.js
 *
 * Essential scripts, to be loaded in the head of the document
 * Use gruntfile.js to include the necessary script files.
 */

// Load respimage if <picture> element is not supported
if(!window.HTMLPictureElement){
	enhance.loadJS('/assets/javascript/lib/polyfills/respimage.min.js');
}

/**
 * head.script.js
 *
 * Essential scripts, to be loaded in the head of the document
 * Use gruntfile.js to include the necessary script files.
 */

// Load respimage if <picture> element is not supported
if(!window.HTMLPictureElement) {
	document.createElement('picture');
	enhance.loadJS('/assets/javascript/lib/polyfills/respimage.min.js');
}

Create hidden picture element when respimage is loaded.
Create hidden picture element when respimage is loaded.

Seen in this example: https://github.com/fabianmichael/kirby-imageset#23-template-setup.
