Inline handlers are deprecated as of XHTML Strict General June 22, 2007 Comments Off
To avoid the use of inline JavaScript events, I was seeking an event handler to gather event bubbling and provide an alternative to the deprecated target="_blank".
I think this website, evotech.net sums up everything I needed.
Using CDATA Instead of Comments
Properly enclosing script contents inside of CDATA sections can cause problems in downlevel browsers which do not understand XML. However, it is possible to combine JavaScript Comments with CDATA sections to allow for backward compatibility.
< script type="text/javascript" >
//< ![CDATA[
var i = 0;
while (++i < 10)
{
// ...
}
//]] >
< /script >
Further reading:
Separating behavior and structure
New-Window Links in a Standards-Compliant World [WARNING: annoying pop-ups inhabit this page]
Using JavaScript instead of target to open new windows
No related posts.
Related posts brought to you by Yet Another Related Posts Plugin.