Files
supplier-dispatch-h5/node_modules/@soda/get-current-script/fixtures/test-polyfill.js
2023-08-11 10:45:20 +08:00

8 lines
217 B
JavaScript

if (!('currentScript' in document)) {
Object.defineProperty(document, 'currentScript', { get: window.getCurrentScript })
}
if (document.currentScript) {
document.getElementById('app').textContent = 'It works!'
}