Change: allow makeLink to append child. Add rel=noopener
This commit is contained in:
parent
eec52ad239
commit
40ad7837fc
|
@ -194,11 +194,12 @@ function $element(opt) {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
function makeLink(href = '', textContent) {
|
function makeLink(href = '', content) {
|
||||||
return $element({
|
return $element({
|
||||||
tag: 'a',
|
tag: 'a',
|
||||||
target: '_blank',
|
target: '_blank',
|
||||||
href,
|
href,
|
||||||
textContent,
|
rel: 'noopener',
|
||||||
|
appendChild: content,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user