Download Now
Forums

    Reference Codebot.WebKit.Controls.pas

    Part of the Codebot WebKit package

    The Codebot.WebKit.Controls unit gives you TWebBrowser, a web browser control that embeds WebKitGTK on Linux and Microsoft Edge WebView2 on Windows.

    You can load a page by setting Location or calling Load, or show HTML of your own with LoadHtml. You can also stop and reload pages, move back and forward in the history, run JavaScript with ExecuteScript, zoom, make the page editable, print, capture the page to the clipboard, and show the developer tools. Changes you make before the control's window exists, such as setting Location, are kept and applied once the browser is ready.

    Its events tell you about the location, title, progress, and status of a page as it loads, as well as errors, the element under the mouse, context menus, and the alert, confirm, and prompt dialogs of JavaScript. OnNavigate lets you allow or deny each navigation.

    When the user downloads a file, it is saved to DownloadFolder, or to the user's download folder when that is empty. Each download is a TWebDownload in the Downloads list, and OnDownloadStart, OnDownloadProgress, and OnDownloadFinish let you follow it.

    The unit also gives you TWebInspector, a control that shows the developer tools of a browser inside your form when its WebBrowser is set and Active is True.

    The browser engine is loaded when your program runs rather than linked when it is built. If it is missing, the control shows a message instead of a page, and the TWebBrowser.Available class function returns False. At design time the controls show an icon and load nothing.

    On Windows a few features differ. You can only move one step back or forward at a time, HistoryItem returns False, and ZoomTextOnly has no effect.

    Items 168 items

    NameKindLine
    TCustomWebBrowserclass176
    ActiveDownloadFolderfunction349
    AddListenerprocedure357
    Availablefunction311
    BackOrForwardprocedure331
    BackOrForwardExistsfunction333
    CancelDownloadprocedure344
    CanGoBackfunction327
    CanGoForwardfunction329
    CaptureToClipboardprocedure355
    ClearDownloadsprocedure346
    CloseInspectorprocedure337
    Createconstructor307
    Destroydestructor308
    DestroyWndprocedure242
    DoContextMenuprocedure266
    DoEnterprocedure250
    DoErrorprocedure259
    DoHitTestprocedure265
    DoLoadStatusprocedure258
    DoLocationChangeprocedure262
    DoNavigateprocedure264
    DoProgressprocedure261
    DoScriptDialogprocedure268
    DoTitleChangeprocedure263
    Downloadprocedure342
    ExecuteScriptprocedure321
    GoBackprocedure323
    GoForwardprocedure325
    HasViewfunction254
    HistoryItemfunction340
    InitializeWndprocedure241
    Loadprocedure313
    LoadHtmlprocedure315
    Notificationprocedure243
    Paintprocedure245
    PaintWindowprocedure244
    Printprocedure351
    Reloadprocedure319
    RemoveListenerprocedure359
    Resizeprocedure249
    ShowInspectorprocedure335
    Stopprocedure317
    WSRegisterClassprocedure240
    ControlCanvasproperty256
    DeveloperToolsproperty278
    DownloadCountproperty367
    DownloadFolderproperty281
    Downloadsproperty369
    Editableproperty271
    HoverLinkproperty365
    Htmlproperty373
    HtmlDefinedproperty375
    Inspectorproperty363
    Loadingproperty379
    LoadStatusproperty377
    Locationproperty371
    OnContextMenuproperty291
    OnDownloadFinishproperty287
    OnDownloadProgressproperty285
    OnDownloadStartproperty283
    OnErrorproperty289
    OnHitTestproperty293
    OnLoadStatusChangeproperty295
    OnLocationChangeproperty297
    OnNavigateproperty301
    OnProgressproperty303
    OnScriptDialogproperty305
    OnTitleChangeproperty299
    Progressproperty381
    Titleproperty383
    ZoomFactorproperty273
    ZoomTextOnlyproperty275
    TWebBrowserclass388
    Alignproperty390
    Anchorsproperty391
    BorderSpacingproperty392
    Constraintsproperty393
    DeveloperToolsproperty402
    DownloadFolderproperty403
    Editableproperty396
    Enabledproperty394
    Locationproperty395
    OnContextMenuproperty407
    OnDownloadFinishproperty406
    OnDownloadProgressproperty405
    OnDownloadStartproperty404
    OnErrorproperty409
    OnHitTestproperty410
    OnLoadStatusChangeproperty411
    OnLocationChangeproperty412
    OnNavigateproperty414
    OnProgressproperty415
    OnScriptDialogproperty408
    OnTitleChangeproperty413
    TabOrderproperty397
    TabStopproperty398
    Visibleproperty399
    ZoomFactorproperty400
    ZoomTextOnlyproperty401
    TWebContextMenuEventprocedural95
    TWebDownloadclass132
    ErrorMessageproperty149
    FileNameproperty144
    Progressproperty146
    Statusproperty147
    Uriproperty142
    TWebDownloadEventprocedural158
    TWebDownloadStartEventprocedural155
    TWebDownloadStatusenum122
    dsActiveenum value124
    dsFinishedenum value126
    dsFailedenum value128
    TWebErrorEventprocedural90
    TWebHitTestset36
    TWebHitTestEventprocedural99
    TWebHitTestItemenum25
    htLinkenum value27
    htImageenum value29
    htMediaenum value31
    htSelectionenum value33
    htEditableenum value35
    TWebInspectorclass432
    Createconstructor460
    Destroydestructor461
    DestroyWndprocedure449
    InitializeWndprocedure448
    Notificationprocedure452
    Paintprocedure451
    PaintWindowprocedure450
    Resizeprocedure455
    WSRegisterClassprocedure447
    Activeproperty464
    Alignproperty465
    Anchorsproperty466
    BorderSpacingproperty467
    Constraintsproperty468
    ControlCanvasproperty458
    Enabledproperty469
    Visibleproperty470
    WebBrowserproperty472
    TWebLoadStatusenum44
    lsNoneenum value46
    lsStartedenum value48
    lsRedirectedenum value50
    lsCommittedenum value52
    lsFinishedenum value54
    lsFailedenum value56
    TWebNavigateActionenum38
    naAllowenum value40
    naDenyenum value42
    TWebNavigateEventprocedural103
    TWebNotifyenum66
    wnReadyenum value68
    wnLocationenum value70
    wnTitleenum value72
    wnProgressenum value74
    wnLoadStatusenum value76
    wnHoverenum value78
    wnDownloadenum value80
    TWebNotifyEventprocedural84
    TWebNotifyEventsarray85
    TWebProgressEventprocedural106
    TWebScriptDialogenum58
    sdAlertenum value60
    sdConfirmenum value62
    sdPromptenum value64
    TWebScriptDialogEventprocedural110