Skip to content

Problem IE11 #8

Description

@jripa

IE 11 have Problems take a forEach method on NodeList. Resolve them by add this to main.js

    function NodeListToArray(nl) {
          for(var a=[], l=nl.length; l--; a[l]=nl[l]);
         return a;
     }

and
var items = menuEl.querySelectorAll('.menu__item');
items = Array.isArray(items) ? items : NodeListToArray(items);

		items.forEach(function(itemEl, iPos) { ...

and

                   var links = menuEl.querySelectorAll('.menu__link');
                    **links = Array.isArray(links) ? links : NodeListToArray(links);**
                    
		links.forEach(function(linkEl, lPos) {

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions