mirror of
https://github.com/pjh456/OxideJS.git
synced 2026-10-23 18:21:13 +08:00
feat: 新增 Symbol.species well-known symbol 绑定(Symbol.species 解析/键槽/内建对象)
This commit is contained in:
@@ -949,6 +949,8 @@ pub fn well_known_symbol_id<H: VmHost + ?Sized>(host: &H, ptr: *mut JsObject) ->
|
||||
Some(8)
|
||||
} else if std::ptr::eq(ptr, world.sym_to_string_tag.as_ptr()) {
|
||||
Some(9)
|
||||
} else if std::ptr::eq(ptr, world.sym_species.as_ptr()) {
|
||||
Some(10)
|
||||
} else {
|
||||
None
|
||||
}
|
||||
@@ -967,6 +969,7 @@ pub fn well_known_symbol_name(id: u32) -> Option<&'static str> {
|
||||
7 => "Symbol.matchAll",
|
||||
8 => "Symbol.asyncIterator",
|
||||
9 => "Symbol.toStringTag",
|
||||
10 => "Symbol.species",
|
||||
_ => return None,
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user