added support for initializing from execution

This commit is contained in:
dcore94 2024-02-02 17:45:04 +01:00
parent a087e4904f
commit 4f3a892eeb
1 changed files with 8 additions and 4 deletions

View File

@ -16,15 +16,19 @@ class CCPExecutionForm extends HTMLElement{
this.connectNewExecutionRequest()
this.render()
const params = new URLSearchParams(window.location.search)
if(params.get('method')){
if(params.get('execution')){
const execution = { id : params.get('execution') }
this.prepareFromExecution(execution)
} else if(params.get('method')){
this.#method = params.get('method')
this.loadMethod()
}
this.render()
} else {
this.showMethod()
}
}
static get observedAttributes() {
return ["method"];