Embedding JS (JavaScript) into Luau in Old Roblox (2007)
Via the eval function and a little bit of DHTML magic, I was able to get the JavaScript evaluate function to work in Luau. The eval function has an extra error handling parameter (similar to the xpcall function), and an option to disable during garbage collection, to ensure that no memory leaks or unwanted CPU usage occurs. Note that a lot of JS methods are heavily restricted due to the sandboxing of the eval function in JS. There is no way I can get around this, so things like creating windows via eval is not possible. Also, the DHTML functionality in Roblox is heavily outdated, so the browser that is used to run the DHTML is also extremely outdated (I think it's IE7). This means that many methods, keywords, operators, etc. are not included in this version of JS. Let me know in the comment section if you want the source code released for this. This isn't completely finished, as I have yet to fix all glitches with the code.
Via the eval function and a little bit of DHTML magic, I was able to get the JavaScript evaluate function to work in Luau. The eval function has an extra error handling parameter (similar to the xpcall function), and an option to disable during garbage collection, to ensure that no memory leaks or unwanted CPU usage occurs. Note that a lot of JS methods are heavily restricted due to the sandboxing of the eval function in JS. There is no way I can get around this, so things like creating windows via eval is not possible. Also, the DHTML functionality in Roblox is heavily outdated, so the browser that is used to run the DHTML is also extremely outdated (I think it's IE7). This means that many methods, keywords, operators, etc. are not included in this version of JS. Let me know in the comment section if you want the source code released for this. This isn't completely finished, as I have yet to fix all glitches with the code.