The notifications are allowed to be full webpages - which can then communicate back to the parent window. (or extension)
This will be a reasonable alternative to modal dialogs for chrome extensions initially, and eventually for web apps in general. (if it gets adopted by other browsers)
This works only in chrome, your web-app can also do this, but the user will have to authorize your web-apps use of this. I wrote a small chrome reminder extension which used these notifications => https://github.com/minhajuddin/quickr . That should show you how to create a notification from your app.