UNPKG

shadow-function

Version:

ioing lib - shadow Function, worker Function

14 lines (11 loc) 311 B
'use strict' const csp = (desc: string) => { const meta = document.createElement('meta') meta.setAttribute('charset', 'utf-8') meta.setAttribute('http-equiv', 'Content-Security-Policy') meta.setAttribute('content', desc) document.getElementsByTagName('head')[0].appendChild(meta) } export { csp }