From ef356249f9fbc5f0323697abb9cfb892ce1145ed Mon Sep 17 00:00:00 2001 From: Pete Hunt Date: Wed, 17 Jul 2013 01:00:01 -0700 Subject: [PATCH] Update DOM differences docs to include a note about the style attribute. --- docs/09-reference.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/09-reference.md b/docs/09-reference.md index 304a6c0ae..64a1fb82a 100644 --- a/docs/09-reference.md +++ b/docs/09-reference.md @@ -205,4 +205,5 @@ React has implemented a browser-independent events and DOM system for performanc * All events (including submit) bubble correctly per the W3C spec * All event objects conform to the W3C spec * All DOM properties and attributes (including event handlers) should be camelCased to be consistent with standard JavaScript style. We intentionally break with the spec here, since the spec is inconsistent. +* The `style` attribute accepts a JavaScript object with camelCased properties rather than a CSS string. This is consistent with the DOM `style` JavaScript property, is more efficient, and prevents XSS security holes. * `onChange` behaves as you would expect it to: whenever a form field is changed this event is fired rather than inconsistently on blur. We intentionally break from existing browser behavior because `onChange` is a misnomer for its behavior and React relies on this event to react to user input in real time.