Skip to content
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

"Link type "icon"" should be able to point to an <svg> or <canvas> #661

Open
zcorpan opened this Issue Feb 9, 2016 · 4 comments

Comments

4 participants
@zcorpan
Copy link
Member

zcorpan commented Feb 9, 2016

https://html.spec.whatwg.org/multipage/semantics.html#rel-icon

Link type "icon"

Some sites use a canvas and then update the <link rel=icon>'s href to the canvas's toDataURL(), e.g. to implement an animated icon or to show how many unread messages there are.

I discussed with @fsoder in the context of supporting SVG favicons in Chromium and it seems like it would be better to be able to link to an in-document svg or canvas element directly for those use cases. Round-tripping via a data: URL is basically unnecessary overhead in principle.

@domenic

This comment has been minimized.

Copy link
Member

domenic commented Feb 9, 2016

So the idea would be <link rel="icon" href="#foo"> where elsewhere in the document there's <canvas id="foo">?

@zcorpan

This comment has been minimized.

Copy link
Member Author

zcorpan commented Feb 9, 2016

Exactly so, yes.

@tabatkins

This comment has been minimized.

Copy link
Collaborator

tabatkins commented Feb 10, 2016

Would this be a special-case thing just for icons, or should it be supported for all image-loading paths? What about external refs?

@annevk

This comment has been minimized.

Copy link
Member

annevk commented Feb 11, 2016

Maybe it's better to make this an API. srcObject (or hrefObject I guess). Otherwise we start special casing URLs in weird ways.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.