Open rniwa opened 8 years ago
I found setBaseAndExtent(a,1, null, 0) behaves as collapse(a,1) in Blink. However Edge clear selection at that case.
Which is better?
Given setBaseAndExtent
came from WebKit API, we should probably spec whatever WebKit/Blink does/did.
According to chrome usage tracking[1], setBaseAndExtent()
with null-node is very low usage (0.00013% of page views).
[1] https://www.chromestatus.com/metrics/feature/timeline/popularity/1084
When
setBaseAndExtent
is called withbaseNode
orextentNode
set tonull
, we should clear selection instead of throwing. This behavior matches that of WebKit and Blink.