class CCPExecutionForm extends HTMLElement{ #boot; #rootdoc; #data; #method; #executionmonitor; #serviceurl; constructor(){ super() this.#boot = document.querySelector("d4s-boot-2") this.#rootdoc = this.attachShadow({ "mode" : "open"}) } connectedCallback(){ this.#serviceurl = this.getAttribute("serviceurl") this.connectNewExecutionRequest() this.render() const params = new URLSearchParams(window.location.search) 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() } else { this.showMethod() } } static get observedAttributes() { return ["method"]; } attributeChangedCallback(name, oldValue, newValue) { //if((oldValue != newValue) && (name === "method")){ if(name === "method"){ this.#method = newValue this.loadMethod() } } connectNewExecutionRequest(){ document.addEventListener("newexecutionrequest", ev=>{ if(window.confirm("Please confirm overwrite of execution form?")){ this.setAttribute("method", ev.detail) this.parentElement.scrollIntoViewIfNeeded() } }) } render(){ this.#rootdoc.innerHTML = `