Exciting news!Announcing our $4.6M Series Seed. Learn more
Socket
LoveBlogFAQ
Install
Log in

@satumjs/async-override

Package Overview
Dependencies
2
Maintainers
1
Versions
22
Issues
File Explorer

Advanced tools

@satumjs/async-override

override async for sandbox

    0.1.3-rc.0latest

Version published
Maintainers
1
Yearly downloads
1,371

Weekly downloads

Readme

Source

@satumjs/async-override

NPM version NPM downloads LICENSE Install size

override async for sandbox

Usage

// 用于行内代码,生成 fakeUrl 用于缓存等 getFileFakeUrl(fileName:string, appName?:string): string // 改写 fetch 方法 satumMicroFetchFactory( data: IMicroApp | { system: IActorSystem, appName?: string }, fetch?: typeof fetch, ): (req: string | RequestInfo, options?: RequestInit) => Promise<Response | undefined> // 改写 ajax 类 satumMicroFetchFactory( data: IMicroApp | { system: IActorSystem, appName?: string }, customAjaxClass?: typeof XMLHttpRequest, ): XMLHttpRequest // 改写 document.createElement 方法 satumMicroCreateElementFactory( data: IMicroApp | { system: IActorSystem, appName?: string }, createElement?: typeof document.createElement, fakeWinName?: string, // window 对象上 沙箱的 property ): (tagName: keyof HTMLElementTagNameMap, options?: ElementCreationOptions) => HTMLElement | null
Socket

Product

Subscribe to our newsletter

Get open source security insights delivered straight into your inbox. Be the first to learn about new features and product updates.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc