Recent

Author Topic: edgebrowser package  (Read 8499 times)

Vingadero

  • New Member
  • *
  • Posts: 44
Re: edgebrowser package
« Reply #15 on: May 26, 2021, 07:03:17 pm »
Hi guys,

That would be amazing to have a port for Lazarus...
Meanwhile I found a port to Delphi Community Edition at https://torry.net/authorsmore.php?id=7915

Maybe this can be used for a Lazarus port too...

Best regards,

alaa123456789

  • Sr. Member
  • ****
  • Posts: 260
  • Try your Best to learn & help others
    • youtube:
Re: edgebrowser package
« Reply #16 on: May 26, 2021, 08:25:30 pm »
Hi guys,

That would be amazing to have a port for Lazarus...
Meanwhile I found a port to Delphi Community Edition at https://torry.net/authorsmore.php?id=7915

Maybe this can be used for a Lazarus port too...

Best regards,
need someone who can help with it
Regards

FLLSilva

  • New Member
  • *
  • Posts: 11
Re: edgebrowser package
« Reply #17 on: January 24, 2024, 09:33:55 pm »
Hi all,

it will be great add-on to Lazarus IDE.


Hi!

No - it wont be a great add-on.

As Embarcado writes the component relies on two M$-packages.
So it is Windows only.

This is against  the Lazarus idea "write once compile anywhere".


TEdgeBrowser can be linked to Microsoft technology, but in Lazaruz not everything that is created is meant to be compiled everywhere, each project has its particularities and exclusivity.

In Lazaruz the counterpart to EdgeBrowser would be CEF, but it also links everything to a series of external dependencies. While Edge links to a single DLL, CEF links to more than 20 files that need to be distributed together.

I believe that a component using technology A or B is not a demerit for anyone, and if something is only good if it is compatible with all types of systems, it ends up limiting the language because it cannot exploit 100% of the resources of any platform. .

Code portability between different platforms should be a goal, but never a rule.

But it's just my opinion.  ;)

Fibonacci

  • Sr. Member
  • ****
  • Posts: 419
Re: edgebrowser package
« Reply #18 on: January 24, 2024, 10:18:46 pm »
it will be great add-on to Lazarus IDE.
This is against  the Lazarus idea "write once compile anywhere".
Code portability between different platforms should be a goal, but never a rule.

Write once, COMPILE ANYWHERE, not RUN ANYWHERE 8)

KodeZwerg

  • Hero Member
  • *****
  • Posts: 2066
  • Fifty shades of code.
    • Delphi & FreePascal
Re: edgebrowser package
« Reply #19 on: January 25, 2024, 03:26:26 am »
Besides that ... {$IfDef MSWindows} WebView2 check, use this or fall back ... etc
Like many basic units are using.
« Last Edit: Tomorrow at 31:76:97 xm by KodeZwerg »

Thaddy

  • Hero Member
  • *****
  • Posts: 14373
  • Sensorship about opinions does not belong here.
Re: edgebrowser package
« Reply #20 on: January 25, 2024, 12:57:45 pm »
TEdgeBrowser can be linked to Microsoft technology,
Edge uses Google technology under windows 10/11 since 2020, so 4 years and a few days. Just make CEF work with Edge.
The latest Edge versions are based on Chromium..... So CEF should at least partially work.
See: https://support.microsoft.com/en-us/microsoft-edge/download-the-new-microsoft-edge-based-on-chromium-0f4a3dd7-55df-60f5-739f-00010dba52cf

And that is not opinion, but fact..

(fun fact: I updated one of my laptops - a sturdy hand that keeps chewing boring data -  this week to Windows 11... and it completely removed any traces of internet explorer automagically. Guess what? All my internet explorer code is screwed... Note this was done under a ms developers license, so may not apply to regular distributions)

[edit]
Microsoft did not change the core CEF interfaces.
Microsoft even states that you can use CEF with Edge. Of course Edge has additional features that are not exposed in CEF.
[edit some more]
I just tested CEF to Edge and that works, although I did not use a component for that.
« Last Edit: January 25, 2024, 01:40:27 pm by Thaddy »
Object Pascal programmers should get rid of their "component fetish" especially with the non-visuals.

salvadordf

  • New Member
  • *
  • Posts: 47
    • BriskBard
Re: edgebrowser package
« Reply #21 on: January 25, 2024, 09:05:51 pm »
If anyone needs to use WebView2 in Lazarus try WebView4Delphi :
https://github.com/salvadordf/WebView4Delphi

WebView2 only supports Windows at this moment but there are plans to add Linux and macOS support :
https://github.com/MicrosoftEdge/WebView2Feedback/issues/645
https://github.com/MicrosoftEdge/WebView2Feedback/issues/1314

If you need to embed a Chromium browser in Windows, Linux and macOS now then you can use CEF4Delphi :
https://github.com/salvadordf/CEF4Delphi
Maintainer of the CEF4Delphi, WebView4Delphi, WebUI4Delphi and WebUI4CSharp projects

KodeZwerg

  • Hero Member
  • *****
  • Posts: 2066
  • Fifty shades of code.
    • Delphi & FreePascal
Re: edgebrowser package
« Reply #22 on: January 25, 2024, 10:23:25 pm »
@salvadordf amazing, webview4delphi works straight out of the box, integrates wonderful into the palette and demos show beautiful how to use it
many many kudos <3

a question/request i do have, is it possible that i could switch to a dark mode style/theme?
« Last Edit: Tomorrow at 31:76:97 xm by KodeZwerg »

PierceNg

  • Sr. Member
  • ****
  • Posts: 374
    • SamadhiWeb
Re: edgebrowser package
« Reply #23 on: January 26, 2024, 02:24:48 am »
Take a look at fpwebview, an FPC FFI to webview, which is a wrapper for Cocoa/WebKit on macOS, gtk-webkit2 on Linux, and Edge on Windows.

Haven't implemented Lazarus component/control, meaning no point/click/drag/drop on a form from within Lazarus IDE, but the library is usable with Lazarus widget set. The demo lclembed embeds a webview in a Lazarus application.

The library works on Linux, macOS and Windows.

salvadordf

  • New Member
  • *
  • Posts: 47
    • BriskBard
Re: edgebrowser package
« Reply #24 on: January 26, 2024, 09:15:52 am »
@salvadordf amazing, webview4delphi works straight out of the box, integrates wonderful into the palette and demos show beautiful how to use it
many many kudos <3
a question/request i do have, is it possible that i could switch to a dark mode style/theme?

Add this code line before the GlobalWebView2Loader.StartWebView2 call :
Code: Pascal  [Select][+][-]
  1. GlobalWebView2Loader.BlinkSettings  := 'forceDarkModeEnabled';
Maintainer of the CEF4Delphi, WebView4Delphi, WebUI4Delphi and WebUI4CSharp projects

KodeZwerg

  • Hero Member
  • *****
  • Posts: 2066
  • Fifty shades of code.
    • Delphi & FreePascal
Re: edgebrowser package
« Reply #25 on: January 26, 2024, 03:22:14 pm »
That trick works perfect easy, again many many thanks for your hard work and sharing it!!!  :-* :-* :-*
To show, compared against my first image, now its dark  :D
« Last Edit: Tomorrow at 31:76:97 xm by KodeZwerg »

 

TinyPortal © 2005-2018