Open
Bug 1109395
Opened 10 years ago
Updated 2 years ago
No data: urls for W3C Notifications icon property
Categories
(Firefox :: General, defect)
Tracking
()
NEW
People
(Reporter: protz, Unassigned)
References
Details
It seems like data: urls don't work for the icon property of W3C Notifications. I'm no expert in spec reading, but http://www.w3.org/TR/notifications/#concept-notification doesn't seem to forbid this, does it? STR: launch using the console, for a page that has been granted notification permissions already: new Notification("blah", { body: "body", tag: "tag", icon: "data:image/svg+xml;base64,PHN2ZyBjbGFzcz0nc3ZnIHN2Zy1pY29uLScgdmlld0JveD0nMCAwIDEwMCAxMDAnIHByZXNlcnZlQXNwZWN0UmF0aW89J3hNaW5ZTWluJyB4bWxucz0naHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmcnPjxjaXJjbGUgZmlsbD0nd2hpdGUnIHN0cm9rZS13aWR0aD0nNScgc3Ryb2tlPScjRkRFRTAwJyByPScyMC41JyBjeD0nMjUnIGN5PScyNScvPjxjaXJjbGUgZmlsbD0nI0ZGMDBGRicgcj0nMjMnIGN4PScyNScgY3k9Jzc1Jy8+PGNpcmNsZSBmaWxsPScjOTBFRTkwJyByPScyMycgY3g9Jzc1JyBjeT0nMjUnLz48Y2lyY2xlIGZpbGw9JyMwMDgwODAnIHI9JzIzJyBjeD0nNzUnIGN5PSc3NScvPjwvc3ZnPg=="}) The data-url is valid (it displays fine in the URL bar) but doesn't seem to work in this context. Thanks, ~ jonathan
Comment 1•10 years ago
|
||
There's nothing in the DOM implementation that would make this not work, at first glance. Presumably the UI is doing a security check that forbids data: URIs here, though.
Component: DOM → General
Product: Core → Firefox
Comment 2•10 years ago
|
||
I've noticed that notifications don't work with icons with dimensions != 32x32 pixels. Have you tried resizing your image?
Comment 3•10 years ago
|
||
For example here (https://github.com/andreasgal/j2me.js/pull/579/files), I've had to resize the image before being able to use it (and I'm using it via a data URL).
Reporter | ||
Comment 4•10 years ago
|
||
It's an svg, and I just tried setting the viewBox to 32x32, but that didn't help. So I guess I should probably rename this bug to "data: urls for W3C Web Notifications only work for non-vector, 32x32 images"?
Updated•2 years ago
|
Severity: normal → S3
You need to log in
before you can comment on or make changes to this bug.
Description
•