https://codereview.appspot.com/9731044/diff/1/src/com/google/caja/plugin/domado.js
File src/com/google/caja/plugin/domado.js (right):
https://codereview.appspot.com/9731044/diff/1/src/com/google/caja/plugin/domado.js#newcode3463
src/com/google/caja/plugin/domado.js:3463: privates.setT = setTransform;
On 2013/05/28 20:05:52, ihab.awad wrote:
Are getTransform and setTransform always the same thing throughout
Domado?
Currently, yes, because we only implement .classList. However, there is
at least one other use of DOMTokenList, per MDN
<https://developer.mozilla.org/en-US/docs/Web/API/DOMTokenList>:
.relList, which is presumably to rel="" as classList is to class="".
https://codereview.appspot.com/9731044/diff/1/src/com/google/caja/plugin/domado.js#newcode3479
src/com/google/caja/plugin/domado.js:3479: add:
Props.ampMethod(function(privates, ttoken) {
On 2013/05/28 20:05:52, ihab.awad wrote:
Shouldn't these methods be defined down on the "settable" variant
since
they are arguably setters?
No. The specified difference between the two types is that
DOMSettableTokenList has a .value property which is an alias for the
underlying string value, whereas DOMTokenList operates strictly on the
view of that value as a split list of tokens.
https://codereview.appspot.com/9731044/diff/1/src/com/google/caja/plugin/domado.js#newcode3496
src/com/google/caja/plugin/domado.js:3496: function(ftoken) {
On 2013/05/28 20:05:52, ihab.awad wrote:
What are the pros and cons of doing it this way versus iterating using
the
feral-side .length and .item()?
The spec says that "A DOMTokenList object must stringify to the value of
the DOMTokenList object's underlying string.", so synthesizing the
string out of iteration over the list would not be appropriate here; for
example, it would discard extra whitespace.
More generally, I observe that a previous version of this change
attempted to implement DOMTokenList and friends from scratch, rather
than wrapping the host types, and it turned out messy. This version
tries to be a pure taming: forward to the underlying operations and do
the minimum of rewriting necessary to preserve the virtualization.
https://codereview.appspot.com/9731044/diff/1/src/com/google/caja/plugin/domado.js#newcode3514
src/com/google/caja/plugin/domado.js:3514: return
privates.feral.value.replace(/[^ \t\n\r\f]+/g, function(s) {
On 2013/05/28 20:05:52, ihab.awad wrote:
linewrap nit
Done.
https://codereview.appspot.com/9731044/diff/1/tests/com/google/caja/plugin/es53-test-scan-guest.js
File tests/com/google/caja/plugin/es53-test-scan-guest.js (right):
https://codereview.appspot.com/9731044/diff/1/tests/com/google/caja/plugin/es53-test-scan-guest.js#newcode1431
tests/com/google/caja/plugin/es53-test-scan-guest.js:1431:
argsByProp('addEventListener', argsByProp('removeEventListener',
On 2013/05/28 20:05:52, ihab.awad wrote:
add vs. remove? confused about this line....
Not sure what you're asking.
• argsBy* are chainable: they return their second argument, for
convenience when function have identical signatures.
• I didn't actually change this line: I just reordered it versus
item/namedItem to create a distinct group for the list types below.
https://codereview.appspot.com/9731044/
--
---
You received this message because you are subscribed to the Google Groups "Google Caja Discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.