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
Open

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

zcorpan opened this issue Feb 9, 2016 · 4 comments
Labels
addition/proposal New features or enhancements needs implementer interest Moving the issue forward requires implementers to express interest

Comments

@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.

@zcorpan zcorpan added addition/proposal New features or enhancements needs implementer interest Moving the issue forward requires implementers to express interest labels Feb 9, 2016
@domenic
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
Copy link
Member Author

zcorpan commented Feb 9, 2016

Exactly so, yes.

@tabatkins
Copy link
Collaborator

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
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
Labels
addition/proposal New features or enhancements needs implementer interest Moving the issue forward requires implementers to express interest
Development

No branches or pull requests

4 participants