mirror of
https://github.com/facebook/react.git
synced 2025-11-01 09:12:30 +00:00
Add canUseEventListeners to ExecutionEnvironment.
This commit is contained in:
+3
@@ -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.
|
||||
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user