Skip to content

Inject HTML differently.  #31

@Quafadas

Description

@Quafadas

On "Providing you own html" you can instead of asking to put the script tag with the code, you could serve yourself from the code the script code:

      const sse = new EventSource("/refresh/v1/sse");
      sse.addEventListener("message", (e) => {
        const msg = JSON.parse(e.data);

        if ("KeepAlive" in msg) console.log("KeepAlive");

        if ("PageRefresh" in msg) location.reload();
      });

in a special path..
Like:
/script/live-server.js

And then ask the users to add:
<script src="/scripts/live-server.js" />

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions