feat: 绑定全局 escape/unescape 与缺失全局桩函数

This commit is contained in:
爱特每羊队
2026-06-14 17:21:38 +08:00
parent a31d22cd3f
commit 4c3a5830c9
7 changed files with 203 additions and 12 deletions
@@ -0,0 +1,18 @@
use std::sync::Arc;
use oxide_kernel::kernel::{KernelCore, KernelSession};
use oxide_types::object::JsObject;
use crate::bindings::apply_binding_table;
pub fn bind_global(core: &Arc<KernelCore>, session: &KernelSession, global: &mut JsObject) {
apply_binding_table(
session.builtin_world(),
global,
core,
&[
("escape", crate::builtins::global::js_escape as *const (), 1),
("unescape", crate::builtins::global::js_unescape as *const (), 1),
],
);
}