mmenu IE11 problems

212 views Asked by At

I'm just using the mmenu script and I got an IE11 a syntax error on this line.

    "DOMContentLoaded", () => {

The whole code looks like here

document.addEventListener(
    "DOMContentLoaded", () => {
        new Mmenu( "#my-menu" );
    }
);

Code is out of the official documentation -> https://mmenujs.com/docs/core/

enter image description here

enter image description here

I tried some different solution i found with function(), etc. But non of them work for me. Maybe some one else got this problem and can help me out.

Update:

Now i got Object doesn't support property or method 'append' on IE11

document.addEventListener("DOMContentLoaded", function() {
    
        new Mmenu( "#menu", {
           "extensions": [
              "pagedim-black",
              "position-right"
           ],
           navbar : {
                title : " "
            },
           "navbars": [
              {
                 "position": "top",
                 "content": [
                    "prev",
                    "title"
                 ]
              },
              {
                 "position": "bottom",
                 "content": [
                    "<div class='navshort'></div>",
                 ]
              }
           ]
        });     

} );
1

There are 1 answers

1
ash On

as per mmenu doc, https://mmenujs.com/docs/

As of version 8, the mmenu.js plugin by default only supports ECMAScript 6 compliant browsers. For Internet Explorer 10 and 11, you'll need the JavaScript polyfills included in the package.

Version 7 should work in Internet Explorer 10 and 11 without any shortcomings, it should also work to some degree in Internet Explorer 9, but you'll need a matchMedia polyfill.

for IE 10 and 11 you need polyfills