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#newcode1061
src/com/google/caja/plugin/domado.js:1061: * map is never used with more
than one version of setTimeout.
On 2011/07/20 00:26:48, kpreid2 wrote:
On 2011/07/18 21:57:01, MikeSamuel wrote:
> Cool.
Talking to yourself? :) The properties described in that comment are
all from
the original Domita code; all I did was refactor it so that setTimeout
and
setInterval use the same code (and to use a WeakMap instead of a
trademark and
timeoutId___ property, which has the same behavior as a result).
It's only a sign of madness if I answer myself.
D'OH!
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 19:31:05, kpreid2 wrote:
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.
No reasons. I may have added it during debugging so that it shows up in
stack traces.
http://codereview.appspot.com/4535118/diff/48001/src/com/google/caja/plugin/domado.js
File src/com/google/caja/plugin/domado.js (right):
http://codereview.appspot.com/4535118/diff/48001/src/com/google/caja/plugin/domado.js#newcode912
src/com/google/caja/plugin/domado.js:912: var h = String(htmlFragment ==
null ? '' : htmlFragment);
Maybe add a comment that the == is intentional.
Otherwise people are liable to "correct" it to ===.
http://codereview.appspot.com/4535118/diff/48001/src/com/google/caja/plugin/domado.js#newcode922
src/com/google/caja/plugin/domado.js:922: :
html.escapeAttrib(String(htmlFragment == null ? '' : htmlFragment));
ditto.
http://codereview.appspot.com/4535118/