diff --git a/src/js/resources/utils.js b/src/js/resources/utils.js index 45c96ca32..52e7a9b45 100644 --- a/src/js/resources/utils.js +++ b/src/js/resources/utils.js @@ -220,6 +220,14 @@ export function generateContentFn(trusted, directive) { warXHR.send(); }).catch(( ) => ''); } + if ( directive.startsWith('join:') ) { + const parts = directive.slice(7) + .split(directive.slice(5, 7)) + .map(a => generateContentFn(trusted, a)); + return parts.some(a => a instanceof Promise) + ? Promise.all(parts).then(parts => parts.join('')) + : parts.join(''); + } if ( trusted ) { return directive; }