-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Labels
enhancementNew feature or requestNew feature or requestwontfixThis will not be worked onThis will not be worked on
Description
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
Labels
enhancementNew feature or requestNew feature or requestwontfixThis will not be worked onThis will not be worked on