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

8 lines
194 B
JavaScript

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