pokki api

pokki.addContextMenuItem(text,identifier)

Textual string to display to users in the context menu item

identifier   Internal identifier used when listening for context_menu event.

Adds a menu item to your app's   context menu during run-time;

pokki.addEventListener('event_name', function(){});

event_name   The event to listen for.

function    Afunction or the name of a function to call  when the events is fired.

1 context menu   Fires when the user selects a developer defined item 

in the context menu; pass the identifier associated with the menu item

hidden   Fires after the hiding event, once the app window is not visible

hiding Fires as the minimizes due to a usr action 

link Fires when the url of the window is changed or a new window tries to be open ed from 

the popup;

passes the URL trying to be opend , and ignores the request

showing   Fires when the user clicks on your app's icon and the app window animates in 

shown   Fires after the showing event, once the app window is done animating in 

unload  Fires four seconds before the app and both it's page are unloaded by pokki

work_area_change Fires when the work area changes due to a user changing their display resolution

fullscreen Fires when user presses the full screen button in the window title bar

pokki.clearWebSheetCookies

clears cookies and local  storage associated with web sheets used in yur app.

pokki.hide();

Minimizes the app window if it's currently shown,  may only be called from the window page.

pokki.descramble(scrambled_data)

Used to descramble data.

pokki.getScrambled(key)

retrieves and descrambles data from your app's manifest file.

The data is identified with a key. If your app is 

bing developed locally and isn't yet packaged  meaning your data ism't 

scrambled  

pokki.getWorkAreaSize

returns an object with the dimensions of the available work area. The work area is the 

is the maximum portion of the sreen that a popup window may use.

pokki.hideWebSheet

closes any open web sheet displayed in the popup window.

pokki.isShow()

Used to queyer whether or not the app window is currently visible.

pokki.show();

Opens the app window; may only be called within 5 second of the context_menu event

fireing 

pokki.openURLInDefaultBrowser

The URL to open in the user's prefrerred web browser.

pokki.removeIconBadge

removes the badge displayed on your app's icon in the taskbar

pokki.resetContextMenu

pokki.resetContextMenu

removes context menu items that were defined in the maifest file or added 

during 

pokki.rpc

a string containing Javascript commands to run in the context of  the opposing page 

pokki.rpcArgs

pokki.scramble(data);

An arbitrary complex Js object to obfuscate.

Used to obfuscate sensitive data during run-time ,   

pokki.setIconBadge(number);

pokki.setWindowFeature(feature,value);

 The name of the feature being modified    

Used to configure window features on a per app basis  The fowwloing features are supported.

1 fullscreen   Pass rue if the app currently supports full-screen or false to specify it can not.

May be called multiple times throup the app's runtime 

aspect Pass a decimal to specify the aspect ratio to hich the window is locked whilc the user resizes.  

pokki.showWebSheet(url,width,height,loading_callback,error_callback)

;a 

a  web sheet is a chromeless browser embedded in the popup that is intended to be used with OAuth 

and similar protocols for authentication

The popup window is temporarily resized to rit the specified width and height

and will restore its original dimensions when the web sheet is hidden.

The web sheet will be displayed once the initial page is loaded as specieied by the url parameter

  

原文地址:https://www.cnblogs.com/yushunwu/p/2765497.html