This allows the app to use Notification Center when it's available, but
fall back to Growl messages. The app could also choose to always use the Growl
interface.
To test, create an index.html with something like:
<script type="text/javascript">
if (macgap.notice) {
macgap.notice.notify({title: 'MacGap', content: 'Using native OS X notifications'});
} else {
macgap.growl.notify({title: 'MacGap', content: 'Using Growl notifications'});
}
</script>
It should behave differently on OS X Mountain Lion and older versions.
Please note that this essentially breaks API compatibility, although I believe the macgap.notice API was never part of an official release.
This allows the app to use Notification Center when it's available, but fall back to Growl messages. The app could also choose to always use the Growl interface.
To test, create an index.html with something like:
It should behave differently on OS X Mountain Lion and older versions.
Please note that this essentially breaks API compatibility, although I believe the macgap.notice API was never part of an official release.