logo
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
use crate::engine::d2::{subsystem::WebSystem, web::WebView};

pub struct DummyWeb;

impl DummyWeb {
    pub fn new() -> Self {
        Self {}
    }
}

impl WebSystem for DummyWeb {
    fn create_view(&self, x: f32, y: f32, width: f32, height: f32) -> Box<dyn WebView> {
        panic!("Web.createView is unsupported in this environment, check the `supported` flag.");
    }

    fn is_supported(&self) -> bool {
        false
    }

    fn open_browser(&self, url: String) {
        // Nothing
    }
}