Skip to content

Commit

Permalink
share params
Browse files Browse the repository at this point in the history
  • Loading branch information
bgrins committed Nov 21, 2024
1 parent e39250c commit 728aeab
Show file tree
Hide file tree
Showing 7 changed files with 186 additions and 110 deletions.
7 changes: 6 additions & 1 deletion resources/params.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -146,9 +146,14 @@ class Params {
return shuffleSeed;
}

toSearchParams() {
toSearchParams(forRemote = false) {
const rawParams = { ...this };
rawParams["viewport"] = `${this.viewport.width}x${this.viewport.height}`;

if (forRemote) {
delete rawParams["suites"];
delete rawParams["tags"];
}
return new URLSearchParams(rawParams).toString();
}
}
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Large diffs are not rendered by default.

This file was deleted.

2 changes: 1 addition & 1 deletion resources/remote-helloworld/dist/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Vite App</title>
<script type="module" crossorigin src="./assets/index-Dev1YoUL.js"></script>
<script type="module" crossorigin src="./assets/index-DZh9gsEf.js"></script>
<link rel="stylesheet" crossorigin href="./assets/index-BM42Nkx-.css">
</head>
<body>
Expand Down
2 changes: 1 addition & 1 deletion resources/suite-runner.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ export class SuiteRunner {
const frame = this.#frame;
frame.onload = () => resolve();
frame.onerror = () => reject();
frame.src = `${this.#suite.url}?${this.#params.toSearchParams()}`;
frame.src = `${this.#suite.url}?${this.#params.toSearchParams(true)}`;
});
}

Expand Down
Loading

0 comments on commit 728aeab

Please sign in to comment.