javascripts/govuk/details.polyfill.js
function (node, type, callback) {
      if (node.addEventListener) {
        node.addEventListener(type, function (e) {
          callback(e, e.target)
        }, false)
      } else if (node.attachEvent) {
        node.attachEvent('on' + type, function (e) {
          callback(e, e.srcElement)
        })
      }
    }
function (node, type, callback) {
      if (node.addEventListener) {
        node.addEventListener(type, function (e) {
          callback(e, e.target)
        }, false)
      } else if (node.attachEvent) {
        node.attachEvent('on' + type, function (e) {
          callback(e, e.srcElement)
        })
      }
    }
function ( node , type , callback ) { if ( node . addEventListener ) { node . addEventListener ( type , function ( e ) { callback ( e , e . target ) } , false ) } else if ( node . attachEvent ) { node . attachEvent ( 'on' + type , function ( e ) { callback ( e , e . srcElement ) } ) } }
Add event construct for modern browsers or IE which fires the callback with a pre-converted target reference
Add event construct for modern browsers or IE which fires the callback with a pre - converted target reference