Fix the following issues:
http://code.google.com/p/google-caja/issues/detail?id=1034
http://code.google.com/p/google-caja/issues/detail?id=1047
http://code.google.com/p/google-caja/issues/detail?id=1048
http://code.google.com/p/google-caja/issues/detail?id=1051
http://codereview.appspot.com/87058/diff/16/28 File src/com/google/caja/plugin/domita.js (right): http://codereview.appspot.com/87058/diff/16/28#newcode1985 Line 1985: if (!listener) { // Clear the current handler ...
16 years, 9 months ago
(2009-06-29 22:46:26 UTC)
#6
http://codereview.appspot.com/87058/diff/16/28
File src/com/google/caja/plugin/domita.js (right):
http://codereview.appspot.com/87058/diff/16/28#newcode1985
Line 1985: if (!listener) { // Clear the current handler
On 2009/06/25 21:15:11, metaweta wrote:
> Here you check if it's falsey, but you assume later that it's callable. You
> should probably check that listener is a (dis)function.
Good point. It is checked in makeEventHandlerWrapper(...). I consolidated that
checking code in classUtils and used it from the 2 places where it's needed.
> On the other hand, on FF3, you can set the onclick property of a div element
to
> 0. Do we care about supporting that?
You mean programmatically setting it to a non-function? That sounds nonstandard,
so I'd say we should skip this unless and until we know that skipping it breaks
some important usage.
http://codereview.appspot.com/87058/diff/16/28#newcode3482
Line 3482: ___.asFunc(___.readPub(aListener, 'call'))
On 2009/06/25 21:15:11, metaweta wrote:
> What is aListener?
Zoikes, you found a bug! :) Fixed and added a test in domita_test_untrusted.html
"testAddEventListener".
Issue 87058: Fix a collection of Domita-related bugs
(Closed)
Created 16 years, 9 months ago by ihab.awad
Modified 16 years, 8 months ago
Reviewers: metaweta
Base URL: http://google-caja.googlecode.com/svn/trunk/
Comments: 8