add fireEvent method to component API

This commit is contained in:
Scott Miles
2012-10-23 17:17:28 -07:00
parent 952630e6bc
commit a8310922e5

View File

@@ -250,6 +250,7 @@ license that can be found in the LICENSE file.
// probably better to insert another link in the prototype chain
p.utils = utils;
p.setPropertySilently = setPropertySilently;
p.fireEvent = fireEvent;
// install our prototype
this.generatedConstructor.prototype = p;
};
@@ -290,6 +291,11 @@ license that can be found in the LICENSE file.
}
};
var fireEvent = function(inType, inDetail) {
return this.dispatchEvent(new CustomEvent(inType,
{bubbles: true, detail: inDetail}));
};
// collect utils
var utils = {