docs: ?autoInit=false docs

This commit is contained in:
Simon
2026-05-11 19:28:49 +08:00
parent 35ab12a20a
commit f05bf68f61
3 changed files with 9 additions and 0 deletions

View File

@@ -53,6 +53,8 @@ Fastest way to try PageAgent with our free Demo LLM:
| Global | https://cdn.jsdelivr.net/npm/page-agent@1.8.1/dist/iife/page-agent.demo.js |
| China | https://registry.npmmirror.com/page-agent/1.8.1/files/dist/iife/page-agent.demo.js |
Add `?autoInit=false` to load the script without creating the demo agent automatically. You can then instantiate it with `new window.PageAgent(...)`.
### NPM Installation
```bash

View File

@@ -52,6 +52,8 @@
| Global | https://cdn.jsdelivr.net/npm/page-agent@1.8.1/dist/iife/page-agent.demo.js |
| China | https://registry.npmmirror.com/page-agent/1.8.1/files/dist/iife/page-agent.demo.js |
在 URL 后添加 `?autoInit=false` 可只加载脚本,不自动创建 Demo Agent之后可通过 `new window.PageAgent(...)` 手动初始化。
### NPM 安装
```bash

View File

@@ -58,6 +58,11 @@ export default function QuickStart() {
code={`<script src="DEMO_CDN_URL" crossorigin="true"></script>`}
language="html"
/>
<p className="text-sm text-gray-600 dark:text-gray-300 mb-3">
{isZh
? '在 URL 后添加 ?autoInit=false 可只加载脚本,不自动创建 Demo Agent之后可通过 new window.PageAgent(...) 手动初始化。'
: 'Add ?autoInit=false to load the script without creating the demo agent automatically. You can then instantiate it with new window.PageAgent(...).'}
</p>
<table className="w-full border-collapse text-sm">
<thead>
<tr className="border-b border-gray-200 dark:border-gray-700">