mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-01 23:57:49 +00:00
Make perf-ui.js and test-ui.js more aligned, remove unzip perf test, and handle comparing to files of the same name in perf.js.
Former-commit-id: 7a5353aab76d6667b6dd5d43e85f95695e5a9cba
This commit is contained in:
@@ -24,7 +24,7 @@
|
||||
* @param {Function} handler The event handler.
|
||||
* @returns {Element} The element.
|
||||
*/
|
||||
function addEvent(element, eventName, handler) {
|
||||
function addListener(element, eventName, handler) {
|
||||
if (typeof element.addEventListener != 'undefined') {
|
||||
element.addEventListener(eventName, handler, false);
|
||||
} else if (typeof element.attachEvent != 'undefined') {
|
||||
@@ -74,7 +74,7 @@
|
||||
}());
|
||||
|
||||
// initialize controls
|
||||
addEvent(window, 'load', function() {
|
||||
addListener(window, 'load', function() {
|
||||
function eventHandler(event) {
|
||||
var search = location.search.replace(/^\?|&?(?:build|loader)=[^&]*&?/g, '');
|
||||
if (event.stopPropagation) {
|
||||
@@ -123,8 +123,8 @@
|
||||
return -1;
|
||||
}());
|
||||
|
||||
addEvent(buildList, 'change', eventHandler);
|
||||
addEvent(loaderList, 'change', eventHandler);
|
||||
addListener(buildList, 'change', eventHandler);
|
||||
addListener(loaderList, 'change', eventHandler);
|
||||
}
|
||||
else {
|
||||
setTimeout(init, 15);
|
||||
|
||||
Reference in New Issue
Block a user