OK, Dancer has main.tt, which is a wrapper around all the other pages it creates. In this, I throw the <script /> tags which load my libraries.
I want the code to run on some pages and not others. I want as little javascript as possible in the page, as befits coding in the 21st century.
Is the solution the next best thing to <body id="foo">, which is <div id="foo">, then using if ( defined $( '#foo' ) ) { ... } (or however that's written in Javascript) to call it on the page?
No comments:
Post a Comment