0

I have a library file which named core.js . And also a script.js (runner\script.js). I have designed an UI with WinForms.This project is a simple JS based "programming language". In core.js , I have functions and objects . script.js saves text by the IDE and i have linked it and core.js in index.html (runner\index.html).When i run html file (runner\index.html) it works normally in chrome.But when i run it on WinForm (EasyCode IDE.exe) it does not work correctly. I have solved CSS problem. But can not solve JS.

GitHub link of project: Click here

  • You have problem when writing to registry when programs start with no admin rights. I don't know what is you goal, but if you want to manipulate with js and html locally I would suggest use of a local lightweight webserver like http://owin.org/html/spec/owin-1.0.html, and more modern webview like CEF Sharp. This IE control is only trouble. – MRsa Oct 20 '19 at 16:52
  • My goal is creating an IDE for my own simple "programming language".It gives output to an HTML file.And i want to show this output in webbrowser in winform.And also I have started it with administrator. – YunisHuseynzade Oct 20 '19 at 16:56
  • OK, When you test with chrome then it's OK. IE (web control in youd form) is causing problems: you get: SCRIPT1006: Expected ')'core.js (45,24). I would suggest to use some other control, maybe chroimum embedded https://github.com/cefsharp/CefSharp.MinimalExample – MRsa Oct 20 '19 at 17:06
  • is it possible to solve it in IE? (with any library or module and etc.) – YunisHuseynzade Oct 20 '19 at 17:31
  • [How can I get the WebBrowser control to show modern contents?](https://stackoverflow.com/a/38514446/7444103). More options: [Web browser control emulation issue (FEATURE_BROWSER_EMULATION)](https://stackoverflow.com/a/28626667/7444103) – Jimi Oct 20 '19 at 21:10

1 Answers1

0

If you are eager that this works in old IE webviev control, you should remove default params from all functions in js, etc:

function getDate(format="dmy",seperator="/"){

should be

function getDate(format,seperator){ 
        format = format || 'dmy';
        seperator = seperator || "/";

same for all lambda functions, etc:

setBackImg:(imgurl,size = "cover")=>{

should be:

setBackImg: function (imgurl,size) {
    size = size || "cover";

and ** does not exists in IE:

power:(int1,int2)=>{
return int1**int2;
},

must be:

power: function (int1,int2) {
        return Math.pow(int1,int2);
    },

You could also try to find IE pollyfils for ES5 and ES6.

MRsa
  • 666
  • 4
  • 8