Download Now
Forums

    Reference TWSWebInspector

    Declared in Codebot.WebKit.Controls.Win.pas on line 120

    TWSWebInspector hosts the developer tools of a browser control.
    WebView2 can only show its developer tools in a window of their own, so the inspector control has a web view of its own which shows the developer tools page of the browser. That page is served by the debugging server of WebView2, which listens on a local port that only programs on the same computer can reach. The server is only started when a program creates an inspector control, and when it is not running Open shows the developer tools in a window of their own instead.
      TWSWebInspector = class(TWin32WSWinControl)
      published
        class function CreateHandle(const AWinControl: TWinControl; const AParams: TCreateParams): HWND; override;
        class procedure DestroyHandle(const AWinControl: TWinControl); override;
        class procedure ShowHide(const AWinControl: TWinControl); override;
        { Resize the web view to the client area of the control }
        class procedure UpdateBounds(AWinControl: TWinControl);
        class procedure Open(AWinControl, ABrowser: TWinControl);
        class procedure Close(AWinControl, ABrowser: TWinControl);
      end;