mirror of
https://github.com/gorhill/uBlock.git
synced 2024-11-10 09:07:54 +01:00
Fix dom.text() returning textContent
This commit is contained in:
parent
feaa338678
commit
3d24b89078
1 changed files with 5 additions and 1 deletions
|
@ -81,7 +81,11 @@ class dom {
|
|||
}
|
||||
|
||||
static text(target, text) {
|
||||
for ( const elem of normalizeTarget(target) ) {
|
||||
const targets = normalizeTarget(target);
|
||||
if ( text === undefined ) {
|
||||
return targets.length !== 0 ? targets[0].textContent : undefined;
|
||||
}
|
||||
for ( const elem of targets ) {
|
||||
elem.textContent = text;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue