Greetings, i want to add the script tag to my reactive web app <script src="https://js.pusher.com/7.0/pusher.min.js"></script> thank in advance
<script src="https://js.pusher.com/7.0/pusher.min.js"></script>
thank in advance
Lenon Manhães wrote:
anand kumar wrote:
Hi, friend.
You can also use javascript at the onready event with create Element script and then append to the head element of the screen. Putting that in the source layout block will apply to all screens. Follow:
x
I am very sorry, I did't get any thing . can you plz share screen shotsRegards
I was editing, sorry. Take a look above.
if i use
document.getElementsByTagName('head').appendChild(scriptNode);
insted of jquery will their be any problem
You can use javascript to create the Element script and then append to the head element of the screens. Putting that inside the onready of the source layout block will apply to all screens. Follow:
'getElementsByTagName' returns an object with many elements as it finds in the screen. It do not supports appendChild.Use 'document.querySelector' instead. This method will return the first element founded in the screen. As we need to append in the head element, won't be a problem.
If the issue is solved, please mark as solution or let me know how I can help.
Best regards!
'getElementsByTagName' returns an object with many elements as it find in the screen. It not supports appendChild.Use 'document.querySelector' instead. This method will return the first element founded in the screen. As we need to append in the head element, won't be a problem.
thank u very much