Elgg/Elgg — comment on commit 518083ff5d13b6bec789bbdac03f4004b457c0ed
File:  line 0
By brettp:

Didn't know the dom offered the or I would have definitely used it. Wish Google would have turned up the dom solution first. The code above doesn't work but this does:

var parsedURI = document.createElement('a');
parsedURI.href ='http://elgg.org/plugins/all?tag=test#fragment';

console.log(parsedURI.port);
console.log(parsedURI.host);
console.log(parsedURI.search);
console.log(parsedURI.hash);