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:
Paul O’Shannessy committed 2014-10-09 11:24:48 -07:00
1 parent 36b091bc44
commit 6ddf8de5ae
1 file changed
+11 -7
+11 -7
View File
@@ -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