[Cocoa] Add SPI to check if a WKWebView has an inspector frontend
[WebKit-https.git] / Source / WebKit / UIProcess / API / Cocoa / WKWebView.mm
index 8e1d53d..cf1919c 100644 (file)
@@ -6957,6 +6957,11 @@ static WebCore::UserInterfaceLayoutDirection toUserInterfaceLayoutDirection(UISe
     _resolutionForShareSheetImmediateCompletionForTesting = resolved;
 }
 
+- (BOOL)_hasInspectorFrontend
+{
+    return _page && _page->hasInspectorFrontend();
+}
+
 - (_WKInspector *)_inspector
 {
     if (auto* inspector = _page->inspector())