http://codereview.appspot.com/4535118/diff/44001/src/com/google/caja/plugin/domado.js
File src/com/google/caja/plugin/domado.js (right):
http://codereview.appspot.com/4535118/diff/44001/src/com/google/caja/plugin/domado.js#newcode520
src/com/google/caja/plugin/domado.js:520: TameXHRConf.confide(this);
On 2011/07/21 18:16:17, MikeSamuel wrote:
I'm confused. Is domado.js running inside ES5/3 on an ES3
interpreter?
Yes. Or inside SES on an ES5 interpreter. Domado fundamentally requires
ES5.
http://codereview.appspot.com/4535118/diff/44001/src/com/google/caja/plugin/domado.js#newcode652
src/com/google/caja/plugin/domado.js:652: var evt = { target: this };
On 2011/07/21 18:16:17, MikeSamuel wrote:
On 2011/07/20 00:26:48, kpreid2 wrote:
> I therefore propose to just throw out the proxy logic here and let
clients
> set properties on this object (as we do on non-proxy-supporting
environments
> for all of our objects).
Done.
That would simplify a lot of the code above?
Not especially; it would just mean dropping the proxy creation from the
constructor.
http://codereview.appspot.com/4535118/diff/44001/src/com/google/caja/plugin/domado.js#newcode2386
src/com/google/caja/plugin/domado.js:2386:
TameBackedNode.prototype.dispatchEvent = nodeMethod(function
dispatchEvent(evt) {
On 2011/07/21 18:16:17, MikeSamuel wrote:
On 2011/07/20 00:26:48, kpreid2 wrote:
> Why is this function not anonymous? I just realized I've introduced
a name
> confusion with this vs. what used to be plugin_dispatchEvent___
below. I'm
going
> to rename the latter for clarity, but what is the reason for naming
this
> function? (And can we bury it in a (function() {})()?)
The link above,
http://www.w3.org/TR/DOM-Level-2-Events/events.html#Events-EventTarget
, defines
the dispatchEvent method as part of the EventTarget interface which
HTMLElements
implement.
I agree that this is a method named dispatchEvent. I'm asking why the
function expression is not anonymous (function(evt) ...) as most other
method declarations are.
http://codereview.appspot.com/4535118/diff/44001/src/com/google/caja/plugin/domado.js#newcode5178
src/com/google/caja/plugin/domado.js:5178: //'HTMLScriptElement',
On 2011/07/21 18:16:17, MikeSamuel wrote:
On 2011/07/20 00:26:48, kpreid2 wrote:
> On 2011/07/18 21:57:01, MikeSamuel wrote:
> > Why are these commented out?
>
> Because they actually have classes, and the previous code wasn't
checking for
> conflicts so it was silently overwriting the non-default constructor
with the
> default.
>
> I propose to change this so that it is a list of *all* HTML element
classes,
and
> change the logic so it uses the default only if there is a
non-default. Then
> the only place default/non-default is decided is in the
defineElement uses
> above. Good?
Please do.
Done.
http://codereview.appspot.com/4535118/diff/44001/src/com/google/caja/plugin/domado.js#newcode5267
src/com/google/caja/plugin/domado.js:5267: //}
On 2011/07/21 18:16:17, MikeSamuel wrote:
Actually, it looks like cajitaStack___ is only mentioned in domita.js
so I think
this code is definitely obsolete.
I have deleted everything but the catch-and-throw with a comment that
it's for IE.
http://codereview.appspot.com/4535118/