add calls param to iframe call multiple functions on start

pull/5370/head
Jeremy Theintz 2 years ago committed by Aniket
parent 567d33399a
commit 076e09f047
  1. 19
      apps/remix-ide/src/app.js

@ -410,6 +410,25 @@ class AppComponent {
this.appManager.call(...callDetails).catch(console.error)
}
}
if (params.calls) {
const calls = params.calls.split("///");
// call all functions in the list, one after the other
for (const call of calls) {
const callDetails = call.split("//");
if (callDetails.length > 1) {
this.appManager.call(
"notification",
"toast",
`initiating ${callDetails[0]} ...`
);
// @todo(remove the timeout when activatePlugin is on 0.3.0)
await this.appManager.call(...callDetails).catch(console.error);
}
}
}
})
.catch(console.error)
}

Loading…
Cancel
Save