Skip to content

Commit 9dc1fb9

Browse files
committed
inject live reload client on DOM ready
1 parent 38eff05 commit 9dc1fb9

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/app.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,12 @@ var Application = State.extend({
7777
* We have what we need, we can now start our router and show the appropriate page!
7878
*/
7979
_onDOMReady: function() {
80+
var head = document.getElementsByTagName('head')[0];
81+
var script = document.createElement('script');
82+
script.type = 'text/javascript';
83+
script.src = 'http://localhost:35729/livereload.js';
84+
head.appendChild(script);
85+
8086
new Layout({
8187
el: document.querySelector('#application'),
8288
app: this

0 commit comments

Comments
 (0)