Добрый день. Подскажите, как с помощью document.createElement("script") можно создать такую конструкцию <script src="https://myurl.ru/app.js" async data-country="117"></script> Благодарю.
У меня получается собрать только вот так <script src="https://myurl.ru/app.js" async></script> s = document.createElement("script"); s.src = 'https://myurl.ru/app.js'; s.async = true; document.getElementsByTagName('body')[0].appendChild(s); window.dataLayer = window.dataLayer || []; Как в эту конструкцию поместить data-country="117", ума не приложу.