Share Target - HTTP 203
Вставка
- Опубліковано 12 вер 2024
- Jake demos the Share Target API, including some new bits, just landing in Chrome Canary.
Squoosh demo: share-target--...
Simple text demo: share-target-d...
Simple file demo: share-target-d...
Also, did you know we do a podcast? Yes? Well, here's some links anyway:
developers.goo...
itunes.apple.c...
player.fm/seri...
open.spotify.c...
If this works with multiple files this is going to improve my app A LOT
files is an array, so i guess it does ?
guys, we DO return on a successful POST request. many APIs serve the created object in the HTTP 201 response, some even put valuable meta info there (e. g. IDs of newly created entities). so, there's that
Surely on an API but not often on a frontend site. I mean you could do the same thing (maybe creating a new item in a list then shows the detail page of that item without a redirect) but you always gotta think whether the user would expect to be able to reload that page.
Hm, I wonder if iOS would ever support this?
@@atilkan All browsers on iOS are Safari
@@spartanatreyu YUP chrome is also safari based on IOS because they don't allow much!
I cant get this to work, does it simply need the web app to be added to home screen?
You def respond to posts with content. That’s what restful web services are all about.
It's a bit cringey, but the good kind of cringey.
14:05 What do you mean back in the day? I use pipes daily and I know a lot of other people do too.
I use them, too. I just grabbed something from the wrong phrase bag in my head.
is it possible to use squoosh with ionic 5 angular 9 firebase ml kit ?
share_target: github
share_target: Google doc
share_target: slack
share_target: WordPress
Don't understand the implications fully here but is this able to enhance workflow on any site with say a chrome extension to shuffle a workpiece between platforms?
Thank u for this awesome video
Here's the thing: It doesn't really work in more complex environments. First: Nobody uses inline-script anymore. So the resultingClientId may not even match if the app's script is separated from the redirected page. Second: The share message fires immediately after the the redirected page has been fetched. Again - the JavaScript responsible for receiving the message from the worker has not even been loaded. So - no - this is not a good example. Sorry guys.
This is so awesome
First thing I did on the simple file demo: give it an ogg
Also, will this be backported to older phones, ie Nexus 6P and Nexus 5? Or is this Android 9+ (or something) only?
I would assume any Android version with the current share API? The targets are added by Chrome, not by the OS. So some old Android 4 where the share API might have been different is not supported but newer versions should be.
That's cool. Very cool 😮
Wow. Love it.
this is pretty cool
Do we even need to make native apps anymore?
lol
Yes, we still cannot do background tracking (for sport trackers) 😢
for iOS yes ;)
@@orlovsskibet Check out developers.google.com/web/updates/2018/12/wakelock
Awesome 👍😊😊
Presumably the native apps use the mime-type filter to only display the PWA as a share target if the file to be shared matches the filter? On a related point, it's a shame that you need to use a catch all */* hack in case the browser/os doesn't understand the mime type of the file to be shared.
You can include extensions too. There's some discussion of this over at github.com/WICG/web-share-target/issues/74
Love it lol!
Will it work on IOS???
Can you do the opposite too?
Share from a pwa to a native app?
Yep! developers.google.com/web/updates/2016/09/navigator-share. Although you can't share files yet. Folks are working on that now.
Theres me thinking this is more "off the cuff" and there you are getting your make up done… 🤯
If I have a simple page that installs as a web app can i get this to work? My simple page does a fetch to the server and it takes a URL plus a couple of options. The backend that fetch goes to only returns JSON encoded stuff. What javascript would I need to put on my simple page to do the equivalent of filling in the form and clicking the button?
Take a look at the glitch demos linked in the description! That should help you get started. Keep in mind that image share target is in Canary only. Text share target is in stable.
Check the description for super-basic examples of using share target for both text & files.
First, suckaaaaaa
@@jakearchibald Well that is great. I do need this functionality and I have a working PWA. I will now have to work out how to get the install working without pestering you. I am not sure if I should have that already or if it is a 'share' feature...
The 'manifest' section of the 'application' tab in devtools is useful for validating install issues
Awesome
too bad iOS would never support this... alongside 99% of bundled android browsers which most people never bother to replace.
Swanky!
Indeed, even my friends call me a swanker