@@ -49,6 +49,7 @@ type Config = {|
4949 supportsNativeInspection ? : boolean ,
5050 supportsReloadAndProfile ? : boolean ,
5151 supportsProfiling ? : boolean ,
52+ supportsViewSource ? : boolean ,
5253| } ;
5354
5455export type Capabilities = { |
@@ -124,6 +125,7 @@ export default class Store extends EventEmitter<{|
124125 _supportsNativeInspection: boolean = false ;
125126 _supportsProfiling: boolean = false ;
126127 _supportsReloadAndProfile: boolean = false ;
128+ _supportsViewSource: boolean = true ;
127129
128130 // Total number of visible elements (within all roots).
129131 // Used for windowing purposes.
@@ -155,13 +157,15 @@ export default class Store extends EventEmitter<{|
155157 supportsNativeInspection,
156158 supportsProfiling,
157159 supportsReloadAndProfile,
160+ supportsViewSource,
158161 } = config ;
159162 if ( supportsCaptureScreenshots ) {
160163 this . _supportsCaptureScreenshots = true ;
161164 this . _captureScreenshots =
162165 localStorageGetItem ( LOCAL_STORAGE_CAPTURE_SCREENSHOTS_KEY ) === 'true' ;
163166 }
164167 this . _supportsNativeInspection = supportsNativeInspection !== false ;
168+ this . _supportsViewSource = supportsViewSource !== false ;
165169 if ( supportsProfiling ) {
166170 this . _supportsProfiling = true ;
167171 }
@@ -361,6 +365,10 @@ export default class Store extends EventEmitter<{|
361365 return this . _supportsReloadAndProfile && this . _isBackendStorageAPISupported ;
362366 }
363367
368+ get supportsViewSource ( ) : boolean {
369+ return this . _supportsViewSource ;
370+ }
371+
364372 containsElement ( id : number ) : boolean {
365373 return this . _idToElement . get ( id ) != null ;
366374 }
0 commit comments