Skip to content

Commit

Permalink
await import
Browse files Browse the repository at this point in the history
  • Loading branch information
steve02081504 committed Jun 9, 2023
1 parent 57606fa commit c382ba8
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 0 deletions.
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,12 @@
<script src="https://cdn.jsdelivr.net/gh/ukatech/jsstp-lib@v1.1.0.0/jsstp.js"></script>
```

你也可以在js中动态载入jsstp

```javascript
var jsstp=await import("https://cdn.jsdelivr.net/gh/ukatech/jsstp-lib@v1.1.0.0/jsstp.mjs").then(m=>m.jsstp);
```

### 2. 使用

```javascript
Expand Down
6 changes: 6 additions & 0 deletions README_CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,12 @@
<script src="https://cdn.jsdelivr.net/gh/ukatech/jsstp-lib@v1.1.0.0/jsstp.js"></script>
```

你也可以在js中动态载入jsstp

```javascript
var jsstp=await import("https://cdn.jsdelivr.net/gh/ukatech/jsstp-lib@v1.1.0.0/jsstp.mjs").then(m=>m.jsstp);
```

### 2. 使用

```javascript
Expand Down
6 changes: 6 additions & 0 deletions README_EN.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,12 @@ See [ukagaka](https://en.wikipedia.org/wiki/Ukagaka)&[SSTP](http://ssp.shillest.
<script src="https://cdn.jsdelivr.net/gh/ukatech/jsstp-lib@v1.1.0.0/jsstp.js"></script>
```

You can also load jsstp dynamically in js

```javascript
var jsstp=await import("https://cdn.jsdelivr.net/gh/ukatech/jsstp-lib@v1.1.0.0/jsstp.mjs").then(m=>m.jsstp);
```

### 2. Use

```javascript
Expand Down
6 changes: 6 additions & 0 deletions README_JP.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,12 @@ Webページでゴーストと通信し、情報をやりとりするためにjs
<script src="https://cdn.jsdelivr.net/gh/ukatech/jsstp-lib@v1.1.0.0/jsstp.js"></script>
```

jsstpはjsで動的に読み込むことも可能です。

```javascript
var jsstp=await import("https://cdn.jsdelivr.net/gh/ukatech/jsstp-lib@v1.1.0.0/jsstp.mjs").then(m=>m.jsstp);
```

### 2.使用する

```javascript
Expand Down

0 comments on commit c382ba8

Please sign in to comment.