0

I have many functions that are created like this one:

function _campoForm({ id, tipo, regole, campiPerRiga, css, stile, eventi, parametri, abilitato, traduzione, visibile, modelKey, serverKey }) { ... }

If I try to run this code on IE, this errors occurs:

identifier expected

enter image description here

How can I resolve this without rewrite the entire code?

Thank you! :D

Hikari
  • 589
  • 7
  • 29
  • `{ id=id, tipo=tipo, regole=regole...}` – mplungjan Nov 02 '18 at 13:14
  • well if the browser does not support it, you either change your code or you transpile it with babel. – epascarello Nov 02 '18 at 13:15
  • @epascarello I have tried to use babel, but I could not make it work by following the guide on their site. – Hikari Nov 02 '18 at 13:17
  • 1
    Fyi, [Destructuring Assignment](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Destructuring_assignment#Browser_compatibility) is not supported in IE – Rajesh Nov 02 '18 at 13:19
  • @Hikari, can you show us which link you refer and what steps you followed to implement that babel. We can try to check it and try to provide suggestion for that, If anything implemented incorrectly. – Deepak-MSFT Nov 05 '18 at 06:09
  • @Deepak-MSFT Thank you. I have follow this steps https://babeljs.io/setup#installation (I have select "in the browser") then I have add to my HTML head --> – Hikari Nov 06 '18 at 14:38
  • @Deepak-MSFT Here the sample project --> https://ufile.io/12puo – Hikari Nov 06 '18 at 14:58
  • @Deepak-MSFT I have use this code and now works but is slower then without the scripts: and this message is write on console: You are using the in-browser Babel transformer. Be sure to precompile your scripts for production How can I fix this? – Hikari Nov 06 '18 at 15:39
  • @ Hikari, Please try to precompile the script and again try to make a test to check whether it solves the performnce issue or not. Let us know about your testing results. We will try to provide further suggestions, If needed. – Deepak-MSFT Nov 22 '18 at 06:39

0 Answers0