Files
2023-12-27 02:46:24 -08:00

23 lines
636 B
HTML

<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>IIFE Global example</title>
</head>
<body>
Open your console
</body>
<!-- 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"))
})
</script>
</html>