Allow switching the module loader in the unit tests.

Former-commit-id: 8521e92925cbca8ff73adf3f1a350caa662e27f7
This commit is contained in:
John-David Dalton
2013-07-07 16:24:26 -07:00
parent b1b06a38af
commit 9b21656314
4 changed files with 74 additions and 36 deletions

View File

@@ -24,7 +24,7 @@
* @param {Function} handler The event handler.
* @returns {Element} The element.
*/
function addListener(element, eventName, handler) {
function addEvent(element, eventName, handler) {
if (typeof element.addEventListener != 'undefined') {
element.addEventListener(eventName, handler, false);
} else if (typeof element.attachEvent != 'undefined') {
@@ -71,7 +71,7 @@
}());
// initialize controls
addListener(window, 'load', function() {
addEvent(window, 'load', function() {
function eventHandler(event) {
var search = location.search.replace(/^\?|&?(?:build|other)=[^&]*&?/g, '');
if (event.stopPropagation) {