diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000..6f3a291 --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,3 @@ +{ + "liveServer.settings.port": 5501 +} \ No newline at end of file diff --git a/Komal_Dua/editor.js b/Komal_Dua/editor.js new file mode 100644 index 0000000..350c4a5 --- /dev/null +++ b/Komal_Dua/editor.js @@ -0,0 +1,12 @@ +function run(){ + let htmlCode = document.querySelector(".container #html").value; + let cssCode = ""; + let jsCode = document.querySelector(".container #js").value; + let output = document.querySelector(".output-code #output"); + // console.log(htmlCode, cssCode, jsCode, output); + output.contentDocument.body.innerHTML = htmlCode + cssCode; + output.contentWindow.eval(jsCode); +} +document.querySelector(".container #html").addEventListener("keyup", run); +document.querySelector(".container #css").addEventListener("keyup", run); +document.querySelector(".container #js").addEventListener("keyup", run); \ No newline at end of file diff --git a/Komal_Dua/index.html b/Komal_Dua/index.html new file mode 100644 index 0000000..eba1bad --- /dev/null +++ b/Komal_Dua/index.html @@ -0,0 +1,33 @@ + + +
+ + + +