The Author Online Book Forums are Moving

The Author Online Book Forums will soon redirect to Manning's liveBook and liveVideo. All book forum content will migrate to liveBook's discussion forum and all video forum content will migrate to liveVideo. Log in to liveBook or liveVideo with your Manning credentials to join the discussion!

Thank you for your engagement in the AoF over the years! We look forward to offering you a more enhanced forum experience.

268587 (3) [Avatar] Offline
I can't figure out where to put the loadScript function shown in Listing 2.3. Should it go in the include snippet, or widget.js file, or a new file? Also, there is no indication of if or how it relates to the loadSupportingFiles function shown in Listing 2.2? I read chapters 1-4, then searched through the rest of the book and couldn't find a context for Listing 2.3.

Showing code out of context doesn't serve your goal of teaching Third-Party JavaScript development. The majority of your readers probably know JavaScript already. We use books like yours to see the big picture of development. That picture should provide a context for the smaller bits of code in your book.
268587 (3) [Avatar] Offline
I'm somewhat closer to working out where to put the loadScript function. Page 38 reads:
You’ve given the publisher the script include snippet, which they’ve added to their web page’s HTML source code, and which is causing your application’s initial script file to load on their page. After the script is loaded, it loads any additional supporting JavaScript files.
How does the loadScript function relate to the loadSupportingFiles function in Listing 2.2?