Skip to content

Commit

Permalink
Appkit webview loadhtml (#38)
Browse files Browse the repository at this point in the history
Signed-off-by: Tony Gorez <[email protected]>
  • Loading branch information
tony-go authored Nov 18, 2024
1 parent 29f42f1 commit f76b85a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions example/hello_world/hello_world.cc
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ class App : public sourcemeta::native::Application {
window.size(1200, 900);
window.show();

// webview.load_html("index.html");
webview.load_url("https://sourcemeta.com");
webview.load_html("index.html");
// webview.load_url("https://sourcemeta.com");
window.add(webview);

this->exit();
Expand Down
2 changes: 1 addition & 1 deletion src/ui/webview/appkit/webview_appkit.mm
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,6 @@ void load_url(const std::string &url) {
error:nil];

WKWebView *webview = internal_->get_webview();
[webview loadHTMLString:html baseURL:bundle.bundleURL];
[webview loadHTMLString:html baseURL:[bundle resourceURL]];
}
} // namespace sourcemeta::native

0 comments on commit f76b85a

Please sign in to comment.