After we provided a suitable
Console
object, this code worked perfectly with ClearScript 5.3.11. Are you using an older version?