Run HTML, JS, CSS with JS
Mafee7
Posted on February 26, 2021
Q: How to run Run HTML, JS, CSS with JS?
Ans: BLOB!
Can Be Used As File eg: src="outputFileUrl"
Use Code:
var codeText = ``; // Some Code In HTML/JS/CSS
var outputFileUrl = URL.createObjectURL(new Blob([codeText], {
// Can Use Any File Type
type: "application/javascript" // - For JS, "text/html" For HTML, "text/css" for CSS
}));
Possible Uses: **
1) **Code Editor
2) Editing JS After Page Loads.
3) Many More!
See My Example: CodePan
💖 💪 🙅 🚩
Mafee7
Posted on February 26, 2021
Join Our Newsletter. No Spam, Only the good stuff.
Sign up to receive the latest update from our blog.