UNPKG

jessquery

Version:

Modern JavaScript is pretty good, but typing document.querySelector() is a pain. This is a tiny library that makes DOM manipulation easy. jQuery is around 80kb (30kb gzipped), while this is only around 8kb (3.5kb gzipped). Lots of JSDoc comments so it's s

31 lines (27 loc) 843 B
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8" /> <meta name="viewport" content="width=device-width, initial-scale=1.0" /> <title>Test Next Method</title> </head> <body> <div>I'll still be here.</div> <div id="display">I'll be replaced with a stream soon.</div> <div>I'm sticking around</div> <script type="module"> import { $, $$ } from "../index.js" const display = $("#display") // display.wait(1000).fromStream("http://localhost:8080", { // onSuccess: () => $("body").attach("<h1>It worked!</h1>"), // runScripts: true, // sanitize: false, // }) display.wait(1000).fromStream("http://localhost:8080", { sse: true, add: true, toTop: true, }) </script> </body> </html>