Explorar o código

feature: Allow arbitary HTML on argument form (useful for descriptions) (#519)

James Read hai 1 ano
pai
achega
f3bc82311d
Modificáronse 1 ficheiros con 5 adicións e 0 borrados
  1. 5 0
      webui.dev/js/ArgumentForm.js

+ 5 - 0
webui.dev/js/ArgumentForm.js

@@ -122,6 +122,11 @@ class ArgumentForm extends window.HTMLElement {
       }
     } else {
       switch (arg.type) {
+        case 'html':
+          domEl = document.createElement('div')
+          domEl.innerHTML = arg.defaultValue
+
+          return domEl
         case 'confirmation':
           this.domBtnStart.disabled = true