Comment #1 on issue 1289 by [email protected]: Parent-most DOM object
should have getElementById
http://code.google.com/p/google-caja/issues/detail?id=1289
I can't reproduce this. In the playground with the ES5 option selected,
when I cajole
<script>
for (var d=document.body; d.parentNode; d=d.parentNode){}
cajaVM.log(d.getElementById);
</script>
I see in the Runtime Warnings/Errors tab
function guardedApplier(var_args) { if (!(this instanceof f)) { throw new
TypeError( 'Tamed method applied to the wrong class of object.'); } return
original.apply(this, slice.call(arguments, 0)); }
which seems correct. Furthermore, cajoling
<script>
cajaVM.log(document.body.parentNode.parentNode === document);
</script>
gives true, which correctly matches uncajoled behavior.