mirror of
https://github.com/gchq/CyberChef.git
synced 2025-04-22 07:46:16 -04:00
Added populateMultiOption ingredient type
This commit is contained in:
parent
87e956fe7d
commit
53226c1050
5 changed files with 92 additions and 76 deletions
|
@ -205,6 +205,7 @@ class RecipeWaiter {
|
|||
* @fires Manager#statechange
|
||||
*/
|
||||
ingChange(e) {
|
||||
if (e && e.target && e.target.classList.contains("no-state-change")) return;
|
||||
window.dispatchEvent(this.manager.statechange);
|
||||
}
|
||||
|
||||
|
@ -392,6 +393,15 @@ class RecipeWaiter {
|
|||
this.buildRecipeOperation(item);
|
||||
document.getElementById("rec-list").appendChild(item);
|
||||
|
||||
// Trigger populateOption events
|
||||
const populateOptions = item.querySelectorAll(".populate-option");
|
||||
const evt = new Event("change", {bubbles: true});
|
||||
if (populateOptions.length) {
|
||||
for (const el of populateOptions) {
|
||||
el.dispatchEvent(evt);
|
||||
}
|
||||
}
|
||||
|
||||
item.dispatchEvent(this.manager.operationadd);
|
||||
return item;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue