OutSystems / CefGlue

.NET binding for The Chromium Embedded Framework (CEF)
MIT License
271 stars 41 forks source link

the browser in the program displays a blank page without triggering the LoadStart event. #122

Closed baimindong closed 1 month ago

baimindong commented 11 months ago

I use CefGlue.Avalonia in Debian 10. the AvaloniaCefBrowser in the program displays a blank page without triggering the LoadStart event.

this is CefGlue code :

internal sealed class ActionTask : CefTask { private Action _action; public ActionTask(Action action) { _action = action; }

    protected override void Execute()
    {
        _action();
        _action = null;
    }

    public static void Run(Action action, CefThreadId threadId = CefThreadId.UI)
    {
        CefRuntime.PostTask(threadId, new ActionTask(action));
    }
}

I found that: CefRuntime.PostTask(threadId, new ActionTask(action)) the code was executed and returned true, but the code in the Action was not executed.

joaompneves commented 11 months ago

This project is not yet compatible with Linux. There's an open PR, but according to the PR original creator it seems that its not working: https://github.com/OutSystems/CefGlue/pull/121

baimindong commented 11 months ago

@joaompneves Thank you very much for reply. I found cpf.cef , It is another open-source component, using CefGlue90. It works fine with Linux. It's sourcecode link address is : https://gitee.com/csharpui/cpf.cef . But it works on CPF, not Avalonia. CPF is a DotNet UI framework too.

I uploaded a example demo : http://202.85.210.133/cpf_cef_demo.zip

It need cef 90.6.5: https://cef-builds.spotifycdn.com/index.html#windows32:90.6.5%2Bg7a604aa%2Bchromium-90.0.4430.93 Download as needed windows32 / windows64 / Or linux x64 .....