Skip to content

IE11 #2

@xiaohutai

Description

@xiaohutai

Some code used will not work in IE11. I suggest using Babel in your workflow.

Spread Operator

-let options = {
-    icon: icon,
-    title: item.title
-};
+let options  = item;
+options.icon = icon;

Template Literals

Use String concatenation instead.

-marker.bindPopup(`
-    <h2>${item.title}</h2>
-    <p>${item.description}</p>
-    <a href='${item.link}'>Read more</a>
-`);
+let html = '<h2>' + item.title + '</h2>';
+html    += '<p>' + item.description + '</p>';
+html    += '<a href="' + item.link + '">Read more</a>';
+marker.bindPopup(html);

Or rather duplicate from a DOM element (note: this may be slower).
This is assuming you don't already use something like React or Vue.

Fetch

Use a polyfill: https://github.com/github/fetch and https://github.github.io/fetch/

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestwontfixThis will not be worked on

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions