mirror of
https://github.com/pjh456/OxideJS.git
synced 2026-10-25 03:01:12 +08:00
fix: String 三方法 RegExp 抛错、pad 改码元口径与 legacy receiver 窗口
This commit is contained in:
@@ -60,7 +60,8 @@ fn is_regexp_obj<H: VmHost>(val: JsValue, vm: &H) -> bool {
|
||||
|
||||
/// IsRegExp 口径判定:非对象 false;对象一律 Get(@@match) 后 ToBoolean
|
||||
/// (真 RegExp 亦读,getter 副作用可观测;getter 抛错恢复原异常上抛)。
|
||||
fn is_regexp_live<H: VmHost>(vm: &mut H, val: JsValue) -> Result<bool, JsValue> {
|
||||
/// 供正则匹配族与 includes/startsWith/endsWith 的 IsRegExp 前置判共用。
|
||||
pub(crate) fn is_regexp_live<H: VmHost>(vm: &mut H, val: JsValue) -> Result<bool, JsValue> {
|
||||
if !val.is_object() {
|
||||
return Ok(false);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user