salvadordf / WebView4Delphi

WebView4Delphi is an open source project created by Salvador Díaz Fau to embed Chromium-based browsers in applications made with Delphi or Lazarus/FPC for Windows.
https://www.briskbard.com/forum/
MIT License
282 stars 59 forks source link

BrowserHostAppCommunication demo is broken after loading form in IDE #10

Closed lhengen closed 2 years ago

lhengen commented 2 years ago

-DefaultURL property is introduced with a value of about:blank when form is loaded into IDE form designer. Consequently, demo does not navigate to the expected content. Fixed by resetting DefaultURL to an empty string prior to navigation call. I assume this is more desirable than changing TWVBrowserBase.Create to use an empty string instead of URI_ABOUTBLANK

salvadordf commented 2 years ago

Thanks for the PR!

I just reverted the default value of TWVBrowser.DefaultURL to an empty string and that fixes the root of this issue.

Thanks again for taking time to fix this demo.