Project: chromium Issues People Development process History Sign in
New issue
Advanced search Search tips
Issue 137297 Remove webkitNotifications.createHTMLNotification
Starred by 30 users Project Member Reported by mihaip@chromium.org, Jul 13 2012 Back to list
Status: Fixed
Owner: abarth@chromium.org
Closed: Dec 2013
Cc: jhurwich@chromium.org, aa@chromium.org, xiy...@chromium.org, tbarzic@chromium.org, kuscher@chromium.org, ligim...@chromium.org, jhawkins@chromium.org, jamescook@chromium.org, peter@chromium.org, darin@chromium.org, jeremya@chromium.org
Components:
OS: All
Pri: 2
Type: Feature


Sign in to add a comment
createHTMLNotification has been removed from the W3C Notifications spec, and will most likely not be implemented by the web platform at large.

We do want the equivalent functionality in packaged apps, but we should expose it under a different name, so that we're not beholden to WebKit's implementation (which may be ripped out at some point).

For the short term, we can most likely just hide window.webkitNotifications.createHTMLNotification in plaform apps, and instead expose it via chrome.app.window.createNotification (or perhaps chrome.app.window.create({type: notification}).
 
Comment 1 by mihaip@chromium.org, Jul 13 2012
Labels: Mstone-22
Comment 2 by darin@chromium.org, Jul 13 2012
Are you sure you want to support HTML notifications in apps?  The reason for not supporting them in the web platform remain:  doesn't integrate well with native notification systems.
What about:

chrome.app.window.createNotification({icon: iconURL, title: 'textual', content: 'textual', htmlContent: 'html'})

icon, title and content are required, htmlContent is optional and is used instead of textual content if the platform supports HTML.
Comment 4 by gra...@gmail.com, Jul 19 2012
As notifications are likely to reflect the current state of the app, the suggested approach of using htmlContent helps in avoiding not so nice Query string encoding/decoding 
(as discussed here: http://stackoverflow.com/questions/4976760/chrome-extension-desktop-notification-in-a-separate-html).
Comment 5 by levin@chromium.org, Jul 24 2012
html notifications will only work well at best on Linux and ChromeOS  -- I believe Linux has a preferred notification system which isn't html -- so would leave ChromeOS. All other os'es have other notification systems which will conflict (overlap, etc.) with the html notifications.

It is best to avoid it and not propagate the headaches that we are having with it being supported in other places (where we have been trying to remove it and the associated code).

There are a number of people who have worked on this area for a long time who could be met with to get further perspective on it.
Cc: kuscher@chromium.org
html notifications will *not* work on ChromeOS/Ash as of R22. We deprecated them with the new Ash notification center, and have no plans to re-introduce support. Rendering HTML content in a UI widget is problematic for a number of reasons, and re-introducing support for HTML notifications in Ash would be a non-trivial effort.

Cc: jhurwich@chromium.org
Adding Jordan. 

Steven is right, currently we currently planned to not support notifications with HTML content on Chrome OS since we had issues with it and it was a pain to keep. If from any source those will come back this needs to be a feature request for CrOS as well since we would need to re-implement those.
Comment 8 by mihaip@chromium.org, Jul 24 2012
Killing HTML notifications on CrOS with such short notice is not good for both extensions that use them and apps that are considering using them. Jordan said it might be possible to delay switching to the new notification center to M23.

I've asked James Hawkins for a list of ways in which simple notifications are not adequate. If we can improve them for M23, then they could use HTML notifications in M22, and then switch to simple notifications in M23.
Comment 9 Deleted
Labels: Restrict-View-Google
Labels: -Restrict-View-Google
Summary: Keep createHTMLNotification alive apps for M22 (was: NULL)
Re-tiling based on comment 8. I don't think it makes sense to add a special API if we're removing HTML notifications soon.
Summary: Keep createHTMLNotification alive in apps for M22 (was: NULL)
Cc: aa@chromium.org
Owner: jianli@chromium.org
Status: Assigned
Really agree with comment 8 here.
As extension developer for Chrome, I really need HTML notification.

Thanks to keep in mind, notifications with links would be appreciate.
Thanks for your work anyway! ;)
I'm running CrOS 23 and my extension Extensions Update Notifier is completely broken
https://chrome.google.com/webstore/detail/nlldbplhbaopldicmcoogopmkonpebjm

Can anyone tell me what is the solution since I really need custom HTML in my notification?

Thanks in advance,
Francois.
Moreover, this page https://developer.chrome.com/trunk/extensions/notifications.html still mentions webkitNotifications.createHTMLNotification() which is why I spent some time relying on this solution for my extension.

If webkitNotifications.createHTMLNotification() is deprecated for real, it would be nice to update this page to prevent other developers to do the same mistake as me.
All of my "Checker Plus" extension users rely heavily on these HTML notifications https://chrome.google.com/webstore/search/checker%20plus%20jasonsavard, will there by an alternative solution or similar API? (excluding the basic createNotification)
Comment 19 Deleted
Our app is relying on HTML notifications to work, and now that our staff has upgraded to Chrome 22, it no longer works.

What should we use as a replacement right away until the spec is solidified?  It just has to work on Chrome.  We can't use createNotification() because we really need hyperlinks in the notification popup.

Thanks in advance!
Comment 21 by k...@google.com, Oct 2 2012
Labels: -Mstone-22 Mstone-24 MovedFrom-22
Moving out to M24, Please pull back in to previous milestones if needed.
Comment 22 by k...@google.com, Oct 2 2012
Moving out to M24, Please pull back in to previous milestones if needed.
Labels: -Mstone-24
Since the bug has moved few times, removing the milestone label. Please target the right milestone.
Cc: ligim...@chromium.org tbarzic@chromium.org xiy...@chromium.org jamescook@chromium.org
Issue 162724 has been merged into this issue.
Labels: Mstone-26
Owner: abarth@chromium.org
This is happening in M26.
Labels: WebKit-ID-107598
See https://bugs.webkit.org/show_bug.cgi?id=107598
Summary: Remove webkitNotifications.createHTMLNotification (was: Keep createHTMLNotification alive in apps for M22)
Project Member Comment 28 by bugdroid1@chromium.org, Jan 23 2013
Labels: -WebKit-ID-107598 WebKit-ID-107598-NEW
https://bugs.webkit.org/show_bug.cgi?id=107598
Project Member Comment 29 by bugdroid1@chromium.org, Jan 28 2013
Labels: -WebKit-ID-107598-NEW WebKit-ID-107598-RESOLVED
https://bugs.webkit.org/show_bug.cgi?id=107598

Status: Fixed
Comment 31 Deleted
Please don't remove createHTMLNotification() until createNotification() actually respects the icon that is passed in.  For web apps, it makes more sense for the User to see the Web Application Icon than it does to see the browser icon.  On windows this is respected, why is it not on the mac?

This is pretty much the only reason I am using the HTML version of this.

Issue 158036:	Text notifications on OSX do not respect the icon passed to them.
https://code.google.com/p/chromium/issues/detail?id=158036&q=webkitNotifications&colspec=ID%20Pri%20Mstone%20ReleaseBlock%20OS%20Area%20Feature%20Status%20Owner%20Summary

Status: Started
createHTMLNotification hasn't actually been removed yet, but it will be soon.

We're not going to block this bug on issue 158036.
Project Member Comment 34 by bugdroid1@chromium.org, Feb 26 2013
Labels: -WebKit-ID-107598-RESOLVED WebKit-Rev-141202 WebKit-ID-107598-REOPENED
https://bugs.webkit.org/show_bug.cgi?id=107598
http://trac.webkit.org/changeset/141202

Comment 35 Deleted
Comment 36 by Deleted ...@, Feb 28 2013
I just opened a restaurant and I bought what I thought was the best pos software out there but it seems like there was something wrong with the code. Could it be this bug? I hope they come out with an update fixing it soon. http://posequipment.net/Point_of_Sale_Software.html
Project Member Comment 37 by bugdroid1@chromium.org, Mar 10 2013
Labels: -Area-Internals -Feature-Apps -Feature-Apps-APIs -Mstone-26 Cr-Platform-Apps-API Cr-Platform-Apps Cr-Internals M-26
Comment 38 by tmix...@gmail.com, Mar 18 2013
How long webkitNotifications.createHTMLNotification will be available for extensions? 
Does any term exist? Do you provide for developers an alternative?
Labels: -M-26 M-28
> How long webkitNotifications.createHTMLNotification will be available for extensions? Does any term exist?

I don't have an exact milestone for you, but soon.  My best guess at the moment is M28, but, like all engineering estimates, that might slip.  Note: createHTMLNotification already doesn't work properly on Windows 8, Android, or Chrome OS due to limitations of those platforms.

> Do you provide for developers an alternative?

The best alternative is the web notifications API that's part of the web platform:

http://www.w3.org/TR/notifications/

The API changed a bit during the standards process, which is one of the reasons we're going to drop support for the old, non-standard API.

The final version of the API doesn't contain all the features that were in the initial editors drafts because it's not possible to implement those features on every operating system.
Comment 40 by csilv@chromium.org, Mar 18 2013
Cc: -csilv@chromium.org
Hey,

webkitNotifications.createHTMLNotification is gone as of current Windows 7x64 chrome dev channel (I'll update with real version from home later).
How could we properly show notifications to our users, since we should now handle several codebase.
For instance, with Chrome 27.0.1453.56 (Build officiel 194414) beta // Linux, the following code:

> chrome.notifications.create('myohmy', {
>  type: "simple",
>  title: "Primary Title",
>  message: "Primary message to display",
>  iconUrl: "icon.png"
>}, function(notifId){console.log(notifId);})

gives me a glourious:

>undefined

(I tried to omit the id, or pass an empty string (''), without success)

So, it means, either I missed something (very likely :p) or the current chrome.notifications.create implementation is not really trust worthy.

thanks for your help!
Brice.
I have not tried this in a while, but where are we with setting the icon
for the notification?

Brice, last I saw Google wanted you to use the HTML5 way of creating
notifications, so, webkitNotifications.createNotifications()
#41: You probably need to do something like:
if (chrome.notifications) {
  // Create notification with chrome.notifications.create here.
} else {
  // Use webkitNotifications.createHTMLNotification here.
}
Also remember to declare "notifications" permission in your manifest.
@justin if you look at the notifications beta documentation (http://developer.chrome.com/beta/extensions/notifications.html), you will see that webkitNotifications is quite gone.

@fangjue23303 I would really like to do that, but since I can't get a notification to pop with the new API, I'm very much stuck...

Thanks for your help!
Comment 45 Deleted
@Brice: Although webkitNotifications.createHTMLNotification() is dead, webkitNotifications.createNotification() is still alive and well. It is documented at http://developer.chrome.com/dev/extensions/api_other.html rather than http://developer.chrome.com/dev/extensions/notifications.html.

Also, chrome.notifications.create() will work with Chrome.28.*, not Chrome.27.*. Maybe that explains the "undefined" error you encountered.

@all, again the reason that i have yet to switch is that
webkitNotifications.createNotification() or the html5 one, do not follow
the spec.
neither of them show the icon that you provide to the api call.  this is
specifically so on MacOSX Lion 10.8.x

I know on some platforms it works, but createHTMLNotification was the most
consistant experience across platforms.

For our extension I thought it would be confusing to have the chrome icon
do the notifications for our product.  I am just using it to make sure our
icon shows up.
Labels: -M-28 M-30
Loks like we're on track for M30, as stated in April.

https://codereview.chromium.org/21087006/
https://codereview.chromium.org/21150010/
Project Member Comment 50 by bugdroid1@chromium.org, Jul 30 2013
The following revision refers to this bug:
    http://src.chromium.org/viewvc/blink?view=rev&rev=155187

------------------------------------------------------------------------
r155187 | chrome-bot@google.com | 2013-07-30T23:10:07.384117Z

Changed paths:
   M http://src.chromium.org/viewvc/blink/trunk/Source/web/ContextFeaturesClientImpl.cpp?r1=155187&r2=155186&pathrev=155187
   M http://src.chromium.org/viewvc/blink/trunk/Source/web/WebNotification.cpp?r1=155187&r2=155186&pathrev=155187
   M http://src.chromium.org/viewvc/blink/trunk/public/web/WebNotification.h?r1=155187&r2=155186&pathrev=155187
   M http://src.chromium.org/viewvc/blink/trunk/Source/core/page/UseCounter.h?r1=155187&r2=155186&pathrev=155187
   M http://src.chromium.org/viewvc/blink/trunk/public/web/WebPermissionClient.h?r1=155187&r2=155186&pathrev=155187
   M http://src.chromium.org/viewvc/blink/trunk/Source/modules/notifications/Notification.cpp?r1=155187&r2=155186&pathrev=155187
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/fast/notifications/notifications-with-permission-expected.txt?r1=155187&r2=155186&pathrev=155187
   M http://src.chromium.org/viewvc/blink/trunk/Source/core/dom/ContextFeatures.cpp?r1=155187&r2=155186&pathrev=155187
   M http://src.chromium.org/viewvc/blink/trunk/Source/modules/notifications/Notification.h?r1=155187&r2=155186&pathrev=155187
   M http://src.chromium.org/viewvc/blink/trunk/Source/modules/notifications/NotificationCenter.h?r1=155187&r2=155186&pathrev=155187
   M http://src.chromium.org/viewvc/blink/trunk/Source/modules/notifications/NotificationCenter.idl?r1=155187&r2=155186&pathrev=155187
   M http://src.chromium.org/viewvc/blink/trunk/Source/core/dom/ContextFeatures.h?r1=155187&r2=155186&pathrev=155187
   M http://src.chromium.org/viewvc/blink/trunk/LayoutTests/fast/notifications/notifications-with-permission.html?r1=155187&r2=155186&pathrev=155187

Remove webkitNotifications.createHTMLNotification

This CL removes support for webkitNotifications.createHTMLNotification. This
API no longer works on any platform except Linux. We haven't exposed this API
to the web in a long time, but we've been keeping it around to support a
handful of Chrome extensions that were using the feature. These extensions have
now migrated to Rich Notifications
<http://blog.chromium.org/2013/05/rich-notifications-in-chrome.html>. As we've
implemented Rich Notifications on various platforms, we've been removing
support for createHTMLNotification. At this point, createHTMLNotification works
only on Linux.

This CL does not affect the text-based webkitNotifications.createNotification
or the unprefixed "new Notification" APIs, both of which will continue to
function after this CL.

BUG= 137297 

Review URL: https://chromiumcodereview.appspot.com/21087006
------------------------------------------------------------------------
Project Member Comment 51 by bugdroid1@chromium.org, Jul 30 2013
------------------------------------------------------------------------
r214374 | abarth@chromium.org | 2013-07-30T17:07:37.816711Z

Changed paths:
   M http://src.chromium.org/viewvc/chrome/trunk/src/chrome/renderer/chrome_render_view_observer.h?r1=214374&r2=214373&pathrev=214374

Remove OVERRIDE on cross-repo overrides

We avoid using the OVERRIDE keyword when we override functions from the Blink
API because it makes changing the API even harder across repositories. This CL
removes a number of mis-uses of the OVERRIDE keyword.

TBR=jamesr@chromium.org
BUG= 137297 

Review URL: https://codereview.chromium.org/21016003
------------------------------------------------------------------------
Project Member Comment 52 by bugdroid1@chromium.org, Jul 30 2013
------------------------------------------------------------------------
r214375 | abarth@chromium.org | 2013-07-30T17:10:47.411680Z

Changed paths:
   M http://src.chromium.org/viewvc/chrome/trunk/src/chrome/browser/extensions/notifications_apitest.cc?r1=214375&r2=214374&pathrev=214375
   D http://src.chromium.org/viewvc/chrome/trunk/src/chrome/test/data/extensions/api_test/notifications/has_permission_manifest?r1=214375&r2=214374&pathrev=214375

Remove tests for createHTMLNotification

We're removing this API in https://codereview.chromium.org/21087006/, so we
don't need to test it anymore.

R=dimich@chromium.org, kalman@chromium.org
BUG= 137297 

Review URL: https://codereview.chromium.org/21150010
------------------------------------------------------------------------
Comment 53 by kareng@google.com, Aug 19 2013
Labels: -M-30 MovedFrom-30
This issue has already been moved once and is lower than Priority 1,therefore removing mstone.
Cc: peter@chromium.org
Status: Fixed
This has been gone since July.
What milestone did this actually land in? Looks like the M30 label was removed but I can't find what version of Chrome removed window.webkitNotifications.createHTMLNotification.
It was removed in Blink@155187.  http://omahaproxy.appspot.com/ gives mappings between base_webkit_revision and Chrome versions, but the data doesn't seem to go back far enough.
Sign in to add a comment