Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion examples/nav-with-service-worker.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
</nav>
</header>
<main>
<div id="content" marker="content"><?start>Loading...</div>
<div id="content"><?start name="content">Loading...</div>
</main>
</body>
<script>
Expand Down
8 changes: 4 additions & 4 deletions examples/out-of-order-streaming-range.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,19 +10,19 @@
<h1>Out of order streaming with start/end markers</h1>

<table>
<tbody marker="data">
<tbody>
<tr>
<td>Before</td>
</tr>
<?marker>
<?marker name="data">
<tr>
<td>After</td>
</tr>
</tbody>
</table>

<template for="data">
<?start>
<?start name="data">
<tr>
<td>Data</td>
</tr>
Expand All @@ -33,7 +33,7 @@ <h1>Out of order streaming with start/end markers</h1>
<tr>
<td>Data 1</td>
</tr>
<?marker>
<?marker name="data">
</template>

<template for="data">
Expand Down
5 changes: 3 additions & 2 deletions examples/out-of-order-streaming.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,12 @@
<body>
<h1>Out of order streaming</h1>

<div marker="placeholder"><?start>Loading...</div>
<div><?start name="placeholder">Loading...</div>

<template for="placeholder">
<p>Result 1</p>
<?marker></template>
<?marker name="placeholder">
</template>

<template for="placeholder">
<p>Result 2</p>
Expand Down
4 changes: 2 additions & 2 deletions examples/stream-html-with-out-of-order.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
</head>
<body>
<h1>Stream HTML with out of order patches</h1>
<div id="root" marker="data"><?start>Loading...</div>
<div id="root"><?start name="data">Loading...</div>

<script>
const root = document.getElementById("root");
Expand All @@ -20,7 +20,7 @@ <h1>Stream HTML with out of order patches</h1>
for (let i = 0; i < 100; ++i) {
await new Promise((resolve) => setTimeout(resolve, 1000));
await writer.write(
`<template for=data><?start>${i}</template>`,
`<template for=data><?start name="data">${i}</template>`,
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just to be clear here, the intent of this one is to overwrite the contents each time?

So it's 1, then 2, then 3... etc.
And not 1234567...

?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Correct

);
}
writer.close();
Expand Down
2 changes: 1 addition & 1 deletion examples/sw.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
self.onfetch = (e) => {
const url = new URL(e.request.url);
if (url.searchParams.get("page") && url.pathname === "/content") {
e.respondWith(new Response("<template for=content><?start>Page " + url.searchParams.get("page") + "</template>"));
e.respondWith(new Response("<template for=content><?start name=content>Page " + url.searchParams.get("page") + "</template>"));
}
};