mirror of
https://github.com/MercuryWorkshop/scramjet.git
synced 2025-05-13 06:20:02 -04:00
event target
This commit is contained in:
parent
5f7a9d4bd4
commit
08ccb4f56e
6 changed files with 48 additions and 5 deletions
10
static/ui.js
10
static/ui.js
|
@ -153,6 +153,10 @@ function App() {
|
|||
|
||||
const frame = scramjet.createFrame();
|
||||
|
||||
frame.addEventListener("urlchange", (e) => {
|
||||
this.url = e.url;
|
||||
});
|
||||
|
||||
return html`
|
||||
<div>
|
||||
<h1>Percury Unblocker</h1>
|
||||
|
@ -185,7 +189,11 @@ function App() {
|
|||
</div>
|
||||
<div class=${[flex, "nav"]} style="width: 60%">
|
||||
<button on:click=${() => frame.back()}><-</button>
|
||||
<input class="bar" style="flex: 1" bind:value=${use(store.url)} on:input=${(e) => (store.url = e.target.value)} on:keyup=${(e) => e.keyCode == 13 && frame.go(e.target.value)}></input>
|
||||
<input class="bar" style="flex: 1" bind:value=${use(this.url)} on:input=${(
|
||||
e
|
||||
) => {
|
||||
this.url = e.target.value;
|
||||
}} on:keyup=${(e) => e.keyCode == 13 && frame.go(e.target.value) && (store.url = this.url)}></input>
|
||||
<button on:click=${() => frame.forward()}>-></button>
|
||||
</div>
|
||||
${frame.frame}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue