http://codereview.appspot.com/98051/diff/9/10
File src/com/google/caja/plugin/domita.js (right):

http://codereview.appspot.com/98051/diff/9/10#newcode2590
Line 2590: index <= this.node___.cells.length) {
There's a bit of duplication of code now.

How about creating a guard like
function requireIntIn(idx, min, max) {
  if (idx !== (idx | 0) || idx < min || idx > max) {
    throw new Error(INDEX_SIZE_ERROR);
  }
}
?

http://codereview.appspot.com/98051

Reply via email to