DOM Rangeのオフセット周りに仕様外の制約がある (Firefox 2.x)

Setting the start point below (further down in the document) than the end point will throw an NS_ERROR_ILLEGAL_VALUE exception.

http://developer.mozilla.org/en/docs/DOM:range.setStart

Setting the end point above (higher in the document) the start point will throw an NS_ERROR_ILLEGAL_VALUE exception.

http://developer.mozilla.org/en/docs/DOM:range.setEnd
  • startOffsetより前の位置にendOffsetを設定できない→Rangeを何回も使うときに不便
    • Rangeを使うたびにrange.setEndAfter(document.documentElement)とかして最大限endOffsetを後ろに回せ?
  • Acid 3のTest 8でもテストされているみたい
  • Firefox 3 betaは制約をなくした?