ANN: Easy Edge (Chromium) ver 2.01 released!

SDK: 1.0.2210.55

The browser extension API
Developers would like to ensure a browser extension is installed so that they may take advantage of the functionality the extension is providing. https://github.com/MicrosoftEdge/WebView2Feedback/blob/main/specs/Extensions.md

NEW: AreBrowserExtensionsEnabled environment option/template prompt: enable/disable browser extensions.
NEW: TBrowserExtensionManager class: allows to install, remove, enable, get a browser extension.
NEW: OnBrowserExtensionsChanged event.
NEW: Browser extensions example.

Default script locale
ScriptLocale property is to specify the default script locale. It sets the default locale for all Intl JavaScript APIs and other JavaScript APIs that depend on it, namely Intl.DateTimeFormat() which affects string formatting like in the time/date formats. CoreWebView2ControllerOptions.ScriptLocale Property (Microsoft.Web.WebView2.Core) | Microsoft Learn

NEW: ScriptLocale environment option/template prompt.

Exceptions
NEW: OnExceptionThrown event: provides an info about thrown handled exception. The info contains exception type, message, hresult, source, and stack trace.

TCookieManager class
FIX: GetCookies method didn’t work in Release mode.

This release is available, free of charge, to all customers who have an active maintenance and support subscription plan.

More info and DEMO at
http://www.ingasoftplus.com/ProductDetail.php?ProductID=304

2 Likes

2 useful browser extensions: Markdown viewer and AdBlock.

  1. Markdown viewer
    Download latest markdown-viewer-v5.2.zip and unzip. In the EasyEdgeDemo.exe open Browser extensions form, press Install, and select a folder which contains manifest.json file (usually it is extension’s root folder, “markdown-viewer” in this case). You should see that “Markdown Viewer” extension appears in the extensions list, now you can view formatted md files in Web browser window.
  2. AdBlock
    Download latest AdBlock-MS-Edge-v2.13.0.0.zip, repeat the steps from above.
1 Like

Is it possible with Easy Edge to create a bitmap from the currently loaded file/page?

I’m thinking about using Easy Edge as a PDF viewer, and I would like to programmatically create an image of the first page of the PDF, to show it in a Clarion image control as a preview.

Carlos,

Yes it is possible.

Hello Mike,

I’ve just installed EasyEdgeChromium 2.02 on my Clarion10 and I’m trying to get the EasyEdgeDemo app to run.

FIXED: My version of CJSON on this version of C10 was from 2018. I downloaded the latest version from 4/11/2024 and the app now compiles and runs!

I’ve had a brief play around with the example app provided and it is super impressive!

1 Like

I’m trying to use EasyEdgeChromium in a C6.3 application using the WebBrowser extension on a window and I’m getting an error on build…

Unresolved External SHGetFolderPathA in claedge.obj

Can someone please tell me how to fix that?

TIA

Which build of C6.3 are you trying? In some of them WIN32.LIB contains SHGetFolderPathA declaration (C6.3.9058 for example), in some of them it doesn’t.

Thanks Mike, this particular install is C6.3Build .9059

I think I might have 9058 somewhere?

c6-win32ext.zip (204 Bytes)

Hi,

I also had this problem.

Solution:
Add the attached lib file in your C6 project.

Best regards
Jeffrey

Thank you Jeffrey! That did it!

Geoff,

WIN32.lib from any Clarion 7+ should work.

Thanks Mike, I will try that.

I tried Win32.lib from my C10 install and it produced duplicate symbol errors in a bare bones app…

Duplicate symbol: UpdateLayeredWindow
Duplicate symbol: DefSubclassProc
Duplicate symbol: RemoveWindowSubclass
Duplicate symbol: SetWindowSubclass
Duplicate symbol: CoInitializeEx

But Jeffrey’s file works fine.

Hi Mike, or anyone else that can help…

I figured out what the problem is, see below if interested.

Using Clarion 6.3, last Friday I created a bare bones ABC application consisting of a Window and the EasyEdge browser, it compiled and ran fine, opening the specified web page.

Now something has happened and if I recompile the application and run it, it exits the application before the window is opened, with no errors.

Using very basic debugging I have found that it gets to this section of code and no further…

edge1.Init                            PROCEDURE(*TClaEdgeEnvironmentOptions pOptions, WINDOW pWin, SIGNED pFeq)
! Start of "DerivedInit_2 DATA"
! [Priority 5000]

! End of "DerivedInit_2 DATA"
  CODE
  ! Start of "DerivedInit_2 CODE"
  ! [Priority 5000]
  ! End of "DerivedInit_2 CODE"
  ! <-- Gets here, but no further
  RETURN PARENT.Init(pOptions, pWin, pFeq)
  ! [Priority 9995]
! End of "Local Procedures"

If I restore the exe I created on Friday it still runs fine but if I recompile it the new exe fails.

The EasyEdge demo app compiled in C10 still compiles and runs fine so I think my environment is OK.

I have restored my C6 installation and restored my development folder, both from last Friday, and I still can’t compile my test app.

Any suggestions as to what the problem might be?

Additional Information…

Just to add to this, if I restore my backup development folder from last Friday the exe runs fine.

If I copy that exe into a copy of the development folder in which I have recompiled the app it doesn’t run. So maybe compiling the app is now making a change to the development folder that causes the exe to no longer run?

Solution:
Microsoft.Web.WebView2.WinForms.dll seems to be getting deleted when I compile the app. Restoring it to the development folder enables the exe to run!

I probably need to read the help to find out why this is happening?

The template copies 4 dlls from the default BIN subfolder (Clarion7+/Accessory/Bin or Clarion6.3/3rdParty/Bin) or from the subfolder specified in “DLLs location” global entry. If a file doesn’t exist in the subfolder, you should see the generation error “File full_path_dll not found.”

Thanks Mike,
For some reason this is not working in C6.3 and Microsoft.Web.WebView2.WinForms.dll doesn’t get copied although the other 3 files do get copied.
I have modified the template so that %CopyFile GROUP doesn’t delete the file before copying and I have changed the #RUN to …

#RUN('cmd.exe /c echo f | xcopy "'& %SrcFullPath &'" "'& %DestFullPath &'" /S /Y'),WAIT

…removing the /D switch, which for some reason now enables all 4 files to be copied!?

The /Y switch should mean that the…

#REMOVE(FULLNAME('.\'&%pFilename))

…isn’t necessary?

I also don’t think FILEEXISTS() is working in the 6.3 template, but it is not affecting this code.

Also there is “Do not copy DLLs” global template options.

1 Like