Skip to content

Anistick/EmbedScript

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

EmbedScript - a JavaScript based app that lets you embed types of scripts

EmbedScript works by grabbing all HTML elements with the <es> tag, their types, and parses the specified script type into a <script> or the main tag for that script.

Introduction

First, add the jsDelivr CDN.

<script async defer src="https://cdn.jsdelivr.net/gh/Anistick/[email protected]/latest.min.js"></script>

JavaScript embedding

To embed JavaScript, you need to use the <es> tag and pure-js type. An example is like so:

<es type="pure-js"></es>

Next, add your JavaScript code.

<es type="pure-js">
console.log("Hello, World!");
</es>

Python embedding

To embed Python, you still need to use the <es> tag (doesn't change) but using the py-script type. An example is like so:

<es type="py-script"></es>

Next, add your Python code:

<es type="py-script">
print("Hello, World!")
</es>

That's the basics! Python embedding uses PyScript. A demo of JavaScript is here. Python demo coming soon.

About

a JavaScript based app that lets you embed types of scripts

Resources

License

Stars

Watchers

Forks

Packages

No packages published