@appboxo/web-sdk 1.4.0 → 1.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -15
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -16,13 +16,7 @@ const sdk = new AppboxoWebSDK({
|
|
|
16
16
|
const authCode = await fetch('/api/auth-code').then(r => r.json());
|
|
17
17
|
sdk.setAuthCode(authCode);
|
|
18
18
|
|
|
19
|
-
// Mount miniapp
|
|
20
|
-
await sdk.mount({
|
|
21
|
-
container: document.getElementById("miniapp"),
|
|
22
|
-
url: "https://your-miniapp.com"
|
|
23
|
-
});
|
|
24
|
-
|
|
25
|
-
// Or let SDK fetch URL from API automatically
|
|
19
|
+
// Mount miniapp (SDK will automatically fetch URL from API)
|
|
26
20
|
await sdk.mount({
|
|
27
21
|
container: document.getElementById("miniapp")
|
|
28
22
|
});
|
|
@@ -331,14 +325,7 @@ function App() {
|
|
|
331
325
|
### Using mount helper
|
|
332
326
|
|
|
333
327
|
```typescript
|
|
334
|
-
//
|
|
335
|
-
await sdk.mount({
|
|
336
|
-
container: '#miniapp-container',
|
|
337
|
-
url: 'https://miniapp.com',
|
|
338
|
-
className: 'miniapp-iframe'
|
|
339
|
-
});
|
|
340
|
-
|
|
341
|
-
// Or fetch URL from API automatically
|
|
328
|
+
// SDK will automatically fetch miniapp URL from API
|
|
342
329
|
await sdk.mount({
|
|
343
330
|
container: '#miniapp-container',
|
|
344
331
|
className: 'miniapp-iframe'
|