Using the <output>
element outside of a <form>
via the form
attribute will cause handlebars to throw the following error:
runtime.js:463 Uncaught (in promise) TypeError: Cannot assign to read only property 'form' of object '#
'
at NewElementBuilder.__setProperty (runtime.js:463)
at DefaultDynamicProperty.set (runtime.js:1331)
at NewElementBuilder.setDynamicAttribute (runtime.js:473)
at Object.evaluate (runtime.js:3070)
at AppendOpcodes.evaluate (runtime.js:2008)
at LowLevelVM.evaluateSyscall (runtime.js:4927)
at LowLevelVM.evaluateInner (runtime.js:4883)
at LowLevelVM.evaluateOuter (runtime.js:4875)
at JitVM.next (runtime.js:5824)
at JitVM.execute (runtime.js:5799)
Assign the form
attribute of an <output>
tag to any value:
{{#if this.eventDuration}}
<output for="{{this.elementId}}-start-time {{this.elementId}}-end-time" form="{{this.elementId}}-form" aria-atomic="true" aria-live="assertive"><span class="visuallyhidden">{{@node.name}} will last </span>{{moment-duration this.eventDuration}}</output>
{{/if}}
3.18.1
15.1.0
85.0.4350.0
I put in a PR to glimmer-vm
that should fix this here: https://github.com/glimmerjs/glimmer-vm/pull/1209
Thanks @KrishnaRPatel! That is merged and released. I'm working to update glimmer-vm over in #19282 (to fix another bug) and that bump includes the fixes.
@rwjblue Happy to help!
Most helpful comment
Thanks @KrishnaRPatel! That is merged and released. I'm working to update glimmer-vm over in #19282 (to fix another bug) and that bump includes the fixes.