mirror of
https://github.com/facebook/react.git
synced 2026-11-18 20:15:56 +00:00
Look for devtools global hook
It doesn't exist yet, but it could. This also ensures we actually do our polyfill checks in *all* browsers, not just Chrome.
This commit is contained in:
1 parent
36b091bc44
commit
6ddf8de5ae
1 file changed
+11
-7
+11
-7
@@ -107,13 +107,17 @@ var React = {
|
||||
|
||||
if (__DEV__) {
|
||||
var ExecutionEnvironment = require('ExecutionEnvironment');
|
||||
if (ExecutionEnvironment.canUseDOM &&
|
||||
window.top === window.self &&
|
||||
navigator.userAgent.indexOf('Chrome') > -1) {
|
||||
console.debug(
|
||||
'If you haven\'t already, download the React DevTools for a better ' +
|
||||
'development experience: http://fb.me/react-devtools'
|
||||
);
|
||||
if (ExecutionEnvironment.canUseDOM && window.top === window.self) {
|
||||
|
||||
// If we're in Chrome, look for the devtools marker and provide a download
|
||||
// link if not installed.
|
||||
if (navigator.userAgent.indexOf('Chrome') > -1 &&
|
||||
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ === 'undefined') {
|
||||
console.debug(
|
||||
'If you haven\'t already, download the React DevTools for a better ' +
|
||||
'development experience: http://fb.me/react-devtools'
|
||||
);
|
||||
}
|
||||
|
||||
var expectedFeatures = [
|
||||
// shims
|
||||
|
||||
Reference in new issue
Block a user