Add canUseEventListeners to ExecutionEnvironment.

This commit is contained in:
cpojer
2014-02-04 15:09:41 -08:00
parent 9730759322
commit a21979404c
+3
View File
@@ -34,6 +34,9 @@ var ExecutionEnvironment = {
canUseWorkers: typeof Worker !== 'undefined',
canUseEventListeners:
canUseDOM && (window.addEventListener || window.attachEvent),
isInWorker: !canUseDOM // For now, this is true - might change in the future.
};