Skip to content

armgit / moli

Public Imported from GitHub
0

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

502 B
Raw Blame
use super::*;

pub(in crate::context_bootstrap) fn file_reader_constructor_callback<'s>(
    scope: &mut v8::PinScope<'s, '_>,
    args: v8::FunctionCallbackArguments<'s>,
    mut rv: v8::ReturnValue<'_, v8::Value>,
) {
    if !args.is_construct_call() {
        throw_type_error(
            scope,
            "Failed to construct 'FileReader': Please use the 'new' operator.",
        );
        return;
    }
    initialize_file_reader_object(scope, args.this());
    rv.set(args.this().into());
}