GithubHelp home page GithubHelp logo

Comments (21)

stefanpenner avatar stefanpenner commented on May 18, 2024

@jakearchibald this is your call, tell me what you want and I'll make it happen

from es6-promise.

longlho avatar longlho commented on May 18, 2024

+1 for this :)

from es6-promise.

RReverser avatar RReverser commented on May 18, 2024

Totally +1

from es6-promise.

DavidBruant avatar DavidBruant commented on May 18, 2024

I load polyfills as inline scripts. I would love to have a drop-in script as well.

from es6-promise.

filaraujo avatar filaraujo commented on May 18, 2024

+1 for automatic declaration

from es6-promise.

jonathanong avatar jonathanong commented on May 18, 2024

+1

from es6-promise.

snellingio avatar snellingio commented on May 18, 2024

+1

from es6-promise.

jakearchibald avatar jakearchibald commented on May 18, 2024

@stefanpenner is there a downside to this I'm not seeing?

from es6-promise.

mariusGundersen avatar mariusGundersen commented on May 18, 2024

Isn't this the way that most polyfills work?

from es6-promise.

stefanpenner avatar stefanpenner commented on May 18, 2024

@jakearchibald no downside I am aware. Just provide a +1 or -1 and I'll doit.

from es6-promise.

guidokessels avatar guidokessels commented on May 18, 2024

+1

from es6-promise.

jakearchibald avatar jakearchibald commented on May 18, 2024

+1

The polyfill should take over if !(self.Promise && !Promise.cast), although we should provide a way to force-overwrite for cases like subclassing.

from es6-promise.

stefanpenner avatar stefanpenner commented on May 18, 2024

sounds good, which evergreen browser has cast ?

from es6-promise.

jakearchibald avatar jakearchibald commented on May 18, 2024

Just Safari (if you count that as evergreen). It's fixed in the nightlies though.

from es6-promise.

stefanpenner avatar stefanpenner commented on May 18, 2024

fixed in #69

from es6-promise.

yethee avatar yethee commented on May 18, 2024

cast is part of the specification?
How to prevent overriding the native Promise for the latest version of Firefox and Google Chrome?

from es6-promise.

indianburger avatar indianburger commented on May 18, 2024

So we use es6-promise in a javascript file that's a third part script on a page. Being a 3rd party script, we never modify the host page's native objects and this change makes it impossible for us to continue using es6-promise as is.

I wanted to check with you all before I create a fork. Do you have any suggestions for my use case? Would you be open to changing the polyfill behaviour somehow? I'm not super familiar with this code base, but I wonder if you can detect if the module is require'ed (browserify) then don't polyfill.

from es6-promise.

stefanpenner avatar stefanpenner commented on May 18, 2024

I wanted to check with you all before I create a fork. Do you have any suggestions for my use case? Would you be open to changing the polyfill behaviour somehow? I'm not super familiar with this code base, but I wonder if you can detect if the module is require'ed (browserify) then don't polyfill.

i don't mind shipping promise.polyfil.js (which would auto polyfil) and promise.js (which would be well behaved)

from es6-promise.

indianburger avatar indianburger commented on May 18, 2024

That would be really really sweet

from es6-promise.

stefanpenner avatar stefanpenner commented on May 18, 2024

That would be really really sweet

instead of forking, maybe you can contribute that ;)

from es6-promise.

indianburger avatar indianburger commented on May 18, 2024

Happy to give it a shot this weekend. Any pointers as I go through the code?

from es6-promise.

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.