mirror of
https://github.com/XRPLF/xrpl-dev-portal.git
synced 2025-11-22 12:45:50 +00:00
Clarified preload.js description in Step 4
This commit is contained in:
@@ -694,6 +694,10 @@ client.on("transaction", async (transaction) => {
|
|||||||
4. In `view/preload.js`, add the following code at the bottom of `exposeInMainWorld()`:
|
4. In `view/preload.js`, add the following code at the bottom of `exposeInMainWorld()`:
|
||||||
|
|
||||||
```javascript
|
```javascript
|
||||||
|
contextBridge.exposeInMainWorld('electronAPI', {
|
||||||
|
onUpdateLedgerData: (callback) => {
|
||||||
|
ipcRenderer.on('update-ledger-data', callback)
|
||||||
|
},
|
||||||
onEnterAccountAddress: (address) => {
|
onEnterAccountAddress: (address) => {
|
||||||
ipcRenderer.send('address-entered', address)
|
ipcRenderer.send('address-entered', address)
|
||||||
},
|
},
|
||||||
@@ -706,6 +710,7 @@ onUpdateTransactionData: (callback) => {
|
|||||||
ipcRenderer.on('update-transaction-data', callback)
|
ipcRenderer.on('update-transaction-data', callback)
|
||||||
}
|
}
|
||||||
// Step 4 code additions - end
|
// Step 4 code additions - end
|
||||||
|
})
|
||||||
```
|
```
|
||||||
|
|
||||||
5. Modify `view/template.html` by adding a new fieldset below the ones that are already there:
|
5. Modify `view/template.html` by adding a new fieldset below the ones that are already there:
|
||||||
|
|||||||
Reference in New Issue
Block a user