On Dec 10, 2013 1:32 AM, "Vivien Nicolas" <vnico...@mozilla.com> wrote: > > > > On 10/12/2013 10:21, Bob Thulfram wrote: >> >> On Monday, December 9, 2013 6:49:07 PM UTC-8, Bob Thulfram wrote: >> >> Also, I thought that onXXX wasn't supported, but it seems to work. I prefer event handlers. >> > > onxxx (or inline JS) is not supported for privileged/certified application due to the CSP mechanism there to enforce a stricter security against XSS.
onxxx works just fine as long as you set it to a JS function. I.e. both of the following will work great myElement.onclick = function(e) { console.log("You clicked"); } function myLoadHandler() { ... } iframe.onload = myLoadHandler; However the following will not work: <img onload="doStuff()"> myElement.onmouseover = "counter++"; / Jonas _______________________________________________ dev-b2g mailing list dev-b2g@lists.mozilla.org https://lists.mozilla.org/listinfo/dev-b2g