File tree 1 file changed +12
-8
lines changed
packages/react-devtools-extensions/src 1 file changed +12
-8
lines changed Original file line number Diff line number Diff line change @@ -135,14 +135,18 @@ if (sessionStorageGetItem(SESSION_STORAGE_RELOAD_AND_PROFILE_KEY) === 'true') {
135
135
// We need to inject this code because content scripts (ie injectGlobalHook.js) don't have access
136
136
// to the webpage's window, so in order to access front end settings
137
137
// and communicate with React, we must inject this code into the webpage
138
- if ( 'text/html' === document . contentType ) {
139
- injectCode (
140
- ';(' +
141
- installHook . toString ( ) +
142
- '(window))' +
143
- saveNativeValues +
144
- detectReact ,
145
- ) ;
138
+ switch ( document . contentType ) {
139
+ case 'text/html' :
140
+ case 'application/xhtml+xml' : {
141
+ injectCode (
142
+ ';(' +
143
+ installHook . toString ( ) +
144
+ '(window))' +
145
+ saveNativeValues +
146
+ detectReact ,
147
+ ) ;
148
+ break ;
149
+ }
146
150
}
147
151
148
152
if ( typeof exportFunction === 'function' ) {
You can’t perform that action at this time.
0 commit comments