Skip to content

Commit

Permalink
update examples
Browse files Browse the repository at this point in the history
  • Loading branch information
justjake committed Dec 27, 2023
1 parent fcae312 commit 175920a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion examples/esmodule.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

<!-- Import from a ES Module CDN -->
<script type="module">
import { getQuickJS } from "https://esm.sh/[email protected].10"
import { getQuickJS } from "https://esm.sh/[email protected].11"
const QuickJS = await getQuickJS()
console.log(QuickJS.evalCode("1+1"))
</script>
Expand Down
8 changes: 6 additions & 2 deletions examples/iife-global.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,12 @@
<body>
Open your console
</body>
<script src="../packages/quickjs-emscripten/dist/index.global.js" type="text/javascript"></script>
<!-- Then use in a script tag -->
<!-- Add a script tag to load the library as the QJS global -->
<script
src="https://cdn.jsdelivr.net/npm/[email protected]/dist/index.global.js"
type="text/javascript"
></script>
<!-- Then use the QJS global in a script tag -->
<script type="text/javascript">
QJS.getQuickJS().then((QuickJS) => {
console.log(QuickJS.evalCode("1+1"))
Expand Down

0 comments on commit 175920a

Please sign in to comment.