imported code from uBlock, including legacy toolbar support in 34485a04658ae7d8357dabe5e42b18e3e066a4b9,
which is itself directly based on work from @AlexVallat:
- 620a7d78d1
- d9b23d4f10
- 5ac4ec21e9
Test a[href^="abp:"], since the protocol probably not used for anything
else, also "a", because ABP checks only anchors, and these links are made
only for ABP.
Also, the event target is not always the link, so at least some parents
should be tested as well.
The purpose of this API is basically to satisfy AMO reviewers in the
future, since the use of innerHTML with variables (i.e., not plain text) will
be rejected without any questions.
Since this is not a problem for browsers other than Firefox, they will
use simple innerHTML assignment, however safe-parsing could be implemented
for them too.