Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
    Serge Zaitsev
    @zserge
    Ok, a few more questions then.
    • What kind of examples would you prefer for webview? One example per feature? "Kitchen-sink" style example? Some meaningful app example, like todo app or calculator?
    • How do you build/package your webview apps? E.g. how do you set icons, bundle it all together etc? I know with C/C++ CMake does most of it. With Go it's more of a manual process.
    Ah, also if you are using webview for standalone GUI apps - what JS framework do you use for the frontend? React? Vue? jQuery? GopherJS maybe?
    Christian Muehlhaeuser
    @muesli
    i usually prefer many small examples that are easy to grasp
    one examplatory app that combines the individual components to a meaningful thing (todo-mvc) is nice, though
    personally, i'm either using cmake or hacking together my own Makefile
    when it comes to JS frameworks, i'm still committed to ember fwiw
    Serge Zaitsev
    @zserge
    Hm... Seems like I have to deal with a big variety of frameworks for webview.
    I personally use React or rather Preact, a lighter alternative. I ensured that it workes in webview using Babel.js. I also added Vue.js because that seems to be on the rise.
    Yet, I see many users stick with jQuery, some use Polymer (which doesn't work well with webview yet), you prefer Ember, and I'm sure there are Angular users.
    I don't know whether I should provide examples for each of those.
    Christian Muehlhaeuser
    @muesli
    i'm not sure i'd take that on me
    i'd explain the basic integration and assume that webview's users bring enough experience to the table to transfer that to their personal choice of framework
    Fugiman
    @Fugiman
    Heya, really been enjoying this library so far. Made it trivial to add a GUI and keeps my binary small :) I'm using Go on Windows and seem to have run into an issue. If I open a Dialog (Error Alert) it seems to hang the main thread when I press "OK" on the dialog, which prevents my Terminate call from working. Has anybody else experienced this?
    Serge Zaitsev
    @zserge
    Correct, that's that the dialogs are for. They are modal, they block UI thread until closed. I think you should find the same behavior on GTK and Cocoa as well. To keep UI independent from the dialog you may consider using various HTML5 dialogs rendered inside your webview.
    Fugiman
    @Fugiman
    Sorry I don't think I was clear. They are blocking the UI thread even after I close it
    Serge Zaitsev
    @zserge
    Hm.. That's a bug. Can you give a minimal reproducible example please?
    Fugiman
    @Fugiman
    oh boy I went to write a reproducer and the reproducer works. I'll file an issue after I spend a few days getting a minimal example :P
    Serge Zaitsev
    @zserge
    Ok, thank you
    Fugiman
    @Fugiman
    Nevermind, restarted my computer and now it doesn't hang. Sorry for the false alarm
    Serge Zaitsev
    @zserge
    Ok. That's good news. We don't have a good test suite yet to cover all the functionality on all the platforms, so there might be issues. Feel free to report if you find anything new!
    Silas Baronda
    @silasb
    Awesome project so far. Is there an easy way to bind methods in nested structs?
    Serge Zaitsev
    @zserge
    @silasb Sorry, I don't think so. The good news is that there is a single callback for all JS messages, so it is possible to build your own Go-to-JS bindings using that callback and webview.Eval().
    Or just wrap all the methods in some top-level structure.
    Silas Baronda
    @silasb
    Ended up doing a couple methods on a struct and got it working how I wanted. Now I'm having trouble getting the UI to get updated from a goroutine. From my understanding we can't do background evals.
    Serge Zaitsev
    @zserge
    @silasb Correct, webview is single-threaded, but there is webview.Dispatch(func() { ... }) method that allows to post a function to a UI thread from some background thread.
    Silas Baronda
    @silasb
    Awesome, didn't know I could call that anywhere.
    Serge Zaitsev
    @zserge

    There are some big (breaking) changes coming. I will make a blog post soon, but here's some brief info.

    I'm adding CEF browser engine. It currently works fine on linux. Once CEF is done I will look deeper at adding Edge if that's possible at all. And we will be done with all modern browser engines.

    Since it's becoming very hard to maintain webview - I'll make an API to expose native window handle and allow to pass your own window (or container) handle to embed a webview into.
    This means that various API functions such as setting background color or window icon or resizing window or borderless/transparent windows etc will be all gone and will not be parts of this library.
    I think we should make a wiki where all such code snippets would be stored. But they will not provided by the core library and it's up to the app developer to ensure that they work or to tweak them to his/her needs.
    Even dialogs will be moved to a separate module and will not be part of the core webview library. They will still be in a separate header file and still includes in the Go package. I'm making this exception because I believe it's a very frequent feature. Same applies to webview_set_title - I believe that every app needs to set a window title, so it remains. Everything else is to be removed and related issues closed as wontfix.

    I'm sorry about this, but I'd rather have a small focused library with good code quality and automated test coverage than a bloated monster full of features that are seldomly used. If someone needs a transparent window - please implement it, test it and make a wiki page documenting your steps. Webview is all about running HTML5/JS inside a native app window. It's not about customizing the native window or interacting with the OS (tray or notifications). At least, not at the moment when I'm a single maintainer with a fulltime job. I hope you will understand.

    Also for the programming languages, as I have mentioned earlier, I'll keep first-class C/C++/Go support and will leave the rest to the other bindings maintainers. I was hoping to integrate it all in one repo, but I'm afraid it's beyond my capabilities.
    Fugiman
    @Fugiman
    You mentioned borderless/transparent windows above. Is that something currently supported?
    Serge Zaitsev
    @zserge
    No, but it's something currently requested - zserge/webview#97
    Serge Zaitsev
    @zserge
    I believe that at the moment it would better to move such features into separate one-file-per-feature C headers and probably describe them in the wiki somehow. Then ones who need such feature would be able to integrate it and provide feedback, while the core library would remain small and focused. I would really love to cover core library with end-to-end tests and better unit tests. Unfortunately, if all requested features were to be implemented in the core library - the amount of tests (a test per feature per OS per language/compiler) would grow up exponentially and I won't be able to maintain it.
    Fugiman
    @Fugiman
    Yeah I absolutely understand that
    Alice Heaton
    @aliceh75
    Hello :) I was curious about the cost of making a Go invocation from Javascript, and having that in turn modify data in the webview, so I made some tests. Nothing unexpected, but always better to test than to assume: https://aliceh75.github.io/measuring-delay-when-using-webview-with-go
    Fedor Lapshin
    @FedorLap2006
    hello @zserge !
    aolko
    @aolko
    hi there
    question - can i have webview, but with webview anywhere (bundled)?
    Vince Pike
    @vthg2themax
    Can you get the width or height of the monitor?
    WarpspeedSCP
    @WarpspeedSCP
    hi, if I get redirected within the webview, is there a way to extract the redirected url?
    Ahmed Abd El Mawgood
    @oddcoder
    hello world
    If I am to start new gui project in rust
    Would you advise using the master branch or the x branch
    amreisa
    @amreisa
    @zserge where the .*dll
    amreisa
    @amreisa
    @zserge Where the Src for .dll ?
    I mean the Src for *.dll ?
    iori
    @matsumonkie
    Hello everyone! New user to webview here. I have a quick question, is there any way I can disable CORS browser restriction with webview ?
    Webview fit perfectly the needs for my app except for that so far, and I couldn't find a settings to disable this :-(
    iori
    @matsumonkie
    sorry, I wrote CORS but meant same origin policy
    lixiansen1991yy
    @lixiansen1991yy
    为什么在MAC下创建APP,分辨率很低,很模糊???
    amreisa
    @amreisa
    I need to work with with old IE. For project will work in old system. Any help about that ?
    Josias
    @justjosias

    @amreisa
    It appears that IE is planned to be not supported in the future according to @zserge:

    For each window toolkit there exists at least one corresponding browser engine. For GTK and Cocoa it's Webkit. For Win32 it's either MSHTML (aka IE), or EdgeHTML (since Windows 10), or Edge/Chromium (Windows 7/10, but needs to be installed separately as of now).
    I suggest to drop the support of MSHTML, since it's not only hard to maintain, but also hard to use, as it does not match the expectations of a modern web developer.
    webview/webview#305

    baxrob
    @baxrob
    @amresia, you can use https://github.com/webview/webview/tree/0.1.1 which is the final version of the previous C/MSHTML webview
    amreisa
    @amreisa
    Thanks @baxrob
    Tobi
    @tobq
    Are there any docs for webview? Can't get edge working - crashes on startup