Node-webkit Push Information Research

Source: Internet
Author: User

Node-webkitPush Information ResearchProcess of tomato working method

1. The parent window interacts with the popup box: Pass / return parameters.

2. How the message box is triggered: Time / click.

3, the basic process: The next task pops up, whether to continue:y/n, the default is Y.

4. Example

Demo URL:

http://alloyteam.github.io/AlloyTimer/

To the message pop-up box to indicate

Source Code of Node-webkit

Https://github.com/rogerwang/node-webkit

Multiple Versions available

0.9.2: (Feb, based off of Node v0.11.9, Chrome 32.0.1700.107)

V0.10.0-RC2: (Jul, based off of Node v0.11.13, Chromium 35.0.1916.113)

0.8.6: (APR, based off of Node v0.10.22, Chrome 30.0.1599.66)

API Description:

Https://github.com/rogerwang/node-webkit/wiki

The Node-webkit framework does not support window.notification, but the WebKit kernel supports window.notification. Why is it not supported?

Window.webkitnotification

1, the current mainstream Web application (QQ) message Reminders are implemented by Window.webkitnotification .

2.Chrome version (2014.5 announced at the end of the month ) Window.webkitnotification is not supported after

Node-webkit version

0.8.6

0.9.2 (Nercoa)

0.10.0

node. JS version

0.10.22

0.11.9

0.11.13pre

Browser version

Chrome30.0.1599.66

Chromium32.0.1700.17

Chromium35.0.1916.113

Support Webkitnotification

Х

Support Notification

Window.notifications

API for Windows apps

1.Browser compatibility (compatibility)

    • Desktop
feature

chrome

firefox  (Gecko)

internet explorer

opera

safari

basic support

5 webkit   (see notes) for

4.0 moz  (see notes)

not supported

< P class= "P0"?

6  (see notes)

2.Chrome Notes

    • Prior to Chrome, the notification is following a old prefixed version of the specification and is using The Navigator.webkitnotifications object to instantiate a new notification.
    • Prior to Chrome, Notification.permission is not supported.

Existing message pop-up box

1. Chrome comes with app app:eyeRest Notification

2,chrome-app-samples/rich-notification

Source:

Https://github.com/GoogleChrome/chrome-app-samples/tree/master/rich-notifications

Document:

Https://developer.chrome.com/apps/notifications

Nercoa source File

Trigger events for pop-up windows

Nw-desktop-notifications-rest

Nw-desktop-notifications-work

Pop-up box definition

Alloytimer

Node-webkit-chrome-api-stubs-master

The Chrome API root is for Node-webkit to better invoke the existing chromium app, ensuring that Chrom APIs are often implemented function, at least no error is thrown.

Node Webkit Notification

Node-webkit 0.9.1 does not support webkitnotifications, so the Chrome API root is overwritten by the webkitnotification API Packed the nw-desktop-notification Library.

has been transferred, the parent window pops up the child window, and the child window has a border.

A, the latest version of Node-webkit can not run the program

B, nercOA1.5.3 version can run the program

Source:

Https://github.com/jamesmortensen/node-webkit-chrome-api-stubs

Nw-desktop-notifications

has been transferred, you can pop up a dialog box at the top right.

Note: the links to index.html and nw-desktop-notification.html need to be modified:

A. Download Jquery.min.js file

B, will be modified to script src= "./jquery.min.js" ></script>

It is an improved version of Node-webkit-chrome-api-stubs-master message push.

Window-based message push, window border, window border removed. When minimized, the program is closed and the message is not delivered well (Yoon-jin Peng).

Source:

Https://github.com/robrighter/nw-desktop-notifications

Features: Unstable, modify the code a few times will appear unable to pop up the dialog box.

message box does not automatically message when the parent window is closed (the message box also needs to be closed when the parent window is closed)

Process of the program:

Index.html-nw-desktop-notifications.js--nw-desktop-notification.html

Node-desktop-notifications-master

Not successfully debugged

Need to use to Socket.io

Jquery.notification

Windows notification kernel-based message push demo, on the right side of the pop-up message box, the interface effect is good. You can open the page, but you cannot eject the message.

Effect Display page:

http://azproduction.ru/jquery.notification/

Source:

Https://github.com/azproduction/jquery.notification

Discuss the issue:

1. Node-webkit 's message push has a lot of dependencies

Take at notifications for Node-webkit with a shitload of dependencies (Require.js, Chaplin, Tween.js and so on): Sorry for.

http://www.snip2code.com/Snippet/1525/Take-at-notifications-for-node-webkit-wi/

GitHub 's source code:

https://gist.github.com/miklschmidt/5896306

2.node-webkit: Child window call Parent window

https://github.com/rogerwang/node-webkit/issues/456

Attached: Node-webkit Program running example

You may also is interested in our Demos repository and the List of apps and companies using Node-webkit.

Quick Start

Create index.html:

<! DOCTYPE html>

<title>hello world!</title>

<body>

We are using the node. js <script>document.write (process.version) </script>.

</body>

Create Package.json:

{

"Name": "Nw-demo",

"Main": "Index.html"

}

Compress index.html and Package.json into a zip archive called APP.NW:

$ zip app.nw index.html Package.json

This should create a structure like this:

App.nw

|--Package.json

'--index.html

Download the prebuilt binary for your platform and use it to open the App.nw file:

$./NW APP.NW

Note:on Windows, you can drag the APP.NW to Nw.exe to open it.

Node-webkit Push Information Research

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.