Skip to content
This repository was archived by the owner on May 18, 2026. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,9 @@ jobs:
steps:
- uses: actions/checkout@v4
- name: install nightly
uses: dtolnay/rust-toolchain@nightly
uses: dtolnay/rust-toolchain@master
with:
toolchain: nightly-2025-07-01
- name: install webkit2gtk
run: |
sudo apt-get update -y -q
Expand Down
6 changes: 3 additions & 3 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2000,7 +2000,7 @@ pub enum MemoryUsageLevel {
#[cfg(target_os = "windows")]
pub trait WebViewExtWindows {
/// Returns WebView2 Controller
fn controller(&self) -> ICoreWebView2Controller;
fn controller(&self) -> Option<ICoreWebView2Controller>;

/// Changes the webview2 theme.
///
Expand Down Expand Up @@ -2028,8 +2028,8 @@ pub trait WebViewExtWindows {

#[cfg(target_os = "windows")]
impl WebViewExtWindows for WebView {
fn controller(&self) -> ICoreWebView2Controller {
self.webview.controller.clone()
fn controller(&self) -> Option<ICoreWebView2Controller> {
self.webview.controller()
}

fn set_theme(&self, theme: Theme) -> Result<()> {
Expand Down
Loading
Loading