Live Edit Getting changes in index.html but javascript not called.

I have the following files:


<!DOCTYPE html>
<head lang="en">
    <meta charset="UTF-8">
    <link rel="stylesheet" href="style.css">
    <div class="winner-box">
        <div class="winner-text">And the winner is...
            <span class="winner-name">???</span>
<script src="winner.js"></script>


winner-box {
    height: 100vh;
: #de4b4f;
: flex;
: center;
: center;
: 30px;

.winner-text {
    color: rgba(255,255,255,0.6);
: 'Fira Sans', sans-serif;
: 400;
: antialiased;
: 1px;

.winner-name {
    font-width: 800;
: white;
: inline-block;
: 5px solid white;
: 0.3em 0.8em;
: 5px;
: 2em;
: 3px;


var DevTippers = [
    'Adam Rasheed',
    'Alexander Barakhov',
    'Ayoub Moutil',
    'Bharat Modi',
    'Bryan Knight',
    'Chris D',
    'Daniyaal Khan',
    'David Vazquez',
    'David Farrell',
    'Flores Kire',
    'Goran Petricevic',
    'Guillaume Bauer',
    'Hamza Shezad'
// generate a random number

function winner
(min, max) {
    return Math.floor(Math.random()*(max-min)+min);

//console.log(winner(10, 0));

// apply random number

.querySelector('.winner-name').innerHTML = DevTippers[winner(0, DevTippers.length)];

I have installed and enabled LiveEdit.

When it first runs debug, it works fine, but as I make changes in the index.html the '???' is not getting replaced by the line in the winner.js file.  What have I missed with the configuration of liveedit?

Comment actions Permalink

Live Edit doesn't force execution of javascript code that is run on page load. So you need to manually reload the page to see the new code execution result

Comment actions Permalink

Thank you,  I thought I might have missed some setting.


Please sign in to leave a comment.