pts
pts copied to clipboard
Should different DOM forms use seperate domIDs?
I was trying out multiple forms in HTML space, I had 1 form for drawing circles and 1 form for drawing text. This resulted in the text being placed in the circles (or the circles around the text depending on the order of operations) since both forms start counting with the same kind of domID from 0. So the first text and first circle have the same ID and hence get placed in the same HTML element, and thus also at the same location. This is a bug and not a feature, right?
Maybe something like a formID can be added such that forms don't interfere with each other.
Yep, there's definitely a bug as I didn't account for multiple HTMLForms. Agreed that we need to keep track of created HTMLForms via some incremental ids.