Change: allow makeLink to append child. Add rel=noopener

This commit is contained in:
eight 2017-10-12 16:12:34 +08:00
parent eec52ad239
commit 40ad7837fc

View File

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