Giter Club home page Giter Club logo

Comments (7)

mrjacobbloom avatar mrjacobbloom commented on July 1, 2024

There's an ownKeys handler: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Proxy/handler/ownKeys

Might be able to find a solution to #14 that complements this one

from echo.

mrjacobbloom avatar mrjacobbloom commented on July 1, 2024

What if simply getting global.Echo didn't trigger an autolog, but instead it waited until the first call/construct/get? Could just change the condition from maxTokensLength > 0 to 1.

Only makes sense if we've already figured out how to disable autocomplete

Breaks most trivial usage of Echo, which could lead to confusion

from echo.

mrjacobbloom avatar mrjacobbloom commented on July 1, 2024

There's an ownKeys handler

DevTools doesn't use the ownKeys handler, it hooks into v8 to inspect the object directly :/

from echo.

mrjacobbloom avatar mrjacobbloom commented on July 1, 2024

Does Chrome even still eager-eval Echo?

It does not, and afaict adding side-effects to the internal Echo function causes no change in functionality

from echo.

mrjacobbloom avatar mrjacobbloom commented on July 1, 2024

Autocomplete seems to stop after a construct (potentially also a call) -- or does it? Maybe there's a way to take advantage of that?

It looks like autocomplete decides whether something has side effects based solely on the token types: https://github.com/ChromeDevTools/devtools-frontend/blob/e43879a5a25ec7bfaaedeb1e4d860181db696d09/front_end/formatter_worker/FormatterWorker.js#L463 Autocomplete is aborted if the expression contains anything that is not one of the "safe" types 'MemberExpression', 'Identifier', 'BinaryExpression', 'Literal', 'TemplateLiteral', 'TemplateElement', 'ObjectExpression', 'ArrayExpression', 'Property', 'ThisExpression'

from echo.

mrjacobbloom avatar mrjacobbloom commented on July 1, 2024

It looks like throwing an error could abort autocomplete -- is there a way to throw an error during the get handler without disrupting functionality?

from echo.

mrjacobbloom avatar mrjacobbloom commented on July 1, 2024

Oh god now new versions of Node (I'm playing with 14.15) do autocomplete too and it's so much worse in a CLI

from echo.

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.