-
Notifications
You must be signed in to change notification settings - Fork 20
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Example with POST #58
Conversation
index.html
Outdated
@@ -158,6 +158,40 @@ <h2> | |||
shared. If the ShareData contains no information for a given member, | |||
the query parameter is omitted. | |||
</p> | |||
<p> | |||
A share target might only be interested in a subset of the ShareData |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Linkify ShareData.
index.html
Outdated
@@ -158,6 +158,40 @@ <h2> | |||
shared. If the ShareData contains no information for a given member, | |||
the query parameter is omitted. | |||
</p> | |||
<p> | |||
A share target might only be interested in a subset of the ShareData | |||
members. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This example seems to serve a dual purpose. Add: "This example also shows a share target that receives data as a POST request, which should be the case if the request causes an immediate side effect."
index.html
Outdated
} | ||
</pre> | ||
<p> | ||
The shared information might be read by a service worker. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Linkify service worker.
Add: ", rather than being sent over the network to the server."
index.html
Outdated
event.respondWith((async () => { | ||
const formData = await event.request.formData(); | ||
const link = formData.get('link') || ''; | ||
return new Response('Shared link: ' + link); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add a line which simulates storing the data server-side (i.e., a side-effect which is why this is a POST).
saveBookmark(link);
Change 'Shared link:'
to 'Bookmark saved:'
Made requested changes |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm with some nits.
index.html
Outdated
A share target might only be interested in a subset of the ShareData | ||
members. | ||
A share target might only be interested in a subset of the | ||
<a data-cite="!WebShare#dom-sharedata">ShareData</a> members. This |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Drop the "!" (which makes this a non-normative reference). Note that the above instance of this, I just fixed this morning (you'll see it if you rebase).
index.html
Outdated
@@ -176,7 +179,9 @@ <h2> | |||
} | |||
</pre> | |||
<p> | |||
The shared information might be read by a service worker. | |||
The shared information might be read by a <a data-cite= | |||
"!service-workers-1#service-worker-concept">service worker</a>, rather |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Again, make this a non-normative reference (remove the "!"). This one actually matters, since SW isn't referenced anywhere else in this spec, it would add it to the "Non-normative references" reference section instead of "Normative".
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
NB: @sidvishnoi is working on fixing this, so if a section is marked or identified as informative, the reference will automatically just be treated non-normative. Then we will just ignore "!".
We now have an example of receiving a POST, and state POST semantics. resolves w3c#57
873fd39
to
2d6f454
Compare
We now have an example of receiving a POST, and state POST semantics.
resolves #57