//In Chrome and Firefox, this translates to:
//In this case, we want to return the position of the end of:
if (!tags.isEmpty()){
Object[] nextTag = tags.get(0);
String nextTagName = (String) nextTag[0];
boolean isClosingTag = (Boolean) nextTag[1];
if (nextTagName.equals(tagName) && !isClosingTag){
Object[] lastTag = null;
for (int i=1; i