amaelftah/laravel-trix

IE 11 not supported

dvlpr91 opened this issue ยท 6 comments

error occured

...
for (var tag of laravelTrixInstanceStyles) {
...

what the for ... of

te7a-houdini/laravel-trix/resources/views/trixassets.blade.php

for (var tag of laravelTrixInstanceStyles) {
to
for (var tag in laravelTrixInstanceStyles) {

fixed in v2

Hey!!!!!!!!

fixed in v2.0.0.

But, it came back again in v2.0.1.

why?

@dvlpr91 it caused this issue #26

Did you change only "of" to "in"?

I am not good at English, so please understand that I am using a translator.

I write the code for normal operation below as much as possible.

FROM

...
for (var tag of laravelTrixInstanceStyles) {
  style.innerHTML += tag.textContent + ' ';
}
...

TO

...
for (var i = 0; i < laravelTrixInstanceStyles.length; i++) {
  style.innerHTML += laravelTrixInstanceStyles[i].textContent + ' ';
}
...

OR

for (var i in laravelTrixInstanceStyles) {
  if (i < laravelTrixInstanceStyles.length) {
      style.innerHTML += laravelTrixInstanceStyles[i].textContent + ' ';
  }
}

I didn't check, but I simply wrote the code, thinking about the difference between "in" and "of" in javascript.

Try it.

@dvlpr91 no problems . ok i got it now . i will reopen the issue and we can convert to normal for loop