JavaScript not firing on page load when using Gatsby

1 reply · opened Oct 13, 2023

PPrestonJonesOct 13, 2023

I'm using the Construction demo, removed all the content, and set up the header and footer as a layout for a Gatsby build. I double checked and made sure all of the necessary files are where they need to be, but the JavaScript to add additional styles to the body tag aren't firing. Any ideas what I might be missing?

I have pushed what I have so far to a github.io repo for my client (link below).

SSemicolon WebSTAFFOct 16, 2023

Hello,

Thanks for your Kind Patience and Apologies for the Delays in replying to your query.

Based on your mention of Gatsby, Canvas is currently not compatible out of the box with Gatsby and will require further customizations. The Default JS functions are fired on DOMContentLoaded or load events. You can consider firing the JS using this API Call: SEMICOLON.Core.getVars.fnInit(); once your assets are loaded.

This should work fine. Hope this Helps!

Let us know if we can help you with anything else or if you find any further issues.

Have the same question, or something new?

Sign in to the Canvas dashboard to reply or open your own topic. Canvas owners get direct help from the SemiColonWeb team.

Reply on the dashboard