Richard said:
It is completely appropriate to use any feature implemented by
any browser (or number of browsers) regardless of how common its
implementation is. [...]
There is no standards compliant or even officially recommended
"onbeforeprint" event handler attribute, using it creates invalid
HTML,
No, it doesn't, there's plenty of ways of making a valid version of
HTML containing that attribute, or you could do it in the internal
subset. It wouldn't be a W3C recommended HTML (but so what, there's
lots of good HTML's ISO etc.)
making the document dependent on a certain UA and vendor and
less future-proof.
Hmm, less future proof could be an argument - the existence of the
attribute in a UA does prevent other UA's implementing, or standards
orgs. from standardising it in a different way - but that's hardly a
danger in using it - creating it caused the problem.
Equally, the W3C have stated that HTML 4.01 is the last HTML, and
XHTML 1.0 the last thing servable as text/html - so future proof is
meaningless in text/html document content terms.
Jim.