User login

Weekly Report - 17/01/14




More work on improving the consistency and quality of JS and CSS in the AMP web interface this week. I fixed lots of minor bugs to get everything working in IE8, starting with the most basic ECMAScript dialect differences such as removing extraneous trailing commas and polyfilling some non-existent functions, then moving on to the URL handling code, which previously only took into account how URLs are rewritten in HTML5 browsers (which can write over the current URL). HTML4 browsers such as IE8 and below cannot rewrite the URL so they instead append as a hash/fragment a URI relative to the base URL (where the base URL is that of the page first directly accessed, i.e. typed into the address bar). HTML4 and 5 are both now handled by checking for the existence of a hash and resolving the fragment if it exists, otherwise resolving the base URL. I broke my work on the history code down into a few stages, first tackling the matrix, graph pages, then modal dialogs. I fixed up the rest of the history state handling code afterwards to restore state while moving forwards and backwards between pages, which hadn't been hooked up before.

Another common issue worth mentioning is that some browsers, particularly IE8 and below require explicit object.hasOwnProperty() checks when iterating through object properties with code like for (var x in y) { do things }, which would become for (var x in y) { if (y.hasOwnProperty(x) { do things } }. Instances where these checks weren't happening created several not easily detectable bugs, because IE will additionally iterate through the object's prototype (and debugging IE is a nightmare).

To finish off the week I ripped apart the matrix and removed its dependence on the rather bloated DataTables JS library, added documentation and did some much needed refactoring and tidy up, then started working on splitting up cells to show IPv4 and IPv6 stats.