Sha256: 0720991fc8969a9e0ff2c1d7ad4a6f0458ab4730359cd19ec4acb1e34451b258
Contents?: true
Size: 963 Bytes
Versions: 32
Compression:
Stored size: 963 Bytes
Contents
// This component relies on JavaScript from GOV.UK Frontend //= require components/radios/radios.js window.GOVUK = window.GOVUK || {} window.GOVUK.FrontendModules = window.GOVUK.FrontendModules || {}; (function (global, GOVUK) { 'use strict' /** * TODO: Ideally this would be a NodeList.prototype.forEach polyfill * * See: https://github.com/imagitama/nodelist-foreach-polyfill * but the polyfill doesn't work in IE8 and needs more investigation */ function nodeListForEach (nodes, callback) { if (window.NodeList.prototype.forEach) { return nodes.forEach(callback) } for (var i = 0; i < nodes.length; i++) { callback.call(window, nodes[i], i, nodes) } } GOVUK.FrontendModules.Radios = window.GOVUKFrontend var $radios = document.querySelectorAll('[data-module="radios"]') nodeListForEach($radios, function ($radio) { new GOVUK.FrontendModules.Radios($radio).init() }) })(window, window.GOVUK)
Version data entries
32 entries across 32 versions & 1 rubygems