Commits

Anonymous committed cecdf3e

Aurora Bugfix: use 'this' instead of srcElement

  • Participants
  • Parent commits 3fbb881

Comments (0)

Files changed (1)

         input.id = "kitToggle"+text;
         input.value = checked;
         input.onclick = onclick;
+        input.onchange = onclick;
         var label = document.createElement("label");
         label.for = input.id;
         label.appendChild( document.createTextNode(text) );
     var createToggle = function( name, initialState, onToggle ) {
         var that = {
             elementToggled : function(e) {
-                onToggle( e.srcElement.checked );
+                console.log("toggle");
+                onToggle( this.checked );
             },
         }