mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2026-09-29 09:38:12 +08:00
Define the js wasm-editor interface (#31)
This commit is contained in:
committed by
Keavon Chambers
parent
1b8c71d2b3
commit
d254916430
@@ -0,0 +1,23 @@
|
||||
mod utils;
|
||||
mod viewport;
|
||||
mod window;
|
||||
|
||||
use wasm_bindgen::prelude::*;
|
||||
|
||||
#[wasm_bindgen]
|
||||
extern "C" {
|
||||
fn alert(s: &str);
|
||||
}
|
||||
|
||||
#[wasm_bindgen(start)]
|
||||
pub fn init() {
|
||||
utils::set_panic_hook();
|
||||
alert("Hello, Graphite!");
|
||||
}
|
||||
|
||||
/// Send events
|
||||
#[wasm_bindgen]
|
||||
pub fn handle_event(event_name: String) {
|
||||
// TODO: add payload
|
||||
todo!()
|
||||
}
|
||||
Reference in New Issue
Block a user