connector-wordpress/source/connector-mobilizon/front/html-creator.js

8 lines
204 B
JavaScript

export function createAnchorElement({ document, text, url }) {
const a = document.createElement('a')
a.setAttribute('href', url)
a.setAttribute('target', '_blank')
a.innerHTML = text
return a
}