Bug 249114

Summary: Remove non-standard Range.compareNode()
Product: WebKit Reporter: Ahmad Saleem <ahmad.saleem792>
Component: DOMAssignee: Nobody <webkit-unassigned>
Status: NEW ---    
Severity: Normal CC: karlcow, rniwa, webkit-bug-importer
Priority: P2 Keywords: BrowserCompat, InRadar
Version: Safari Technology Preview   
Hardware: Unspecified   
OS: Unspecified   

Description Ahmad Saleem 2022-12-11 15:37:20 PST
Hi Team,

While going through Blink commit's, I came across another non-standard, which is now only present in Webkit from quick Github search:

e.g., https://github.com/WebKit/WebKit/blob/bf6ec0b71883ada1ee6d8d0c66a8ea7e421c5e27/Source/WebCore/dom/Range.idl#L68 & https://github.com/WebKit/WebKit/blob/bf6ec0b71883ada1ee6d8d0c66a8ea7e421c5e27/Source/WebCore/dom/Range.cpp#L187

Blink Commit - https://chromium.googlesource.com/chromium/blink/+/9cec195ebb459d3ebdc7ef91a6336047c07ae5b7

Intent to Remove Thread - https://groups.google.com/a/chromium.org/g/blink-dev/c/5dNJaHFNFGM

Some background: Added in 2006 - https://trac.webkit.org/changeset/16302/webkit

MDN - https://developer.mozilla.org/en-US/docs/Web/API/range/compareNode (Removed from Firefox in 1.9)

Web-Spec - https://dom.spec.whatwg.org/#interface-range

Just wanted to raise bug to track it for discussion or for future tracking.

Thanks!
Comment 1 Ryosuke Niwa 2022-12-11 22:37:28 PST
A quick GitHub search finds quite a few entries:
https://github.com/search?q=Range.compareNode+language%3AJavaScript&type=code&l=JavaScript

I don't think it's safe to remove this API.
Comment 2 Radar WebKit Bug Importer 2022-12-18 15:38:16 PST
<rdar://problem/103499504>