Skip to content

Commit

Permalink
Look for devtools global hook
Browse files Browse the repository at this point in the history
It doesn't exist yet, but it could.

This also ensures we actually do our polyfill checks in *all* browsers,
not just Chrome.
  • Loading branch information
zpao committed Oct 9, 2014
1 parent 36b091b commit 6ddf8de
Showing 1 changed file with 11 additions and 7 deletions.
18 changes: 11 additions & 7 deletions src/browser/ui/React.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 6ddf8de

Please sign in to comment.