paritytech / parity-extension

Parity Chrome Extension
GNU General Public License v3.0
37 stars 14 forks source link

Add a full Web3 instance only if needed #51

Closed ngotchac closed 7 years ago

ngotchac commented 7 years ago

Fixes #50

Add a proxy to the Window web3 object. If the page tries to get a property from that have no value (so something else than currentProvider and the Object.prototype value), it loads Web3, create a new instance, and return the value from this instance.

@tomusdrw Not sure if we should restrain this trigger to only the know web3 keys (eth, db, net, etc.) or not ?