Git Product home page Git Product logo

Comments (3)

aslushnikov avatar aslushnikov commented on April 28, 2024 2

Phantom's evaluateAsync is a totally different beast, (which is not needed in our case since most of puppeteer's api's return promises). This is a good argument towards removing puppeteer's evaluateAsync - to avoid confusion.

Though, do we want to match the Phantom API as much as possible?

I think we want to strike a good balance between having a familiar API while not missing the opportunity to improve. So if there are a few options to implement X and there is no clear winner, we should pick the one which is more familiar for phantom users.

from puppeteer.

aslushnikov avatar aslushnikov commented on April 28, 2024

Guys, I would appreciate your feedback on this! cc @ebidel @paulirish @dgozman

from puppeteer.

ebidel avatar ebidel commented on April 28, 2024

FWIW, from our experience w/ Lighthouse, lots of the code we've needed to eval in the page needs to be wrapped in a promise. Basically, anything non-trivial the user will be doing. Also, most of the web platform APIs have moved towards promises, so devs are used to dealing with them. async/await only make things easier.

I like the idea of one method. Simplify + keep things async. Though, do we want to match the Phantom API as much as possible? It might be easier to transition existing users.

from puppeteer.

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.