Skip to main content
Version: 24.38.0

FrameAddScriptTagOptions 接口

🌐 FrameAddScriptTagOptions interface

语法

🌐 Signature

export interface FrameAddScriptTagOptions

属性

🌐 Properties

属性

🌐 Property

修饰符

🌐 Modifiers

类型

🌐 Type

描述

🌐 Description

默认

🌐 Default

content

optional

string

要注入到框架中的 JavaScript。

🌐 JavaScript to be injected into the frame.

id

optional

string

设置脚本的 id

🌐 Sets the id of the script.

path

optional

string

要注入到框架中的 JavaScript 文件的路径。

🌐 Path to a JavaScript file to be injected into the frame.

附注

如果 path 是相对路径,则它是相对于当前工作目录(Node.js 中的 process.cwd())解析的。

🌐 If path is a relative path, it is resolved relative to the current working directory (process.cwd() in Node.js).

type

optional

string

设置脚本的 type。使用 module 来加载 ES2015 模块。

🌐 Sets the type of the script. Use module in order to load an ES2015 module.

url

optional

string

要添加的脚本的 URL。

🌐 URL of the script to be added.