Web works with the js structure

This commit is contained in:
Jonathan Kelley committed 2024-03-05 11:16:34 -08:00
1 parent 16b38e339d
commit b751674354
16 files changed
+470 -325

No files matched your search

+6 -3
View File
@@ -2,8 +2,11 @@
#![doc(html_logo_url = "https://avatars.githubusercontent.com/u/79236386")]
#![doc(html_favicon_url = "https://avatars.githubusercontent.com/u/79236386")]
pub static INTERPRETER_JS: &str = include_str!("./js/native.js");
pub static COMMON_JS: &str = include_str!("./js/web.js");
/// The base class that the JS channel will extend
pub static INTERPRETER_JS: &str = include_str!("./js/core.js");
/// The code explicitly for desktop/liveview that bridges the eval gap between the two
pub static NATIVE_JS: &str = include_str!("./js/native.js");
#[cfg(all(feature = "binary-protocol", feature = "sledgehammer"))]
mod write_native_mutations;
@@ -25,7 +28,7 @@ pub mod minimal_bindings {
/// Some useful snippets that we use to share common functionality between the different platforms we support.
///
/// This maintains some sort of consistency between web, desktop, and liveview
#[wasm_bindgen(module = "/src/js/web.js")]
#[wasm_bindgen(module = "/src/js/common.js")]
extern "C" {
/// Set the attribute of the node
pub fn setAttributeInner(node: JsValue, name: &str, value: JsValue, ns: Option<&str>);