Skip to content

Use the script for third party javascript #8

Discussion options

You must be logged in to vote

@Ghaleb-alnakhlani It would be a good feature to have.
You can create your own custom loading logic by using some of the section code:
https://github.com/mirceapiturca/Sections/blob/master/App%20Optimization/app-optimization.liquid#L122

node.addEventListener(interactionEvent.event, eventFn, eventOptions);
Node is the DOM element mathed by the assigned CSS selectors.
interactionEvent.event is the assigned event.
eventFn is the function that loads the secipt, see: loadScript(src)

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@Ghaleb-alnakhlani
Comment options

Answer selected by mirceapiturca
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants