AnsweredAssumed Answered

How to adapt to the undocumented JavaScript loading sequence changes?

Question asked by Jayde Colquhoun on Jun 24, 2019
Latest reply on Jul 11, 2019 by James Jones

In the most recent Canvas Release Notes (2019-06-22) there was an undocumented change to what we believe is the loading sequence of JavaScript in Canvas. This has adversely affected anything we have done that changes the DOM. 

 

For example, one of our customisations is that we use the custom JavaScript to insert an RMIT branding image into every page in certain courses. We use customised JavaScript for this to ensure we can manage the branding from a central location (i.e in case colours or marketing changes etc.). 

 

As the loading sequence has changed, unless you now slow-load* the page, our JavaScript can't find the element that it needs to target because it doesn't appear yet. 

 

We are currently working on a temporary fix to ensure our assets are loading correctly - but would be interested to hear if anybody has advice on how we can meaningfully build custom JavaScript that will be robust enough to handle similar potential undocumented changes to Canvas? 

 

We understand customised JavaScript or CSS is not supported by Canvas, and it is clearly noted that there may be undocumented changes that occur - however, we are surprised that changes that would knowingly affect all 'Advanced CSS and JavaScript' users taking advantage of the open nature of Canvas were not communicated.

 

We are also very interested to understand WHY this change to the loading sequence was implemented as we simply don't understand...  

 

*In Google Chrome dev tools, the network panel allows you to slow load to the page using slow 3G under the throttling menu 

Outcomes