@@ -1,5 +1,11 @@
 /*global dom */
 
+/**
+ * Finds the first Element with the given attribute
+ * @param {Element} node
+ * @param {String} attr Attribute name
+ * @return {Element}
+ */
 dom.getElementByReference = function (node, attr) {
 	let fragment = node.getAttribute(attr);
 
/*global dom */

dom.getElementByReference = function (node, attr) {
	let fragment = node.getAttribute(attr);

	if (fragment && fragment.charAt(0) === '#') {
		fragment = fragment.substring(1);

		let candidate = document.getElementById(fragment);
		if (candidate) {
			return candidate;
		}

		candidate = document.getElementsByName(fragment);
		if (candidate.length) {
			return candidate[0];
		}
	}
	return null;
};
not enough of a description to understand what the function is really doing