Comments (4)
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 -
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.
I've used "run_at": "document_start" in manifest.json file.
from extension.
@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.
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)
- Background task with manifest v3 not working on chrome HOT 5
- Support for latest LedgerGeneric in common
- Suddenly no access from account HOT 1
- Manifest v3 sometime doesn't init extension HOT 4
- `Unknown status code: 28160` when connecting ledger HOT 2
- Subscribed Accounts don't update when authorizations are added/removed HOT 2
- Change the extension name to "P.JS Developer Signer" HOT 1
- Help me, please. I can't log in to my account HOT 21
- can not connect to `polkadot.js` extension HOT 4
- Deriving Account Doesn't Work HOT 7
- Will this add function as a wallet, at least display balance? HOT 2
- Polkadot account creation button does not work! HOT 8
- CI workflow for checking diffs HOT 1
- Enhance UI by adding a `Connect Accounts` button in conjunction with `Connected` HOT 1
- No way to determine whether `web3Enable` was fired or not in case of rejected authorization HOT 6
- Attempting to use a disconnected port HOT 3
- Ensure Generic Ledger Accounts can use "Allow use on any chain" HOT 2
- Can't create an account using google chrome extention HOT 4
- polkadot-js extension stopped working with non-polkadot ledger apps HOT 14
- Add Ledger Settings Dropdown to popups
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from extension.