gabbi in the browser
- start a CORS-enabled HTTP server at http://localhost:8000 (see below)
- visit Pyodide REPL
- paste
setup.pycontents into the REPL - paste
test_case.pycontents into the REPL
HTTP Server
setup.py contents into the REPLtest_case.py contents into the REPLHTTP Server
| # http://editorconfig.org | |
| root = true | |
| [*] | |
| charset = utf-8 | |
| end_of_line = lf | |
| insert_final_newline = true | |
| trim_trailing_whitespace = true | |
| max_line_length = 80 |
| /node_modules | |
| /package-lock.json | |
| /dist |
| import { withCounter, withContext, log } from "./util.mjs"; | |
| let delay = 200; | |
| log("TOKEN"); | |
| withContext("abc123", () => { | |
| log("🅰️"); | |
| setTimeout(() => { | |
| log("🅱️"); | |
| }, delay * 2); |
| # http://editorconfig.org | |
| root = true | |
| [*] | |
| charset = utf-8 | |
| end_of_line = lf | |
| insert_final_newline = true | |
| trim_trailing_whitespace = true | |
| max_line_length = 80 |
| <!DOCTYPE html> | |
| <html lang="en"> | |
| <head> | |
| <meta charset="utf-8"> | |
| <title>exploring browsers' limits WRT event frequency</title> | |
| <meta name="viewport" content="width=device-width, initial-scale=1"> | |
| <style> | |
| *, | |
| *::before, |
| import { Router } from "./router.js"; | |
| let router = new Router([ | |
| ["/blog/:article", makeHandler("BLOG")], | |
| ["/blog/:article/:comment", makeHandler("COMMENT")], | |
| ["/api/*", makeHandler("API")] | |
| ]); | |
| let uris = [ | |
| "/foo", |
| <!DOCTYPE html> | |
| <html lang="en"> | |
| <head> | |
| <meta charset="utf-8"> | |
| <title>Encryption/Decryption</title> | |
| <meta name="viewport" content="width=device-width, initial-scale=1"> | |
| <style> | |
| *, | |
| *::before, |
| /node_modules |
| #!/usr/bin/env python3 | |
| import os | |
| from hashlib import md5 | |
| ROOT_DIR = os.path.dirname(__file__) | |
| STATUSES = { | |
| 200: "OK", |