Skip to content

armgit / moli

Public Imported from GitHub
0

Best headless browser for AI agents. Lite, Fast, High-Compatibility. Built in Rust

359 B
Raw Blame
use super::*;
use crate::util::get_private_value;

pub(in crate::native_bridge::document) fn attr_state_object<'s>(
    scope: &mut v8::PinScope<'s, '_>,
    attr: v8::Local<'s, v8::Object>,
) -> Option<v8::Local<'s, v8::Object>> {
    get_private_value(scope, attr, ATTR_STATE_SLOT)
        .and_then(|value| v8::Local::<v8::Object>::try_from(value).ok())
}