NoroffFEU / yeetsheet

1 stars 4 forks source link

Safe eval #67

Closed petternikolai closed 3 months ago

petternikolai commented 3 months ago

This commit adds the basic functionality for running code in the codeEditor. It includes a click event handler for the run button, which retrieves the code from the editor and evaluates it. The result is then displayed in the corresponding cell identified by the cellId. Additionally, a safeEval function is introduced to evaluate the code using a Web Worker, ensuring a secure execution environment. This implementation improves the user experience by allowing them to execute their code directly within the codeEditor.