Giter Site home page Giter Site logo

Comments (4)

jacogr avatar jacogr commented on September 18, 2024

The issue with events are that extensions may or may not be available in the user's environment - so you cannot fire and hope for a response. I have never seen this on the polkadot-js sample version and I believe it is due to this -

https://github.com/polkadot-js/extension/blob/master/packages/extension/manifest.json#L20

So with the above the extension should run before anything else, hence not seeing that exact same issue. There is certainly a gap to improve the loading experience (i.e. run at document load), but it will need some tweak/playing on both the -dapp & -inlect sides.

Not 100% sure what it would look like, potentially something along these lines -

#129 (comment)

i.e. the promise wait for the loaded event, hopes that everything is done at that point and then queries. (Will need some playing). If you have any explicit ideas on what works for your specific case, a PR would also be welcome.

(Would love to make sure it works for all users and all extension developers in 100% of the cases)

from extension.

yuzhiyou1990 avatar yuzhiyou1990 commented on September 18, 2024

I've used "run_at": "document_start" in manifest.json file.

from extension.

jacogr avatar jacogr commented on September 18, 2024

@yuzhiyou1990 Did the problem just "disappear"? I would still like to have a more robust solution - whatever that may be. (So as indicated, will actually play with load options and see (a) how to make it not work & (b) what can be done to solve it)

from extension.

polkadot-js-bot avatar polkadot-js-bot commented on September 18, 2024

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue if you think you have a related problem or query.

from extension.

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.