Sha256: ac2703aeeac13c7393d50c1f78f22c1f420f2587c03459b6939df352bcbfa6ce
Contents?: true
Size: 810 Bytes
Versions: 129
Compression:
Stored size: 810 Bytes
Contents
(function (root) { 'use strict' window.GOVUK = window.GOVUK || {} window.GOVUK.triggerEvent = function (element, eventName, parameters) { var params = parameters || {} var event var keyCode = params.keyCode if (!Object.prototype.hasOwnProperty.call(params, 'bubbles')) { params.bubbles = true } if (!Object.prototype.hasOwnProperty.call(params, 'cancelable')) { params.cancelable = true } if (typeof window.CustomEvent === 'function') { event = new window.CustomEvent(eventName, params) } else { event = document.createEvent('CustomEvent') event.initCustomEvent(eventName, params.bubbles, params.cancelable, params.detail) } if (keyCode) { event.keyCode = keyCode } element.dispatchEvent(event) } }(window))
Version data entries
129 entries across 129 versions & 1 rubygems