1
0
mirror of https://github.com/gorhill/uBlock.git synced 2024-10-06 09:37:12 +02:00

Fix dom.text() returning textContent

This commit is contained in:
Raymond Hill 2022-11-12 10:35:40 -05:00
parent feaa338678
commit 3d24b89078
No known key found for this signature in database
GPG Key ID: 25E1490B761470C2

View File

@ -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;
}
}