Monday, December 12, 2005
var button = document.createElement("button")Do you notice anything strange about the pair of them? That's right, the first is a pretty Aqua button like you expect to see in Safari. The second is an ugly rectangle that looks goofy next to its sibling button. Firefox uses only ugly buttons so they match in that browser. Opera is smart enough to use the pretty button in both cases. C'mon Apple get with the program.
Oh and you could also notice that the text on the pretty button is set via
<button>Edit Sample</button>If you try
button.setAttribute("value", "Edit Sample");or
button.value = "Edit Sample";which seem like they should generate the same DOM entry as the vanilla HTML, you get a miniscule button with no text. Why is that internets?
Links to this post: