Coder Social home page Coder Social logo

Comments (6)

yungsters avatar yungsters commented on April 28, 2024

In retrospect, I should never have implemented a runtime counterpart to idx (if even just for demonstration). It has enabled too many people to use it without the babel-plugin-idx. 👎

I'm sorry that this has prevented you from making progress. For now, the fastest path forward will probably be to add support for your new error messages here: https://github.com/facebookincubator/idx/blob/master/packages/idx/src/idx.js#L62

But if you have someone who you're working with at Flipkart, we should strongly encourage them to adopt babel-plugin-idx (which might also improve their runtime performance).

from idx.

davidben avatar davidben commented on April 28, 2024

Perhaps idx could wrap its first argument in a Proxy that does the undefined check on lookup, returning rewrapped values to keep going. Then you call the user-supplied function, and unwrap the result to return.

You may need to feature-detect support and fallback to error regexes, but it should leave newer browsers unconstrained.

from idx.

yungsters avatar yungsters commented on April 28, 2024

Either suggestion seems fine to me. I would even be fine with changing idx to throw an error message stating that babel-plugin-idx has not been enabled.

But I probably won't be able to improve the polyfill anytime soon. I can help review pull requests, though.

from idx.

yungsters avatar yungsters commented on April 28, 2024

@miketaylr, were you able to resolve the matter with Flipkart by using babel-plugin-idx?

from idx.

yungsters avatar yungsters commented on April 28, 2024

Closing this out due to inactivity.

Feel free to open a new issue if you or anyone would like to revive the discussion about doing away with the runtime implementation.

from idx.

bzbarsky avatar bzbarsky commented on April 28, 2024

To loop back on this, we discovered that other sites (e.g. lego.com; see https://bugzilla.mozilla.org/show_bug.cgi?id=1512401) were also running into the same issue. So it's not just Flipkart.

At this point what would probably need to happen is fixing the library, then finding and fixing all the sites that use it. :(

from idx.

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.