Giter VIP home page Giter VIP logo

Comments (4)

joeldenning avatar joeldenning commented on May 30, 2024 1

Thanks @corwinm. #59 fixes the problem with custom events and i've confirmed that the javascript api for import map overrides works in IE11. The UI for import map overrides almost works in IE11 with a custom events polyfill, but it appears that preact might have a part that doesn't support IE11 so adding new modules to override didn't work for me.

from import-map-overrides.

joeldenning avatar joeldenning commented on May 30, 2024

import-map-overrides is compiled by babel before being published to npm. See https://cdn.jsdelivr.net/npm/[email protected]/dist/import-map-overrides.js, which shows that there are no template strings in the published code. Specifically, the line you linked to is compiled to the following, which does not contain template strings:

setTimeout((function(){var t="import-map-overrides:".concat(e),n=o?new CustomEvent(t):document.createEvent(t);window.dispatchEvent(n)}

I'm pretty confident that the javascript API for import-map-overrides works in IE11 (I used it a few weeks ago), but I think the UI for it might be broken (haven't tested it in a while). Could you provide more specific details about any errors/problems you see, and whether they apply to the UI or the JS API for import-map-overrides? I am on limited internet connection with a Macbook and cannot easily test IE11 right now.

from import-map-overrides.

corwinm avatar corwinm commented on May 30, 2024

Ran into this one today.

The problem is actually with the fallback document.createEvent(). According to https://caniuse.com/customevent you need to also call e.initCustomEvent(...) on the event created.
If you are in a hurry for a workaround you can try to pollyfill from MDN https://developer.mozilla.org/en-US/docs/Web/API/CustomEvent/CustomEvent#polyfill

I would even possibly prefer the pollyfill as a long term solution over a fix for the library, but that is just my opinion.

from import-map-overrides.

joeldenning avatar joeldenning commented on May 30, 2024

Fix released in https://github.com/joeldenning/import-map-overrides/releases/tag/v2.4.1

from import-map-overrides.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.