Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

All JS errors are "Script errors" when using SetHtml() #898

Open
weberc2 opened this issue Jan 27, 2023 · 0 comments
Open

All JS errors are "Script errors" when using SetHtml() #898

weberc2 opened this issue Jan 27, 2023 · 0 comments

Comments

@weberc2
Copy link

weberc2 commented Jan 27, 2023

What OS are you using (uname -a, or Windows version)?

Darwin 21.1.0 Darwin Kernel Version 21.1.0: Wed Oct 13 17:33:23 PDT 2021; root:xnu-8019.41.5~1/RELEASE_X86_64 x86_64

What programming language are you using (C/C++/Go/Rust)?

go version go1.19.5 darwin/amd64

What did you expect to see and what you saw instead?

Errors should be logged to the console with full information; instead I just get "script error". This works correctly when I run a webserver on 127.0.0.1:8080 and use Navigate("http://localhost:8080"), suggesting the issue is that SetHtml is not actually setting the location correctly.

I suspect this is the offending code (specifically, the nullptr passed as the final argument, which should probably be something like http://localhost/):

  void set_html(const std::string &html) {
    webkit_web_view_load_html(WEBKIT_WEB_VIEW(m_webview), html.c_str(),
                              nullptr);
  }
@weberc2 weberc2 changed the title SetHtml() should set the location parameter in underlying call to webkit_web_view_load_html() All JS errors are "Script errors" when using SetHtml() Jan 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant