Hi Team, While looking into `form` in IDL files used, it is not nullable across all. > (HTMLTextAreaElement) https://searchfox.org/wubkat/rev/4a199452e4f0918a290880f0698d151dee0b3009/Source/WebCore/html/HTMLTextAreaElement.idl#29 Spec - https://html.spec.whatwg.org/multipage/form-elements.html#htmltextareaelement > (HTMLOptionElement) https://searchfox.org/wubkat/rev/4a199452e4f0918a290880f0698d151dee0b3009/Source/WebCore/html/HTMLOptionElement.idl#28 Spec - https://html.spec.whatwg.org/multipage/form-elements.html#htmloptionelement > (HTMLObjectElement) https://searchfox.org/wubkat/rev/4a199452e4f0918a290880f0698d151dee0b3009/Source/WebCore/html/HTMLObjectElement.idl#25 Spec - https://html.spec.whatwg.org/multipage/iframe-embed-object.html#htmlobjectelement > (HTMLLegendElement) [HTMLLegendElement.idl](https://searchfox.org/wubkat/rev/4a199452e4f0918a290880f0698d151dee0b3009/Source/WebCore/html/HTMLLegendElement.idl#24) Spec - https://html.spec.whatwg.org/multipage/form-elements.html#htmllegendelement > (HTMLLabelElement) https://searchfox.org/wubkat/rev/4a199452e4f0918a290880f0698d151dee0b3009/Source/WebCore/html/HTMLLabelElement.idl#24 Spec - https://html.spec.whatwg.org/multipage/forms.html#htmllabelelement > (HTMLInputElement) - https://searchfox.org/wubkat/rev/4a199452e4f0918a290880f0698d151dee0b3009/Source/WebCore/html/HTMLInputElement.idl#34 Spec - https://html.spec.whatwg.org/multipage/input.html#htmlinputelement > (HTMLFieldsetElement) https://searchfox.org/wubkat/rev/4a199452e4f0918a290880f0698d151dee0b3009/Source/WebCore/html/HTMLFieldSetElement.idl#24 Spec - https://html.spec.whatwg.org/multipage/form-elements.html#htmlfieldsetelement > (HTMLButtonElement) https://searchfox.org/wubkat/rev/4a199452e4f0918a290880f0698d151dee0b3009/Source/WebCore/html/HTMLInputElement.idl#34 Spec - https://html.spec.whatwg.org/multipage/form-elements.html#htmlbuttonelement ___ Just wanted to raise so we can track and fix it. Thanks!
So > document.createElement("textarea").form == null is true, so this already works well. I suppose an ideal fix would be to fix the binding layer to not allow for returning nullptr when IDL does not allow for that. I.e., make the following in combination with HTMLTextAreaElement's current IDL not compile: > HTMLFormElement* form() const { return m_form.get(); }
<rdar://problem/132190558>