Remove constant definition from global scope in embed.js (#33107)

This commit is contained in:
Yann 2024-11-29 16:33:25 +01:00 committed by GitHub
parent c58967c3bd
commit 4635ce2926
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1,8 +1,5 @@
// @ts-check // @ts-check
(function (allowedPrefixes) {
const allowedPrefixes = (document.currentScript && document.currentScript.tagName.toUpperCase() === 'SCRIPT' && document.currentScript.dataset.allowedPrefixes) ? document.currentScript.dataset.allowedPrefixes.split(' ') : [];
(function () {
'use strict'; 'use strict';
/** /**
@ -127,4 +124,4 @@ const allowedPrefixes = (document.currentScript && document.currentScript.tagNam
container.appendChild(iframe); container.appendChild(iframe);
}); });
}); });
})(); })((document.currentScript && document.currentScript.tagName.toUpperCase() === 'SCRIPT' && document.currentScript.dataset.allowedPrefixes) ? document.currentScript.dataset.allowedPrefixes.split(' ') : []);