+}
+
+function getEvents (matcher) {
+ return EVENTS.filter(matcher);
+}
+
+function wrapRow (row) {
+ return "<tr><td>" + row + "</td></tr>";
+}
+
+function iscanonical (event) {
+ return !isnoncanonical(event);
+}
+function isnoncanonical (event) {
+ return ~(event.requires || []).indexOf('noncanonical');
+}
+
+function canonicalToHTML (sender) {
+ sender.innerHTML = EVENTS.filter(iscanonical)
+ .map(toHTML).sort().map(wrapRow).join('');
+}
+
+function noncanonicalToHTML (sender) {
+ sender.innerHTML = EVENTS.filter(isnoncanonical)
+ .map(toHTML).sort().map(wrapRow).join('');
+}