Interestingly, the tests still seem to work if I close the JavaScript console, run the tests, then re-open the JavaScript console:

I am not too fussed by this. After all, this entire experiment has been fairly insane. Fun, to be sure, but I doubt that there are immediate practical applications. I still believe that Dart's built-in testing is superior to anything that exists in JavaScript-land, but there are too many volatile parts involved at the moment: Dart, js-interop, and Dart's unittest.

There is also the odd discrepancy in behavior between events in Dart and JavaScript. As I found last night, JavaScript does not see Dart click events. Given the oddness of the sad-tab tonight, I am going to let that one lie. Before moving onto fresh ground, there is one other strange behavior that has been bugging me: I cannot query for the calendar date elements.

In my tests, I have been forced to find elements with iterators:

var cell = queryAll('td').
where((el)=> el.id == fifteenth).
first;

Instead, I ought to be able to simply query for an element with that ID:

var cell = query('#${fifteenth}');

But this has been resulting in my most favoritest Dart error of all—the dreaded internal Dartium error:

So what gives here? The element is clearly there—if I query all of the table cell elements on the page and iterate through them, I can find the element with the target ID. But I cannot query for said element.

To explore this particular issue, I break it down into a very small web test page and associated script. In the test page, I include a simple JavaScript script that creates an element. I also include a number of elements that are entered by hand:

Quick experimentation ends up proving that my problem is the ID attribute. If the ID on which I am querying does not contain a character (I had been using ISO 8601 dates in the Backbone application), then I get the error:

Regardless of what the spec say, browsers allow the use of IDs with just numbers and dashes and these make the most sense in a calendar application. Regardless, an internal Dartium crash is not a helpful error message, so it's off to the bug reporting machine with me! Still, I am happy to have that minor mystery solved.