Skip to content
Robbie Chipka edited this page Dec 23, 2015 · 1 revision

The :external selector filters elements whose href or src attribute is an external link (same domain or relative path).

The domain for relative paths is determined by Document.location.

document.querySelectorAll('a:external'); // get all external links
Clone this wiki locally