Easily change links without having active DOM!
Find and change all <a href="some_link">
'some_links' in given string according to given rule.
let html = "...some random text <a class="class1" href="http://www.example.com?t=4">link</a>...";
let flags = new AFlags(html);
flags.setFlags({t:2,s="doom"});
flags.getContext();
//returns "...some random text <a class="class1" href="http://www.example.com?t=2&s=doom">link</a>..."
This object is responsible for link itself. It takes string representing link as an argument of constructor and returns it's object representation.
let link = new ALink("http://www.google.pl");
Returned object contains methods which modifies the link elements and can be recieved using simple .toString()
function.
link.setFlags({key:"123"}).toString()
//returns http://www.google.pl?key=123
new ALink("http://www.google.com").setFlags({key:"123"}).toString()
//returns "http://www.google.com?key=123