Revision: 3721
Author: felix8a
Date: Thu Sep 10 13:51:59 2009
Log: allow <img onload=...>
http://codereview.appspot.com/115084
html4 only defines the onload= attribute for a few elements.
html5 defines onload= for all elements.
in particular, <img onload=...> is useful and supported
by most browsers.
this change defines *::ONLOAD and adds it to the whitelist.
[email protected]
http://code.google.com/p/google-caja/source/detail?r=3721
Modified:
/trunk/src/com/google/caja/lang/html/html4-attributes-extensions-defs.json
=======================================
---
/trunk/src/com/google/caja/lang/html/html4-attributes-extensions-defs.json
Wed May 13 14:07:05 2009
+++
/trunk/src/com/google/caja/lang/html/html4-attributes-extensions-defs.json
Thu Sep 10 13:51:59 2009
@@ -5,6 +5,17 @@
"types": [
{ "key": "*::NAME", "description": "other name",
- "type": "GLOBAL_NAME", "optional": true }
+ "type": "GLOBAL_NAME", "optional": true },
+
+ { "key": "*::ONLOAD", "description": "fires when content is loaded",
+ "type": "SCRIPT", "optional": true,
+ "comment": [
+ "HTML5 defines onload for every element. In particular,",
+ "<img onload=> is useful and supported by most browsers." ] }
+
+ ],
+
+ "allowed": [
+ "*::ONLOAD"
]
}