mirror of
https://github.com/pjh456/OxideJS.git
synced 2026-10-24 18:51:13 +08:00
docs: 添加 Rustdoc 注释
This commit is contained in:
@@ -5,6 +5,7 @@ use oxide_kernel::kernel::{KernelCore, KernelSession};
|
||||
use oxide_types::object::JsObject;
|
||||
use oxide_types::value::JsValue;
|
||||
|
||||
/// 把 JSON 单例对象及其方法(parse/stringify 等)绑定到 global。
|
||||
pub fn bind_json(core: &Arc<KernelCore>, session: &KernelSession, global: &mut JsObject) {
|
||||
let json_ptr = session.builtin_world().json_object.as_ptr() as *mut JsObject;
|
||||
let json = unsafe { &mut *json_ptr };
|
||||
|
||||
Reference in New Issue
Block a user