Add comprehensive DOM element creation capabilities #17
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Add comprehensive DOM element creation capabilities
Summary
This PR implements spec-kit specification
001-more-dom-elements, adding extensive DOM element creation capabilities to the FDO SDK. The implementation includes:examples/dom_elements_plugin.tsAll new classes follow existing architecture patterns, include JSDoc documentation with @uiName tags, support CSS-in-JS styling via goober, and maintain backward compatibility.
Review & Testing Checklist for Human
Test select/option/optgroup HTML output in production - These elements had a critical bug where they were rendering as self-closing tags (
<select />). The fix manually constructs HTML strings insrc/DOMInput.ts:61-125. Verify the HTML output is valid for:Run the example plugin in actual FDO desktop application - The
examples/dom_elements_plugin.tshas NEVER been tested in a real runtime environment. Build it and verify:Verify HTML boolean attribute handling - Boolean attributes like "selected" should be omitted when false, not set to
selected="false". Check the generated HTML to ensure proper HTML5 compliance.Review the architectural approach in DOMInput - The class uses
super(true)for self-closing behavior but manually overrides it for select/option/optgroup. Verify this pattern is acceptable and won't cause confusion for future maintainers.Test edge cases:
Test Plan
Build verification:
Integration test: Import
examples/dom_elements_plugin.tsinto a real FDO application and verify:Manual HTML inspection: Generate HTML from each new method and validate it against W3C HTML5 spec, especially for:
Notes
super(true)constructor. Fixed by manually building HTML strings for these non-self-closing elements.