We could just add more custom tag attributes...

Gary’s design is very simple; we just need to add a setter method for all of the HTML pass-through tag attributes The UML for the tag class is on the right, with all the methods we’ll need to add.
Here’s the code to make this work:
SelectTagHandler |
|---|
+setOptionsList(List) |
+setId(String) |
+setClass(String) |
+setStyle(String) |
+setTitle(String) |
+setLang(String) |
+setDir(String) |
+setOnclick(String) |
+setOndblclick(String) |
+setOnmouseup(String) |
+setOnmousedown(String) |
+setOnmouseover(String) |
+setOnmousemove(String) |
+setOnmouseout(String) |
+setOnkeypress(String) |
+setOnkeydown(String) |
+setOnkeyup(String) |
+setName(String) |
+setSize(String) |
+setMultiple(String) |
+setDisabled(String) |
+setTabindex(String) |
+setOnfocus(String) |
+setOnblur(String) |
+setOnchange(String) |
+doTag() |

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access