Skip to content

Scripts

Ahmed Abbas edited this page Apr 4, 2025 · 1 revision

Scripts

One of the most important aspects of our web component is that it can delay the execution of all javascript files included in your template. So that any external plugins work seamlessly after loading all dynamic content. Add the following tag at the end of the <body> tag (use your own javascript files):

<oggeh-content config="scripts">
  <script type="text/oggeh-defer" src="/js/script-1.js"></script>
  <script type="text/oggeh-defer" src="/js/script-2.js"></script>
  <script type="text/oggeh-defer" src="/js/script-3.js"></script>
</oggeh-content>

Note the required property type="text/oggeh-defer". It's important to have that for all included javascript files. Otherwise, javascript will execute immediately.

Clone this wiki locally