I’ve been working with selection/range objects, and because to the incredible amount of inconsistencies between browsers for specific selection/range stuff (even more than the DOM) I was wondering if there was a framework that would help me get through them.
I’ve been working with selection/range objects, and because to the incredible amount of inconsistencies
Share
(Made an answer by request 😉
Take a look at IERange:
Supports Range APIs:
document.createRange()startContainer,startOffset,endContainer,endOffset,commonAncestorContainer,collapsedsetStart(),setEnd(),setStartBefore(),setStartAfter(),setEndBefore(),setEndAfter(),selectNode(),selectNodeContents(),collapse()insertNode(),surroundContents()extractContents(),cloneContents(),deleteContents()compareBoundaryPoints(),cloneRange(),createContextualFragment(),toString()Supports Selection APIs:
window.getSelection()addRange(),removeAllRanges(),getRangeAt(),toString()