包含结目的h5f3所有微信h5页面制作,现在以wwWh5f3com无法在显示了

Posts - 137,
Articles - 0,
Comments - 208
专注WEB全栈开发
19:37 by slmk, ... 阅读,
本文系博主原创,未经许可不得转载。如未经本人同意,私自转载或盗取资源提供下载,本人保留追究其法律责任的权利。
调试基于WebView的Hybrid App最舒服的工具当然是Chrome自带的开发者工具,其中有我们熟悉的Dom树调试,JS调试,Network监视等等功能。
Google提供的调试Android上WebView的步骤:
开启手机上的USB调试功能
打开Chrome浏览器,地址栏输入:Chrome://inspect,回车
Chrome会自动检测手机上打开的App,并列出可调试的WebView页面,如图:
点击Inspect,弹出开发者工具进行调试(Android4.4开始支持,老版本Android检测不到webview)
问题就出现在这里,对于国内的程序猿来说,由于无法访问 ,只能出现空白页面:
Chrome为什么要去访问那个网址呢?而不是提供本地的解决方案?我猜想是版本问题,对于海量版本,都打包到Chrome安装程序里,势必会大大增加安装包的体积。例如上面的 @169177 就是其中的一个版本号,当你换一个手机或模拟器,版本号可能就不一样了。因为不同型号的手机生产商可能会打包不同版本的chrome浏览器内核。
&解决方法有两种:
最直接的方法:FQ。Fan墙最大的问题是换手机后或FQ不能用后,还需要满世界找出口,我曾经被折磨的体无完肤。
(已支持56款手机,一劳永逸,永久使用!支持windows/mac/linux)
由于是离线开发者工具包,当你点击Inspect时就不用再去Google下载了,而是直接从本地加载。从而达到了不FQ使用Inspect调试的目的。
注意:电脑端需要使用正式版Chrome,Dev版本不支持的。
如果合并包的56个版本号不包含您的版本号,如上图红色方框里的。可将空白页面标题截图给我,10分钟可完成定制。
为了解决调试不同的手机需要加载不同版本的Inspect工具包的问题,我花时间合并了大家常用手机需要的离线调试工具包。
定制版体积小,适合只调试一个手机的朋友。合并版体积大,适合需要调试多个手机的朋友,不需要来回切换。
身处国内,曾无数次被WebView的调试折磨的苦不堪言/体无完肤/暴跳如雷/提前进入更年期。
对于资深的web开发者,调试是必不可少的。希望为国内的开发者提供完美的WebView调试解决方案,总得有人去做这件事。
增加1个专用版
@f412f53af6f3abcd59dad2e88ff87d (电脑端需要使用65以上Chrome)
增加1个专用版
@b501c71ef4be33c0d5a672b9195d4
增加2个专用版
@2fc3d974b1e3b5c36e
@58a8bea874fcfa2cd0b21b8a21a0
增加4个专用版
@1b9cbad892feabec
@fa6a5d87adff761bc16afc4c1daa68
@d4f19c75b6a346fddbbdec4e7208012cfeee6b20
增加4个专用版
@adfe4ccacde93f4ec86ad
@640c2bda015a7dc7c7f2fa47fbf5a1fd4043dbfa
@700a0e589ecfa7e0f65cace17e2f75470c4adf9d
@e51b8e168cb9fe9c2cc
增加3个专用版
@9c06acb9afd3386a
@7fb7c8914adbc018590eec1ede150
@24d4006dbba35a7c12
增加3个专用版
@b10fce996f8c4ef8e2aa26b47704e
@ca8deb7ac524b88c932fe6fa1141f
@8515efb267b5ffbb2a2be871e2ed20
&以上版本号只能发专用版
有的朋友找不到手机预览界面,特别说明一下:
chrome版本号30左右的没有预览界面,其他版本的见下图
如果预览界面出现空白,可能是inspect的页面不是手机屏幕上当前显示的页面。&但是预览这东西我很少用,一方面因为卡顿,不如直接看手机流畅;一方面因为前端界面都是自己写得,直接找elements也很方便。平常都是关闭预览,手机经过Html元素时,手机上相应的元素会高亮显示,定位元素也很快。
目前支持的版本号(不断更新中):
合并了1个版本,共56个版本(也就是说至少支持56种手机)
@793eb32f50bafcb87fb5d1a0fd3f44e
合并了1个版本,共55个版本
@4fcddfed49d8ec28421e
合并了5个版本,共54个版本
@198977(下载的不全,需要发专用版)@ba56df@f33dd1ce@27e9e15b411edc75adc7ae86e243fd@4e20f443aa0e58beed3ec91879fb
合并了7个版本,共49个版本
@159105@194530@196351@adfe4ccacde93f4ec86ad@d7f1fd1b93bb58c1f59bbef1a4ec59@4d04e702d25b3dd0bd4f3f71dd9f02@d6eefe14e144c0ab7af8b616f6d8c46
&增加42个版本,几乎包含了所有正式版chrome
@169177 &   chrome/33.0.0.0
@170502& & & & chrome/34.0.@178678   chrome/36.0.@180870   chrome/37.0.@183147   chrome/38.0.
@185626   chrome/39.0.2171.93@186555   chrome/39.0.@188492   chrome/40.0.2214.89@189407   chrome/40.0.@189455   chrome/40.0.@193433   chrome/42.0.@196332   chrome/43.0.2357.93@199588   chrome/44.0.@200258   chrome/44.0. (pc端需要稍低版本的chrome,如54。最新版布局会乱的)@202161   chrome/45.0.2454.94@3e7f8b0890dcd82aa    chrome/46.0.2490.76@9c8ad225da157e084f9532ada53365    chrome/47.0.2526.83@10b809a56ff308f183b0a76abecc    chrome/48.0.2564.95@eb37beb4e4de2da8f374    chrome/49.0.@78c36d241d8eebad599e33e13fe50fab    chrome/50.0.2661.89@211d45a5b74b06d12bb016f3c4d54095faf2646f    chrome/51.0.2704.81@f6f109cac2aba90ba6f01d89bd216f6b    chrome/51.0.2704.91@799386cbf7c1cbf70c12c0e593b2b2e23e39ba30    chrome/52.0.2743.98@7fb7c8914adbc018590eec1ede150    chrome/53.0.
@ee72f35daca4295b2ceb   chrome/54.0.2840.68@0025f7fed6eadcb489a092ed7a72c0b   chrome/54.0.2840.85@29f276b1ed3d8a76a0a1ae59734cca523f0c29c7   chrome/55.0.2883.84@733808abc67b7fce93430fcbbffe4639   chrome/55.0.2883.91@0e9a9a6fcd9b3f62bd5   chrome/56.0.2924.87@a000f5daeaac3ff6eaab57aa0e00ae9   chrome/57.0.(遗漏了,需要发专用版)@b4985a3bb511b41bd9   chrome/57.0.@fee3b02ba8efad40ab2e3d761c06d1   chrome/57.0.(新版微信封装了此内核,也造成了)@e76cc6b93d194dac46a61dd5cf9894   chrome/58.0.3029.83@b0dab3af93f242c5e6e3a71aa7c2   chrome/59.0.3071.92(遗漏了,需要发专用版)@f9b275dfcb157a6d016dedff659e8d6   chrome/59.0.@af53fec7a758f424e38b77b9498470a   chrome/59.0.@fe383df23283fec9bc8f4e8b67aa0fb   chrome/60.0.3112.78@e90a85748ddfc132eb07d   chrome/60.0.3112.97@1b127f801b731e3c71f30dc03b018   chrome/60.0.@f1afcd24ecb5f4dd4fdc1f8bacd8c   chrome/60.0.@6f76561d02fabc51d3afba83eefdd69e309a8b8c   chrome/61.0.3163.81@76cc846b87194b6def876cab0948c9   chrome/61.0.3163.98
发现极少数手机采用的chrome版本,谷歌没有提供调试工具包。以下手机版本无法调试:
@ec463bff9af00ce9c/锤子手机/ hbuilder-hello
项目语言:JAVASCRIPT
权限:read-only(如需更高权限请先加入项目)
hbuilder-hello/
Index: css/common.css
===================================================================
--- css/common.css (revision 0)
+++ css/common.css (revision 2)
@@ -0,0 +1,192 @@
+ -webkit-user-select:
+ -ms-touch-select:
+ -ms-touch-action:
+ width: 100%;
+ height: 100%;
+ margin: 0;
+ padding: 0;
+ width: 100%;
+ height: 100%;
+ font-family: A
+ font-size:16
+ color: #6c6c6c;
+ -webkit-touch-callout:
+ -webkit-tap-highlight-color:rgba(0,0,0,0);
+ -webkit-text-size-adjust:
+ width: 100%;
+ height: 44
+ position:
+ left: 0;
+ font-size: 20
+ text-align:
+ line-height: 44
+ background: #
+ z-index: 9999;
+ border-bottom: 1px solid rgba(204,204,204,0.8);
+ -ms-touch-action:
+ width:15%;
+ height:100%;
+ overflow:
+ text-overflow:
+ white-space:
+.nvbt:active {
+ background-color: rgba(170,170,170,0.1);
+ width: 70%;
+ height: 100%;
+ overflow:
+ text-overflow:
+ white-space:
+.content {
+ text-align:
+ padding-top: 44
+.scontent {
+ width: 100%;
+ position:
+ bottom: 0
+ text-align:
+ overflow-y:
+ -webkit-overflow-scrolling:
+ -ms-touch-action: pan-y cross-slide-y;
+ -ms-scroll-chaining:
+ -ms-scroll-limit: 0 50 0 50;
+.dcontent {
+ text-align:
+ padding-top: 44
+ padding-bottom: 80
+.sdcontent {
+ width: 100%;
+ position:
+ bottom: 80
+ text-align:
+ overflow-y:
+ -webkit-overflow-scrolling:
+ -ms-touch-action: pan-y cross-slide-y;
+ -ms-scroll-chaining:
+ -ms-scroll-limit: 0 50 0 50;
+.heading {
+ margin:0 1
+ text-align:
+ padding: 0 1
+ text-align:
+ text-indent: 2
+ word-break: break-
+ width: 100%;
+ text-align:
+.button {
+ font-size: 18
+ font-weight:
+ text-decoration:
+ display:
+ text-align:
+ overflow:
+ text-overflow:
+ white-space:
+ color: #FFF;
+ background-color: #FFCC33;
+ border: 1px solid #ECB100;
+ padding: .5em 0
+ margin: .5em .7
+ -webkit-border-radius: 5
+ border-radius: 5
+.button:active {
+ outline: 0;
-webkit-box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);
+ box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);
+.button-waring {
+ color: #666;
+ background-color: #
+ border-color: #e0e0e0;
+.button-select {
+ font-size: 14
+ background-color: #CCCCCC;
+ border: 0;
+ -webkit-border-radius: 2
+ border-radius: 2
+ padding: 0
+ margin: 1
+ background: #
+ border: 1px solid #
+ -webkit-border-radius: 3
+ border-radius: 3
+ overflow:
+ list-style-type:
+ font-size: 1
+ padding: 1
+ border-bottom: inset 1px #
+ vertical-align:
+.ditem:active {
+ background: #f4f4f4;
+.ditem:last-child {
+ border-bottom: inset 0px #
+.ditem-empty {
+ overflow:
+ list-style-type:
+ font-size: 1
+ padding: 1
+ vertical-align:
+#output {
+ height: 64
+ position:
+ left: 0;
+ right: 0;
+ bottom: 0;
+ color: #f00;
+ background: #FFF;
+ font-size: 12
+ line-height: 16
+ word-break: break-
+ z-index: 6666;
+ padding: 8px 16
+ overflow-x:
+ overflow-y:
+ border-top: 2px solid #AAA;
+ -webkit-overflow-scrolling:
+ background: no-repeat center center url(data:image/base64,iVBORw0KGgoAAAANSUhEUgAAAGQAAABYCAYAAAADWlKCAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAAKwwAACsMBNCkkqwAAABZ0RVh0Q3JlYXRpb24gVGltZQAwOS8xMi8xM5w+I3MAAAAcdEVYdFNvZnR3YXJlAEFkb2JlIEZpcmV3b3JrcyBDUzVxteM2AAACcklEQVR4nO3a0XESURiG4TeO99iBWoGZ+RvADtKBpAPtwBLsANJBrEAs4MyYDmIHSQXkgk0mMLK7ILt8/+F778ici394OGfDsher1Qqn05tTD+A2M4hYBhHLIGIZRCyDiGUQsQwilkHEMohYBhHLIGIZRCyDiGUQsQwilkHEMohYBhHLIGIZRCyDiGUQsQwilkHEMohYb089wNCVUq6Ay+blfUQsTjhOZxc1P9tbSlkAX7b+/C0ifpxgnF5Ve2TtwAD4OvIoe1UlSAsGwPsRR9m76kA6MAD+jjTKQVUF0gMD4HaEUQ6umot6T4ybiJgNP83hVbFDasGACnZIT4yfEXE1wjj/Xeod0hPjDpgNPsyRSguyB8Y0Ih6Gn+g4pQSpFQMSgtSMAclAaseARCDngAFJQM4FAxKAnBMGiH8xLKVMgV89ln6MiPthpxkn6R0SEUvgusfSZSnlsnuZftI75LlSygyYdyx7ZH1s/Rl+ouFKAQIvx9ctMGlZlh4lDQhAcywtqRhF+hqyXfMmT1m/6buasL6mzMaY6dilAoENlLuWZRNgnhEl1ZH1ulLKO9bH16eOpdfqz2K9Lt0Oea75EjilfadAsp2SFgQ2UH53LJ2XUr4PPtARSntkbVfL7+rVgEBvlM/NHQDJUh9Z2zWf/puOZbPhJzm8qkDgBaXt/teHcSY5rOpAAJp/c/vclJSrShDYifKI+NPvVV3U/1VzU3LavFyo/25SPUi2qj2ysmYQsQwilkHEMohYBhHLIGIZRCyDiGUQsQwilkHEMohYBhHLIGIZRCyDiGUQsQwilkHEMohYBhHLIGIZRCyDiGUQsZ4Ak9fPFwUy/HsAAAAASUVORK5CYII=);
+ background-size: 50px 44
+ background: no-repeat center center url(data:image/base64,iVBORw0KGgoAAAANSUhEUgAAAGQAAABYCAYAAAADWlKCAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAAKwwAACsMBNCkkqwAAABZ0RVh0Q3JlYXRpb24gVGltZQAwOS8xMi8xM5w+I3MAAAAcdEVYdFNvZnR3YXJlAEFkb2JlIEZpcmV3b3JrcyBDUzVxteM2AAAC2klEQVR4nO3bMU9TURjG8T9qIpskDjqYUAejm5B3MS4yOJoUNzd0dCJ+Av0IMrrVTSfK5oiT05vAJG64OUp0carDOdBbjLWBYp+W55fckHC5Nyf8c+5pk3Pner0epuPCpAdggxxEjIOIcRAxDiLGQcQ4iBgHEeMgYhxEjIOIcRAxDiLGQcQ4iBgHEeMgYhxEjIOIcRAxDiLGQcQ4iBgHEXNp0gMYVWY+BV4DO0AX2I6InYkO6gzMqe9czMwFSog2JcQqsFBPfwW2gW5EdCcywDGTDpKZS0AH6AGPgW/APeAi8AhYAZYal2zRD7T//0Y6PrJBGo+oTeAFME+ZHdfqnxwA+8AP4EY9t8Lg7Dl8tE3N7JEMkpkdYA14FhGdzGwBT4DLQy77Qgl0FXhICdSq5w6oM4cSaH/8ox4P1UV9DXhLWcABrgCfKf/ghb9cc7seUOI8B34CQZk5q5R1iMzcpQTqqH0wUJ0hzUEdLdz15zywSIlzZ4Tb/QL2KLPnFnCfxuyJiLlxjHlcpiHIcQMLd2YuUsK0gOsj3P4rJdAncJCR/CNI08DCnZnzlMdWi+GPN4BXoBdk2r+pLwLrwGaN+A5YBnYjYgN4A3ygzIipoLqon1SbPxfubkS8r797ObmhjWbWgjTdrcc6IPVYGmbaH1kzx0HEOIgYBxHjIGIcRIyDiHEQMQ4ixkHEOIgYBxHjIGIcRIyDiHEQMQ4ixkHEOIgYBxHjIGJUgyzTfznnXJHcBlQ3QO8A1J3vbfobpsfp+5jvd2qSQZrqqwMb9SAz2/TfBWmd8LZ7lFnoIKcVEVuUDdeHb1gdBloadl3DdkR8PKPhnZrkZuuTqO8iNmfP0UZrtQ3Vw8xMkOMy8wElzmpE3Jz0eEY1s0GmlerH3nPLQcQ4iBgHEeMgYhxEjIOIcRAxDiLGQcQ4iBgHEeMgYhxEjIOIcRAxDiLGQcQ4iBgHEeMgYhxEjIOI+Q2gWbiBmTXKQQAAAABJRU5ErkJggg==);
+ background-size: 50px 44
\ No newline at end of file
Index: sa@2x.png
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Index: sa@2x.png
===================================================================
--- sa@2x.png (revision 0)
+++ sa@2x.png (revision 2)
Property changes on: sa@2x.png
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Index: plugintest.html
===================================================================
--- plugintest.html (revision 0)
+++ plugintest.html (revision 2)
@@ -0,0 +1,49 @@
+&!DOCTYPE HTML&
&meta charset=&utf-8&/&
&meta name=&viewport& content=&initial-scale=1.0, maximum-scale=1.0, user-scalable=no&/&
&meta name=&HandheldFriendly& content=&true&/&
&meta name=&MobileOptimized& content=&320&/&
&title&H5Plugin&/title&
&script type=&text/javascript& src=&./js/common.js&&&/script&
&script type=&text/javascript& src=&./js/test.js&&&/script&
&script type=&text/javascript&&
function pluginShow() {
plus.plugintest.PluginTestFunction(&Html5&,&Plus&,&AsyncFunction&,&MultiArgument!&, function( result ) {alert( result[0]
+ &_& + result[1]
+ &_& + result[2]
+ &_& + result[3] );},function(result){alert(result)});
function pluginShowArrayArgu() {
plus.plugintest.PluginTestFunctionArrayArgu( [&Html5&,&Plus&,&AsyncFunction&,&ArrayArgument!&], function( result ) {alert( result );},function(result){alert(result)});
function pluginGetString()
alert(plus.plugintest.PluginTestFunctionSync(&Html5&,&Plus&,&SyncFunction&,&MultiArgument!&));
function pluginGetStringArrayArgu()
var Argus = plus.plugintest.PluginTestFunctionSyncArrayArgu([&Html5&,&Plus&,&SyncFunction&,&ArrayArgument!&]);
alert( Argus.RetArgu1 + &_& +
Argus.RetArgu2 + &_& + Argus.RetArgu3
+ &_& + Argus.RetArgu4 );
&link rel=&stylesheet& href=&./css/common.css& type=&text/css& charset=&utf-8&/&
&div class=&nvbt& onclick=&back();&&&div class=&iback&&&/div&&/div&
&div class=&nvtt&&PluginTest&/div&
&div id=&dcontent& class=&dcontent&&
&div class=&button& onclick=&pluginShow()&&PluginTestFunction()&/div&
&div class=&button& onclick=&pluginShowArrayArgu()&&PluginTestFunctionArrayArgu()&/div&
&div class=&button& onclick=&pluginGetString()&&PluginTestFunctionSync()&/div&
&div class=&button& onclick=&pluginGetStringArrayArgu()&&PluginTestFunctionSyncArrayArgu()&/div&
\ No newline at end of file
Index: audio/shake.wav
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Index: audio/shake.wav
===================================================================
--- audio/shake.wav (revision 0)
+++ audio/shake.wav (revision 2)
Property changes on: audio/shake.wav
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Index: audio/friendship.mp3
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Index: audio/friendship.mp3
===================================================================
--- audio/friendship.mp3 (revision 0)
+++ audio/friendship.mp3 (revision 2)
Property changes on: audio/friendship.mp3
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Index: sa@3x.png
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
Index: sa@3x.png
===================================================================
--- sa@3x.png (revision 0)
+++ sa@3x.png (revision 2)
Property changes on: sa@3x.png
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Index: appstream.json
===================================================================
--- appstream.json (revision 0)
+++ appstream.json (revision 2)
@@ -0,0 +1,449 @@
+ &version&:&1.0&,
+ &protocol&:[&http&,&https&],
+ &rooturl&:&&,
+ &index&:{
&href&:&index.html&,
&resources&:[&manifest.json&,&css/common.css&,&plus/doc.html&,&icon.png&],
&refer&:[&accelerometer&,&audio&,&barcode&,&camera&,&device&,&downloader&,&events&,&file&,&gallery&,&geolocation&,&maps&,&message&,&nativeui&,&navigator&,&orientation&,&oauth&,&payment&,&proximity&,&push&,&runtime&,&share&,&speech&,&statistic&,&storage&,&uploader&,&webview&,&xhr&,&zip&,&njs&,&about&],
&priority&:0
+ &pages&:{
&accelerometer&:{
&href&:&plus/accelerometer.html&,
&resources&:[&js/common.js&],
&refer&:[&accelerometer_shake&,&doc/accelerometer&,&doc/accelerometer&],
&priority&:2
&doc/accelerometer&:{
&href&:&doc/accelerometer.html&,
&resources&:[&doc/res/doc.js&,&doc/res/doc.css&,&doc/res/prettify.js&,&doc/res/prettify.sons.css&],
&priority&:2
&accelerometer_shake&:{
&href&:&plus/accelerometer_shake.html&,
&resources&:[&img/shakeup.png&,&img/shakedown.png&,&audio/shake.wav&,&img/shake/1.jpg&,&img/shake/2.jpg&,&img/shake/3.jpg&,&img/shake/4.jpg&],
&priority&:1
&href&:&plus/audio.html&,
&resources&:[&js/common.js&,&img/arecord.png&,&img/astop.png&,&audio/friendship.mp3&],
&refer&:[&doc/audio&],
&priority&:1
&doc/audio&:{
&href&:&doc/audio.html&,
&resources&:[&doc/res/doc.js&,&doc/res/doc.css&,&doc/res/prettify.js&,&doc/res/prettify.sons.css&],
&priority&:1
&barcode&:{
&href&:&plus/barcode.html&,
&resources&:[&js/common.js&,&img/barcode.png&],
&refer&:[&barcode_scan&,&doc/barcode&],
&priority&:1
&barcode_scan&:{
&href&:&plus/barcode_scan.html&,
&resources&:[],
&priority&:1
&doc/barcode&:{
&href&:&doc/barcode.html&,
&resources&:[&doc/res/doc.js&,&doc/res/doc.css&,&doc/res/prettify.js&,&doc/res/prettify.sons.css&],
&priority&:1
&camera&:{
&href&:&plus/camera.html&,
&resources&:[&js/common.js&],
&refer&:[&camera_image&,&camera_video&,&doc/camera&],
&priority&:1
&camera_image&:{
&href&:&plus/camera_image.html&,
&priority&:1
&camera_video&:{
&href&:&plus/camera_video.html&,
&priority&:1
&doc/camera&:{
&href&:&doc/camera.html&,
&resources&:[&doc/res/doc.js&,&doc/res/doc.css&,&doc/res/prettify.js&,&doc/res/prettify.sons.css&],
&priority&:1
&device&:{
&href&:&plus/device.html&,
&resources&:[&js/common.js&],
&refer&:[&doc/device&],
&priority&:1
&doc/device&:{
&href&:&doc/device.html&,
&resources&:[&doc/res/doc.js&,&doc/res/doc.css&,&doc/res/prettify.js&,&doc/res/prettify.sons.css&],
&priority&:1
&downloader&:{
&href&:&plus/downloader.html&,
&resources&:[&js/common.js&],
&refer&:[&doc/downloader&],
&priority&:1
&doc/downloader&:{
&href&:&doc/downloader.html&,
&resources&:[&doc/res/doc.js&,&doc/res/doc.css&,&doc/res/prettify.js&,&doc/res/prettify.sons.css&],
&priority&:1
&events&:{
&href&:&plus/events.html&,
&resources&:[&js/common.js&],
&refer&:[&doc/events&],
&priority&:1
&doc/events&:{
&href&:&doc/events.html&,
&resources&:[&doc/res/doc.js&,&doc/res/doc.css&,&doc/res/prettify.js&,&doc/res/prettify.sons.css&],
&priority&:1
&href&:&plus/file.html&,
&resources&:[&js/common.js&,&img/fdir.png&,&img/fdisk.png&,&img/ffile.png&,&img/fup.png&],
&refer&:[&doc/file&],
&priority&:1
&doc/file&:{
&href&:&doc/io.html&,
&resources&:[&doc/res/doc.js&,&doc/res/doc.css&,&doc/res/prettify.js&,&doc/res/prettify.sons.css&],
&priority&:1
&gallery&:{
&href&:&plus/gallery.html&,
&resources&:[&js/common.js&],
&refer&:[&doc/gallery&],
&priority&:1
&doc/gallery&:{
&href&:&doc/gallery.html&,
&resources&:[&doc/res/doc.js&,&doc/res/doc.css&,&doc/res/prettify.js&,&doc/res/prettify.sons.css&],
&priority&:1
&geolocation&:{
&href&:&plus/geolocation.html&,
&resources&:[&js/common.js&],
&refer&:[&doc/geolocation&],
&priority&:1
&doc/geolocation&:{
&href&:&doc/geolocation.html&,
&resources&:[&doc/res/doc.js&,&doc/res/doc.css&,&doc/res/prettify.js&,&doc/res/prettify.sons.css&],
&priority&:1
&href&:&plus/maps.html&,
&resources&:[&js/common.js&],
&refer&:[&maps_map&,&doc/maps&],
&priority&:1
&maps_map&:{
&href&:&plus/maps_map.html&,
&resources&:[],
&refer&:[&maps_map_sub&],
&priority&:1
&maps_map_sub&:{
&href&:&plus/maps_map_sub.html&,
&resources&:[],
&priority&:1
&doc/maps&:{
&href&:&doc/maps.html&,
&resources&:[&doc/res/doc.js&,&doc/res/doc.css&,&doc/res/prettify.js&,&doc/res/prettify.sons.css&],
&priority&:1
&message&:{
&href&:&plus/message.html&,
&resources&:[&js/common.js&,&img/helloh5.jpg&],
&refer&:[&doc/message&],
&priority&:1
&doc/message&:{
&href&:&doc/messaging.html&,
&resources&:[&doc/res/doc.js&,&doc/res/doc.css&,&doc/res/prettify.js&,&doc/res/prettify.sons.css&],
&priority&:1
&nativeui&:{
&href&:&plus/nativeui.html&,
&resources&:[&js/common.js&,&img/waiting.png&,&plus/nativeui_waiting.html&],
&refer&:[&doc/nativeui&],
&priority&:1
&doc/nativeui&:{
&href&:&doc/nativeUI.html&,
&resources&:[&doc/res/doc.js&,&doc/res/doc.css&,&doc/res/prettify.js&,&doc/res/prettify.sons.css&],
&priority&:1
&navigator&:{
&href&:&plus/navigator.html&,
&resources&:[&js/common.js&],
&refer&:[&navigator_status&,&doc/navigator&],
&priority&:1
&doc/navigator&:{
&href&:&doc/navigator.html&,
&resources&:[&doc/res/doc.js&,&doc/res/doc.css&,&doc/res/prettify.js&,&doc/res/prettify.sons.css&],
&priority&:1
&navigator_status&:{
&href&:&plus/navigator_status.html&,
&resources&:[],
&priority&:1
&href&:&plus/oauth.html&,
&resources&:[&js/common.js&],
&refer&:[&doc/oauth&],
&priority&:1
&doc/oauth&:{
&href&:&doc/oauth.html&,
&resources&:[&doc/res/doc.js&,&doc/res/doc.css&,&doc/res/prettify.js&,&doc/res/prettify.sons.css&],
&priority&:1
&orientation&:{
&href&:&plus/orientation.html&,
&resources&:[&js/common.js&],
&refer&:[&orientation_level&,&orientation_compass&,&doc/orientation&],
&priority&:1
&doc/orientation&:{
&href&:&doc/orientation.html&,
&resources&:[&doc/res/doc.js&,&doc/res/doc.css&,&doc/res/prettify.js&,&doc/res/prettify.sons.css&],
&priority&:1
&orientation_level&:{
&href&:&plus/orientation_level.html&,
&resources&:[&img/orientationbg.png&,&img/orientationl.png&,&img/orientationb.png&],
&priority&:1
&orientation_compass&:{
&href&:&plus/orientation_compass.html&,
&resources&:[&img/orientationbg.png&,&img/orientationc.png&,&img/orientationa.png&],
&priority&:1
&payment&:{
&href&:&plus/payment.html&,
&resources&:[&js/common.js&],
&refer&:[&doc/payment&],
&priority&:1
&doc/payment&:{
&href&:&doc/payment.html&,
&resources&:[&doc/res/doc.js&,&doc/res/doc.css&,&doc/res/prettify.js&,&doc/res/prettify.sons.css&],
&priority&:1
&proximity&:{
&href&:&plus/proximity.html&,
&resources&:[&js/common.js&],
&refer&:[&doc/proximity&],
&priority&:1
&doc/proximity&:{
&href&:&doc/proximity.html&,
&resources&:[&doc/res/doc.js&,&doc/res/doc.css&,&doc/res/prettify.js&,&doc/res/prettify.sons.css&],
&priority&:1
&href&:&plus/push.html&,
&resources&:[&js/common.js&],
&refer&:[&doc/push&],
&priority&:1
&doc/push&:{
&href&:&doc/push.html&,
&resources&:[&doc/res/doc.js&,&doc/res/doc.css&,&doc/res/prettify.js&,&doc/res/prettify.sons.css&],
&priority&:1
&runtime&:{
&href&:&plus/runtime.html&,
&resources&:[&js/common.js&],
&refer&:[&runtime_launch&,&doc/runtime&],
&priority&:1
&doc/runtime&:{
&href&:&doc/runtime.html&,
&resources&:[&doc/res/doc.js&,&doc/res/doc.css&,&doc/res/prettify.js&,&doc/res/prettify.sons.css&],
&priority&:1
&runtime_launch&:{
&href&:&plus/runtime_launch.html&,
&resources&:[],
&priority&:1
&href&:&plus/share.html&,
&resources&:[&js/common.js&,&img/add.png&,&logo.png&],
&refer&:[&doc/share&],
&priority&:1
&doc/share&:{
&href&:&doc/share.html&,
&resources&:[&doc/res/doc.js&,&doc/res/doc.css&,&doc/res/prettify.js&,&doc/res/prettify.sons.css&],
&priority&:1
&speech&:{
&href&:&plus/speech.html&,
&resources&:[&js/common.js&],
&refer&:[&doc/speech&],
&priority&:1
&doc/speech&:{
&href&:&doc/speech.html&,
&resources&:[&doc/res/doc.js&,&doc/res/doc.css&,&doc/res/prettify.js&,&doc/res/prettify.sons.css&],
&priority&:1
&statistic&:{
&href&:&plus/statistic.html&,
&resources&:[&js/common.js&],
&refer&:[&doc/statistic&],
&priority&:1
&doc/statistic&:{
&href&:&doc/statistic.html&,
&resources&:[&doc/res/doc.js&,&doc/res/doc.css&,&doc/res/prettify.js&,&doc/res/prettify.sons.css&],
&priority&:1
&storage&:{
&href&:&plus/storage.html&,
&resources&:[&js/common.js&],
&refer&:[&doc/storage&],
&priority&:1
&doc/storage&:{
&href&:&doc/storage.html&,
&resources&:[&doc/res/doc.js&,&doc/res/doc.css&,&doc/res/prettify.js&,&doc/res/prettify.sons.css&],
&priority&:1
&uploader&:{
&href&:&plus/uploader.html&,
&resources&:[&js/common.js&,&plus/uploader_ret.html&],
&refer&:[&doc/uploader&],
&priority&:1
&doc/uploader&:{
&href&:&doc/uploader.html&,
&resources&:[&doc/res/doc.js&,&doc/res/doc.css&,&doc/res/prettify.js&,&doc/res/prettify.sons.css&],
&priority&:1
&webview&:{
&href&:&plus/webview.html&,
&resources&:[&js/common.js&],
&refer&:[&doc/webview&,&webview_animation&,&webview_embed&,&webview_float&,&webview_pullhead&,&webview_pullhead_custom&,&webview_mask&],
&priority&:1
&doc/webview&:{
&href&:&doc/webview.html&,
&resources&:[&doc/res/doc.js&,&doc/res/doc.css&,&doc/res/prettify.js&,&doc/res/prettify.sons.css&],
&priority&:1
&webview_animation&:{
&href&:&plus/webview_animation.html&,
&resources&:[],
&refer&:[&webview_new&],
&priority&:1
&webview_new&:{
&href&:&plus/webview_new.html&,
&resources&:[&img/ui.png&],
&priority&:1
&webview_embed&:{
&href&:&plus/webview_embed.html&,
&resources&:[],
&priority&:1
&webview_float&:{
&href&:&plus/webview_float.html&,
&resources&:[],
&priority&:1
&webview_pullhead&:{
&href&:&plus/webview_pullhead.html&,
&resources&:[],
&refer&:[&webview_pullrefresh&],
&priority&:1
&webview_pullrefresh&:{
&href&:&plus/webview_pullrefresh.html&,
&resources&:[],
&priority&:1
&webview_pullhead_custom&:{
&href&:&plus/webview_pullhead_custom.html&,
&resources&:[],
&refer&:[&webview_pullrefresh_custom&],
&priority&:1
&webview_pullrefresh_custom&:{
&href&:&plus/webview_pullrefresh_custom.html&,
&resources&:[&img/pull_arrow.png&,&img/pull_fresh.png&],
&priority&:1
&webview_mask&:{
&href&:&plus/webview_mask.html&,
&resources&:[&js/common.js&,&plus/webview_mask_side.html&],
&priority&:1
&href&:&plus/xhr.html&,
&resources&:[&js/common.js&],
&refer&:[&doc/xhr&],
&priority&:1
&doc/xhr&:{
&href&:&doc/xhr.html&,
&resources&:[&doc/res/doc.js&,&doc/res/doc.css&,&doc/res/prettify.js&,&doc/res/prettify.sons.css&],
&priority&:1
&href&:&plus/zip.html&,
&resources&:[&js/common.js&],
&refer&:[&doc/zip&],
&priority&:1
&doc/zip&:{
&href&:&doc/zip.html&,
&resources&:[&doc/res/doc.js&,&doc/res/doc.css&,&doc/res/prettify.js&,&doc/res/prettify.sons.css&],
&priority&:1
&href&:&plus/njs.html&,
&resources&:[&js/common.js&],
&refer&:[&doc/njs&,&njs_android_shortcut&,&njs_efficient&,&njs_ios_gamecenter&],
&priority&:1
&doc/njs&:{
&href&:&doc/native.js.html&,
&resources&:[&doc/ios.html&,&doc/android.html&,&doc/res/doc.js&,&doc/res/doc.css&,&doc/res/prettify.js&,&doc/res/prettify.sons.css&],
&priority&:1
&njs_android_shortcut&:{
&href&:&plus/njs_android_shortcut.html&,
&resources&:[],
&priority&:3
&njs_efficient&:{
&href&:&plus/njs_efficient.html&,
&resources&:[],
&priority&:2
&njs_ios_gamecenter&:{
&href&:&plus/njs_ios_gamecenter.html&,
&resources&:[&img/5.jpg&],
&priority&:1
&href&:&about.html&,
&resources&:[&img/h5p.jpg&],
&priority&:1
\ No newline at end of file
Index: doc/speech.html
===================================================================
--- doc/speech.html (revision 0)
+++ doc/speech.html (revision 2)
@@ -0,0 +1,155 @@
+&!DOCTYPE HTML&
+&meta charset=&utf-8&&
+&meta name=&viewport& content=&initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no&&
+&meta name=&HandheldFriendly& content=&true&&
+&meta name=&MobileOptimized& content=&320&&
+&title&Hello H5+&/title&
+&link rel=&stylesheet& type=&text/css& href=&res/doc.css& charset=&utf-8&&
+&link rel=&stylesheet& type=&text/css& href=&res/prettify.sons.css& charset=&utf-8&&
+&script type=&text/javascript& src=&res/doc.js& charset=&utf-8&&&/script&&script type=&text/javascript& src=&res/prettify.js& charset=&utf-8&&&/script&
+&body&&div id=&content& class=&content&&
+&h1&&a name=&plus.speech&&speech&/a&&/h1&
+&p&Speech模块管理语音输入功能,提供语音识别功能,可支持用户通过麦克风设备进行语音输入内容。通过plus.speech可获取语音输入管理对象。&/p&
+&h2&方法:&/h2&
+&a href=&#plus.speech.startRecognize&&startRecognize&/a&: 启动语音识别&/li&
+&a href=&#plus.speech.stopRecognize&&stopRecognize&/a&: 停止语音识别&/li&
+&h2&对象:&/h2&
+&a href=&#plus.speech.SpeechRecognizeOption&&SpeechRecognizeOption&/a&: JSON对象,语音识别参数&/li&&/ul&
+&h2&回调方法:&/h2&
+&a href=&#plus.speech.RecognitionSuccessCallback&&RecognitionSuccessCallback&/a&: 语音识别成功回调&/li&
+&a href=&#plus.speech.RecognitionErrorCallback%20&&RecognitionErrorCallback &/a&: 语音识别失败回调&/li&
+&h2&权限:&/h2&
+&p&permissions&/p&
+&pre class=&prettyprint linenums&&
+&Speech&: {
+ &description&: &访问语音插件&
+&h1&&a name=&plus.speech.SpeechRecognizeOption&&SpeechRecognizeOption&/a&&/h1&
+&p&JSON对象,语音识别参数&/p&
+&pre class=&prettyprint linenums&&
+interface plus.speech.SpeechRecognizeOption {
+ attribute DOMS
+ attribute DOMS
+ attribute N
+ attribute DOMS
+ attribute B
+ attribute N
+ attribute Boolean userI
+ attribute EventH
+ attribute EventH
+ attribute EventH
+ attribute EventH
+ attribute EventHand
+ attribute EventHa
+&h2&说明:&/h2&
+&p class=&des&&
+ 控制语音识别引擎内部参数,在JS中为JSON对象,在启动语音识别时使用。
+&h2&属性:&/h2&
+&li&engine: &em&(&font class=&type&&DOMString&/font&
+)&/em&语音识别引擎标识&br&&p&用于兼容多语音识别引擎的浏览器,建议使用语音识别厂商的产品名称,如未设置或设置不正确则使用浏览器默认的语音识别引擎。&/p&
+&li&service: &em&(&font class=&type&&DOMString&/font&
+)&/em&语音识别引擎服务器地址&br&&p&可使用url地址或ip地址,如service:192.168.1.99指定定制的语音识别引擎服务器。默认值为浏览器内置服务器地址。&/p&
+&li&timeout: &em&(&font class=&type&&Number&/font&
+)&/em&语音识别超时时间&br&&p&语音识别超时的时间,单位为ms,如timeout:60000,默认值为10s。&/p&
+&li&lang: &em&(&font class=&type&&DOMString&/font&
+)&/em&语音识别引擎的语言&br&&p&用于定义语音识别引擎的语言,其取值需符合W3C的Language codes规范。默认值为浏览器的默认语言。&/p&
+&li&continue: &em&(&font class=&type&&Boolean&/font&
+)&/em&语音识别是否采用持续模式&br&&p&设置为true表示语音引擎不会根据语音输入自动结束,识别到文本内容将多次调用successCallback函数返回,如果需要结束语音识别则必须调用stopRecognize接口,默认值为false。&/p&
+&li&nbest: &em&(&font class=&type&&Number&/font&
+)&/em&指定识别结果识别包括多候选结果&br&&p&用于指定识别结果识别包括多候选结果。如nbest:3,识别返回3个候选结果,默认值为1。&/p&
+&li&userInterface: &em&(&font class=&type&&Boolean&/font&
+)&/em&识别时是否显示用户界面&br&&p&用于指定识别时是否显示用户界面,设置为true表示显示浏览器内置语音识别界面;设置为false表示不显示浏览器内置语音识别界面。默认值为true。&/p&
+&li&onstart: &em&(&font class=&type&&EventHandler&/font&
+)&/em&语音识别开始事件&br&&p&事件函数,语音识别开始启动,在调用startRecognize方法后触发,与onend事件成对触发。&/p&
+&li&onend: &em&(&font class=&type&&EventHandler&/font&
+)&/em&语音识别结束事件&br&&p&事件函数,语音识别结束,在调用stopRecognize方法后触发,或者在引擎内部自动完成语音识别后触发,与onstart事件成对触发。&/p&
+&li&onaudiostart: &em&(&font class=&type&&EventHandler&/font&
+)&/em&录音开始事件&br&&p&事件函数,录音开始事件,启动语音识别后,调用设备麦克风设备开始一段语音录音时触发,与onaudioend事件成对触发。&/p&
+&li&onaudioend: &em&(&font class=&type&&EventHandler&/font&
+)&/em&录音结束事件&br&&p&事件函数,录音结束事件,调用麦克风完成一段语音录音时触发,与onaudiostart事件成对触发。&/p&
+&li&onrecognizestart: &em&(&font class=&type&&EventHandler&/font&
+)&/em&录音识别开始事件&br&&p&事件函数,录音识别开始事件,开始对语音录音数据分析识别,与onrecognizeend事件成对触发。&/p&
+&li&onrecognizeend: &em&(&font class=&type&&EventHandler&/font&
+)&/em&录音识别结束事件&br&&p&事件函数,录音识别结束事件,开始对语音录音数据分析识别完成,与onrecognizestart事件成对触发。&/p&
+&h1&&a name=&plus.speech.RecognitionSuccessCallback&&RecognitionSuccessCallback&/a&&/h1&
+&p&语音识别成功回调&/p&
+&pre class=&prettyprint linenums&&
+void RecognitionSuccessCallback ( results ) {
+ // Recognition success code
+&h2&说明:&/h2&
+&p class=&des&&当语音识别成功时的回调函数,用于返回语音识别出的文本内容。&/p&
+&h2&参数:&/h2&
+&ul&&li&results:
&font class=&type&&DOMString[]&/font&
必选 &/em&语音识别出的文本内容数组&br&语音识别出的候选文本内容,区配度高的在数组的前面,通过其length属性可获取总的候选内容的长度&/li&&/ul&
+&h2&返回值:&/h2&
+&font class=&type&&void&/font&
: 无&h1&&a name=&plus.speech.RecognitionErrorCallback%20&&RecognitionErrorCallback &/a&&/h1&
+&p&语音识别失败回调&/p&
+&pre class=&prettyprint linenums&&
+void RecognitionErrorCallback ( error ) {
+ // Recognition error code
+&h2&说明:&/h2&
+&p class=&des&&当语音识别失败时的回调函数,用于返回语音识别失败的错误信息。&/p&
+&h2&参数:&/h2&
+&ul&&li&error:
&font class=&type&&DOMException&/font&
必选 &/em&语音识别失败的错误信息&br&
+&/li&&/ul&
+&h2&返回值:&/h2&
+&font class=&type&&void&/font&
: 无&br&&br&
+&/div&&/body&
Index: doc/accelerometer.html
===================================================================
--- doc/accelerometer.html (revision 0)
+++ doc/accelerometer.html (revision 2)
@@ -0,0 +1,129 @@
+&!DOCTYPE HTML&
+&meta charset=&utf-8&&
+&meta name=&viewport& content=&initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no&&
+&meta name=&HandheldFriendly& content=&true&&
+&meta name=&MobileOptimized& content=&320&&
+&title&Hello H5+&/title&
+&link rel=&stylesheet& type=&text/css& href=&res/doc.css& charset=&utf-8&&
+&link rel=&stylesheet& type=&text/css& href=&res/prettify.sons.css& charset=&utf-8&&
+&script type=&text/javascript& src=&res/doc.js& charset=&utf-8&&&/script&&script type=&text/javascript& src=&res/prettify.js& charset=&utf-8&&&/script&
+&body&&div id=&content& class=&content&&
+&h1&&a name=&plus.accelerometer&&accelerometer&/a&&/h1&
+&p&Accelerometer模块管理设备加速度传感器,用于获取设备加速度信息,包括x(屏幕水平方向)、y(垂直屏幕水平方向)、z(垂直屏幕平面方向)三个方向的加速度信息。通过plus.accelerometer获取设备加速度传感器管理对象。&/p&
+&h2&方法:&/h2&
+&a href=&#plus.accelerometer.getCurrentAcceleration&&getCurrentAcceleration&/a&: 获取当前设备的加速度信息&/li&
+&a href=&#plus.accelerometer.watchAcceleration&&watchAcceleration&/a&: 监听设备加速度变化信息&/li&
+&a href=&#plus.accelerometer.clearWatch&&clearWatch&/a&: 关闭监听设备加速度信息&/li&
+&h2&对象:&/h2&
+&a href=&#plus.accelerometer.Acceleration&&Acceleration&/a&: 设备加速度信息对象&/li&
+&a href=&#plus.accelerometer.AccelerometerOption&&AccelerometerOption&/a&: 监听设备加速度感应器参数&/li&
+&h2&回调方法:&/h2&
+&a href=&#plus.accelerometer.AccelerometerSuccessCallback&&AccelerometerSuccessCallback&/a&: 获取设备加速度信息成功的回调函数&/li&
+&a href=&#plus.accelerometer.AccelerometerErrorCallback&&AccelerometerErrorCallback&/a&: 获取设备加速度信息失败的回调函数&/li&
+&h2&权限:&/h2&
+&p&permissions&/p&
+&pre class=&prettyprint linenums&&
+&Accelerometer&: {
+ &description&: &访问加速度感应器设备&
+&h1&&a name=&plus.accelerometer.Acceleration&&Acceleration&/a&&/h1&
+&p&设备加速度信息对象&/p&
+&pre class=&prettyprint linenums&&
+interface Acceleration {
+ readonly attribute Number xA
+ readonly attribute Number yA
+ readonly attribute Number zA
+&h2&说明:&/h2&
+&p class=&des&&
+ JSON对象,保存获取设备的加速度信息,包括x、y、z三个方向的加速度信息。
+&h2&属性:&/h2&
+&li&xAxis: &em&(&font class=&type&&Number&/font&
+)&/em&x轴方向的加速度&br&&p&获取当前设备x轴方向的加速度,浮点型数据,与物理学中的加速度值一致。&/p&
+&li&yAxis: &em&(&font class=&type&&Number&/font&
+)&/em&y轴方向的加速度&br&&p&获取当前设备y轴方向的加速度,浮点型数据,与物理学中的加速度值一致。&/p&
+&li&zAxis: &em&(&font class=&type&&Number&/font&
+)&/em&z轴方向的加速度&br&&p&获取当前设备z轴方向的加速度,浮点型数据,与物理学中的加速度值一致。&/p&
+&h1&&a name=&plus.accelerometer.AccelerometerOption&&AccelerometerOption&/a&&/h1&
+&p&监听设备加速度感应器参数&/p&
+&pre class=&prettyprint linenums&&
+interface Acceleration {
+ readonly attribute DOMS
+&h2&说明:&/h2&
+&p class=&des&&
+ JSON对象,用于设置获取设备加速度信息的参数。
+&h2&属性:&/h2&
+&ul&&li&frequency: &em&(&font class=&type&&Number&/font&
+)&/em&更新加速度信息间隔时间&br&&p&监听器获取加速度信息的时间间隔,单位为ms,默认值为500ms&/p&
+&/li&&/ul&
+&h1&&a name=&plus.accelerometer.AccelerometerSuccessCallback&&AccelerometerSuccessCallback&/a&&/h1&
+&p&获取设备加速度信息成功的回调函数&/p&
+&pre class=&prettyprint linenums&&
+void onSuccess( acceleration ) {
+ // Get acceleration code.
+&h2&参数:&/h2&
+&ul&&li&acceleration:
&a href=&#plus.accelerometer.Acceleration&&Acceleration&/a&
必选 &/em&设备的加速度信息&br&
+ Acceleration类型对象,用于获取各方向的详细加速度值。
&/li&&/ul&
+&h2&返回值:&/h2&
+&font class=&type&&void&/font&
: 无&h1&&a name=&plus.accelerometer.AccelerometerErrorCallback&&AccelerometerErrorCallback&/a&&/h1&
+&p&获取设备加速度信息失败的回调函数&/p&
+&pre class=&prettyprint linenums&&
+function void onAccelerometerError( Exception error ) {
+ // Handle error
+ var code = error. // 错误编码
+ var message = error. // 错误描述信息
+&h2&参数:&/h2&
+&ul&&li&error:
&font class=&type&&Exception&/font&
必选 &/em&获取加速度操作的错误信息&br&
+ 可通过error.code(Number类型)获取错误编码;
+ 可通过error.message(String类型)获取错误描述信息。
&/li&&/ul&
+&h2&返回值:&/h2&
+&font class=&type&&void&/font&
: 无&br&&br&
+&/div&&/body&
Index: doc/payment.html
===================================================================
--- doc/payment.html (revision 0)
+++ doc/payment.html (revision 2)
@@ -0,0 +1,177 @@
+&!DOCTYPE HTML&
+&meta charset=&utf-8&&
+&meta name=&viewport& content=&initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no&&
+&meta name=&HandheldFriendly& content=&true&&
+&meta name=&MobileOptimized& content=&320&&
+&title&Hello H5+&/title&
+&link rel=&stylesheet& type=&text/css& href=&res/doc.css& charset=&utf-8&&
+&link rel=&stylesheet& type=&text/css& href=&res/prettify.sons.css& charset=&utf-8&&
+&script type=&text/javascript& src=&res/doc.js& charset=&utf-8&&&/script&&script type=&text/javascript& src=&res/prettify.js& charset=&utf-8&&&/script&
+&body&&div id=&content& class=&content&&
+&h1&&a name=&plus.payment&&payment&/a&&/h1&
+&p&Payment模块管理支付功能,用于提供网页安全支付能力,支持通过Web接口进行支付操作。通过plus.payment可获取支付管理对象。&/p&
+&h2&方法:&/h2&
+&a href=&#plus.payment.getChannels&&getChannels&/a&: 获取支付通道&/li&
+&a href=&#plus.payment.request&&request&/a&: 请求支付操作&/li&
+&h2&对象:&/h2&
+&a href=&#plus.payment.PaymentChannel&&PaymentChannel&/a&: 支付通道对象&/li&
+&a href=&#plus.payment.PaymentResult&&PaymentResult&/a&: 支付操作结果对象&/li&
+&h2&回调方法:&/h2&
+&a href=&#plus.payment.ChannelsSuccessCallback%20&&ChannelsSuccessCallback &/a&: 获取支付通道成功回调&/li&
+&a href=&#plus.payment.PaymentSuccessCallback&&PaymentSuccessCallback&/a&: 支付操作成功回调&/li&
+&a href=&#plus.payment.PaymentErrorCallback&&PaymentErrorCallback&/a&: 支付操作失败回调&/li&
+&h2&权限:&/h2&
+&p&permissions&/p&
+&pre class=&prettyprint linenums&&
+&Payment&: {
+ &description&: &访问支付插件&
+&h1&&a name=&plus.payment.PaymentChannel&&PaymentChannel&/a&&/h1&
+&p&支付通道对象&/p&
+&pre class=&prettyprint linenums&&
+interface plus.payment.PaymentChannel {
+ attribute DOMS
+ attribute DOMS
+ attribute Boolean serviceR
+ function void installService();
+&h2&说明:&/h2&
+&p class=&des&&
+PaymentChannel对象表示特定的支付通道,用于向系统请求支付操作。
+&h2&属性:&/h2&
+&a href=&#plus.payment.PaymentChannel.id&&id&/a&: 支付通道标识&/li&
+&a href=&#plus.payment.PaymentChannel.description&&description&/a&: 支付通道描述&/li&
+&a href=&#plus.payment.PaymentChannel.serviceReady&&serviceReady&/a&: 支付通道服务是否安装&/li&
+&h2&方法:&/h2&
+&a href=&#plus.payment.PaymentChannel.installService&&installService&/a&: 安装支付通道依赖的服务&/li&&/ul&
+&h1&&a name=&plus.payment.PaymentResult&&PaymentResult&/a&&/h1&
+&p&支付操作结果对象&/p&
+&pre class=&prettyprint linenums&&
+interface plus.payment.PaymentResult {
+ attribute PaymentC
+ attribute DOMS
+ attribute DOMS
+ attribute DOMS
+ attribute DOMS
+&h2&说明:&/h2&
+&p class=&des&&
+PaymentResult对象表示支付操作返回结果,用于确认支付操作成功。
+&h2&属性:&/h2&
+&a href=&#plus.payment.PaymentResult.channel&&channel&/a&: 支付通道对象&/li&
+&a href=&#plus.payment.PaymentResult.tradeno&&tradeno&/a&: 支付交易编号信息&/li&
+&a href=&#plus.payment.PaymentResult.description&&description&/a&: 交易描述信息&/li&
+&a href=&#plus.payment.PaymentResult.url&&url&/a&: 查找支付交易信息地址&/li&
+&a href=&#plus.payment.PaymentResult.signature&&signature&/a&: 支付操作指纹信息&/li&
+&h1&&a name=&plus.payment.ChannelsSuccessCallback%20&&ChannelsSuccessCallback &/a&&/h1&
+&p&获取支付通道成功回调&/p&
+&pre class=&prettyprint linenums&&
+void ChannelsSuccessCallback ( channels ) {
+ // Get payment channels success code
+&h2&说明:&/h2&
+&p class=&des&&
+ 当获取支付通道列表成功时的回调函数,用于返回终端支持的支付通道列表。
+&h2&参数:&/h2&
+&ul&&li&channels:
&font class=&type&&Array&/font&
必选 &/em&数组,系统支持的支付通道PaymentChannel列表&br&
+&/li&&/ul&
+&h2&返回值:&/h2&
+&font class=&type&&void&/font&
: 无&h1&&a name=&plus.payment.PaymentSuccessCallback&&PaymentSuccessCallback&/a&&/h1&
+&p&支付操作成功回调&/p&
+&pre class=&prettyprint linenums&&
+void PaymentSuccessCallback ( result ) {
+ // Payment success code
+&h2&说明:&/h2&
+&p class=&des&&
+ 当支付操作成功时的回调函数,用于返回支付操作的成功信息。
+&h2&参数:&/h2&
+&ul&&li&result :
&a href=&#plus.payment.PaymentResult&&PaymentResult&/a&
必选 &/em&支付操作成功的信息&br&
+&/li&&/ul&
+&h2&返回值:&/h2&
+&font class=&type&&void&/font&
: 无&h1&&a name=&plus.payment.PaymentErrorCallback&&PaymentErrorCallback&/a&&/h1&
+&p&支付操作失败回调&/p&
+&pre class=&prettyprint linenums&&
+void PaymentErrorCallback( error ) {
+ // Payment error code
+&h2&说明:&/h2&
+&p class=&des&&当支付操作失败时的回调函数,用于返回支付操作失败的错误信息。&/p&
+&h2&参数:&/h2&
+&ul&&li&error:
&font class=&type&&DOMException&/font&
必选 &/em&支付操作失败错误信息,可通过error.code获取错误代码,具体错误码有各支付通道定义&br&
+ 支付宝支付错误代码如下:
+ 62000,客户端未安装支付通道依赖的服务;
+ 62001,用户取消支付操作;
+ 62002,此设备不支持支付;
+ 62003,数据格式错误;
+ 62004,支付账号状态错误;
+ 62005,订单信息错误;
+ 62006,支付操作内部错误;
+ 62007,支付服务器错误;
+ 62008,网络问题引起的错误;
+ 62009,其它未定义的错误。
+ 微信支付错误代码如下:
+ -1,一般错误;
+ -2,用户取消;
+ -3,发送失败;
+ -4,认证被否决;
+ -5,不支持错误。
&/li&&/ul&
+&h2&返回值:&/h2&
+&font class=&type&&void&/font&
: 无&br&&br&
+&/div&&/body&
Index: doc/push.html
===================================================================
--- doc/push.html (revision 0)
+++ doc/push.html (revision 2)
@@ -0,0 +1,170 @@
+&!DOCTYPE HTML&
+&meta charset=&utf-8&&
+&meta name=&viewport& content=&initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no&&
+&meta name=&HandheldFriendly& content=&true&&
+&meta name=&MobileOptimized& content=&320&&
+&title&Hello H5+&/title&
+&link rel=&stylesheet& type=&text/css& href=&res/doc.css& charset=&utf-8&&
+&link rel=&stylesheet& type=&text/css& href=&res/prettify.sons.css& charset=&utf-8&&
+&script type=&text/javascript& src=&res/doc.js& charset=&utf-8&&&/script&&script type=&text/javascript& src=&res/prettify.js& charset=&utf-8&&&/script&
+&body&&div id=&content& class=&content&&
+&h1&&a name=&plus.push&&push&/a&&/h1&
+&p&Push模块管理推送消息功能,可以实现在线、离线的消息推送,通过plus.push可获取推送消息管理对象。&/p&
+&h2&方法:&/h2&
+&a href=&#plus.push.addEventListener&&addEventListener&/a&: 添加推送消息事件监听器&/li&
+&a href=&#plus.push.clear&&clear&/a&: 清空所有推送消息&/li&
+&a href=&#plus.push.createMessage&&createMessage&/a&: 创建本地消息&/li&
+&a href=&#plus.push.getAllMessage&&getAllMessage&/a&: 获取所有推送消息&/li&
+&a href=&#plus.push.getClientInfo&&getClientInfo&/a&: 获取客户端推送标识信息&/li&
+&a href=&#plus.push.setAutoNotification&&setAutoNotification&/a&: 设置程序是否将消息显示在系统通知栏&/li&
+&a href=&#plus.push.remove&&remove&/a&: 删除推送消息&/li&
+&h2&对象:&/h2&
+&a href=&#plus.push.ClientInfo&&ClientInfo&/a&: JSON对象,获取的客户端标识信息&/li&
+&a href=&#plus.push.PushMessage&&PushMessage&/a&: JSON对象,推送消息对象&/li&
+&a href=&#plus.push.MessageOption&&MessageOption&/a&: JSON对象,获客户端创建本地消息的参数&/li&
+&h2&回调方法:&/h2&
+&a href=&#plus.push.PushReceiveCallback&&PushReceiveCallback&/a&: 客户端接收到推动消息的回调函数&/li&
+&a href=&#plus.push.PushClickCallback&&PushClickCallback&/a&: 用户点击推送消息事件的回调函数&/li&
+&h2&权限:&/h2&
+&p&permissions&/p&
+&pre class=&prettyprint linenums&&
+&Push&: {
+ &description&: &访问推送插件&
&ul&&li&cover: 设定显示推送消息的模式&br&&p&可取值true或false,true表示推送消息覆盖模式显示,即仅显示最后接收到的推送消息;false表示多条推送消息独立显示,将在通知栏中显示多条消息内容。默认值为ture。&/p&
+&h3&平台支持&/h3&
+&li&Android2.2+ (支持)&/li&
+&li&iOS4.3+ (不支持): 不支持消息显示模式的设置,每条信息都在通知栏显示,忽略cover属性值。&/li&
+&li&WP7.5+ (不支持)&/li&
+&/li&&/ul&
+&h1&&a name=&plus.push.ClientInfo&&ClientInfo&/a&&/h1&
+&p&JSON对象,获取的客户端标识信息&/p&
+&h2&属性:&/h2&
+&li&token: &em&(&font class=&type&&DOMString&/font&
+)&/em&设备令牌(iOS设备唯一标识),用于APNS服务推送中标识设备的身份&br&
+&li&clientid: &em&(&font class=&type&&DOMString&/font&
+)&/em&推送服务令牌(设备唯一标识),用于标识推送信息接收者身份&br&&p&第三方推送服务器管理的设备唯一标识,在iOS平台此值通常与token不同;在其它平台此值通常与token值一致。&/p&
+&li&appid: &em&(&font class=&type&&DOMString&/font&
+)&/em&第三方推送服务的应用标识&br&&p&第三方推送服务器管理的应用标识,通常需要在第三方推送服务器平台进行注册获取。&/p&
+&li&appkey: &em&(&font class=&type&&DOMString&/font&
+)&/em&第三方推送服务器的应用键值&br&&p&第三方推送服务器管理的应用键值,通常需要在第三方推送服务器平台进行注册获取。&/p&
+&h1&&a name=&plus.push.PushMessage&&PushMessage&/a&&/h1&
+&p&JSON对象,推送消息对象&/p&
+&h2&属性:&/h2&
+&li&title: &em&(&font class=&type&&DOMString&/font&
+)&/em&推送消息显示的标题&br&
+&li&content: &em&(&font class=&type&&DOMString&/font&
+)&/em&推送消息显示的内容&br&
+&li&payload: &em&(&font class=&type&&JSON&/font&
+)&/em&推送消息承载的数据&br&&p&如果推送消息中传输的数据不符合JSON格式,则作为String类型数据保存。&/p&
+&li&aps: &em&(&font class=&type&&JSON&/font&
+)&/em&Apple APNS推送协议数据&br&
+&h1&&a name=&plus.push.MessageOption&&MessageOption&/a&&/h1&
+&p&JSON对象,获客户端创建本地消息的参数&/p&
+&h2&属性:&/h2&
+&li&title: &em&(&font class=&type&&DOMString&/font&
+)&/em&推送消息的标题&br&&p&
+ 在系统通知栏显示,默认值为程序的名称。若不支持此属性,在系统通知中心显示的标题固定为程序的名称
+&li&cover: &em&(&font class=&type&&Boolean&/font&
+)&/em&是否覆盖上一次提示的消息&br&&p&
+ 可取值true或false,true为覆盖,false不覆盖,默认为permission中设置的cover值。
+&li&when: &em&(&font class=&type&&Date&/font&
+)&/em&消息上显示的提示时间&br&&p&
+ 默认为当前时间,如果使用的延迟显示则默认使用延时后的时间。
+&li&delay: &em&(&font class=&type&&Number&/font&
+)&/em&提示消息延迟显示的时间&br&&p&
+ 当设备接收到推送消息后,可不立即显示,而是延迟一段时间显示,延迟时间单位为s,默认为0s,立即显示。
+&h1&&a name=&plus.push.PushReceiveCallback&&PushReceiveCallback&/a&&/h1&
+&p&客户端接收到推动消息的回调函数&/p&
+&pre class=&prettyprint linenums&&
+void onReceive( msg ) {
+ // Recieved push message code.
+&h2&参数:&/h2&
+&ul&&li&msg:
&font class=&type&&DOMString&/font&
必选 &/em&接收到的推送信息msg&br&
+&/li&&/ul&
+&h2&返回值:&/h2&
+&font class=&type&&void&/font&
: 无&h1&&a name=&plus.push.PushClickCallback&&PushClickCallback&/a&&/h1&
+&p&用户点击推送消息事件的回调函数&/p&
+&pre class=&prettyprint linenums&&
+void onClick( msg ) {
+ // Clicked push message code.
+&h2&参数:&/h2&
+&ul&&li&msg:
&font class=&type&&DOMString&/font&
必选 &/em&用户点击的推送信息msg&br&
+&/li&&/ul&
+&h2&返回值:&/h2&
+&font class=&type&&void&/font&
: 无&br&&br&
+&/div&&/body&
Index: doc/runtime.html
===================================================================
--- doc/runtime.html (revision 0)
+++ doc/runtime.html (revision 2)
@@ -0,0 +1,236 @@
+&!DOCTYPE HTML&
+&meta charset=&utf-8&&
+&meta name=&viewport& content=&initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no&&
+&meta name=&HandheldFriendly& content=&true&&
+&meta name=&MobileOptimized& content=&320&&
+&title&Hello H5+&/title&
+&link rel=&stylesheet& type=&text/css& href=&res/doc.css& charset=&utf-8&&
+&link rel=&stylesheet& type=&text/css& href=&res/prettify.sons.css& charset=&utf-8&&
+&script type=&text/javascript& src=&res/doc.js& charset=&utf-8&&&/script&&script type=&text/javascript& src=&res/prettify.js& charset=&utf-8&&&/script&
+&body&&div id=&content& class=&content&&
+&h1&&a name=&plus.runtime&&runtime&/a&&/h1&
+&p&Runtime模块管理运行环境,可用于获取当前运行环境信息、与其它程序进行通讯等。通过plus.runtime可获取运行环境管理对象。&/p&
+&h2&属性:&/h2&
+&a href=&#plus.runtime.appid&&appid&/a&: 当前应用的APPID&/li&
+&a href=&#plus.runtime.arguments&&arguments&/a&: 第三方程序调用时传递给程序的参数&/li&
+&a href=&#plus.runtime.version&&version&/a&: 客户端的版本号&/li&
+&a href=&#plus.runtime.innerVersion&&innerVersion&/a&: 客户端运行时环境的版本号&/li&
+&a href=&#plus.runtime.launchLoadedTime&&launchLoadedTime&/a&: 获取当前应用首页加载的时间&/li&
+&h2&方法:&/h2&
+&a href=&#plus.runtime.getProperty&&getProperty&/a&: 获取指定APPID对应的应用信息&/li&
+&a href=&#plus.runtime.install&&install&/a&: 安装应用&/li&
+&a href=&#plus.runtime.quit&&quit&/a&: 退出客户端程序&/li&
+&a href=&#plus.runtime.restart&&restart&/a&: 重启当前的应用&/li&
+&a href=&#plus.runtime.setBadgeNumber&&setBadgeNumber&/a&: 设置程序快捷方式上显示的提示数字&/li&
+&a href=&#plus.runtime.openURL&&openURL&/a&: 调用第三方程序打开指定的URL&/li&
+&a href=&#plus.runtime.openFile&&openFile&/a&: 调用第三方程序打开指定的文件&/li&
+&a href=&#plus.runtime.launchApplication&&launchApplication&/a&: 调用第三方程序&/li&
+&h2&对象:&/h2&
+&a href=&#plus.runtime.WidgetOption&&WidgetOption&/a&: JSON对象,应用安装参数&/li&
+&a href=&#plus.runtime.WidgetInfo&&WidgetInfo&/a&: JSON对象,应用信息&/li&
+&a href=&#plus.runtime.OpenFileOption&&OpenFileOption&/a&: JSON对象,打开文件参数&/li&
+&a href=&#plus.runtime.ApplicationInf&&ApplicationInf&/a&: JSON对象,打开第三方程序参数&/li&
+&h2&回调方法:&/h2&
+&a href=&#plus.runtime.InstallSuccessCallback&&InstallSuccessCallback&/a&: 安装应用成功回调函数&/li&
+&a href=&#plus.runtime.InstallErrorCallback&&InstallErrorCallback&/a&: 安装应用失败回调函数&/li&
+&a href=&#plus.runtime.GetPropertyCallBack&&GetPropertyCallBack&/a&: 获取应用属性成功回调函数&/li&
+&a href=&#plus.runtime.OpenErrorCallback&&OpenErrorCallback&/a&: 打开本地文件或URL失败回调函数&/li&
+&a href=&#plus.runtime.LaunchErrorCallback&&LaunchErrorCallback&/a&: 调用第三方程序失败回调函数&/li&
+&h2&权限:&/h2&
+&p&permissions&/p&
+&pre class=&prettyprint linenums&&
+&Runtime&: {
+ &description&: &访问运行环境信息&
+&h1&&a name=&plus.runtime.WidgetOption&&WidgetOption&/a&&/h1&
+&p&JSON对象,应用安装参数&/p&
+&h2&说明:&/h2&
+&p class=&des&&可通过对象设置安装的应用是否进行appid校验、版本号校验等。&/p&
+&h2&属性:&/h2&
+&li&appid: &em&(&font class=&type&&String&/font&
+)&/em&应用的appid&br&&p&默认值 null。当前正在安装的应用的appid,填写该值后应用安装时将进行校验,如安装包内的appid和指定的不同则终止当前应用的安装&/p&
+&li&force: &em&(&font class=&type&&Boolean&/font&
+)&/em&是否强制安装&br&&p&默认值 false。当取值为true,应用安装为强制安装,不再进行版本号的校验,如果为false则进行版本号校验,如果将要安装应用的版本号不高于现有应用的版本号则终止安装,并返回安装失败&/p&
+&h1&&a name=&plus.runtime.WidgetInfo&&WidgetInfo&/a&&/h1&
+&p&JSON对象,应用信息&/p&
+&h2&属性:&/h2&
+&li&appid: &em&(&font class=&type&&String&/font&
+)&/em&应用的APPID&br&
+&li&version: &em&(&font class=&type&&String&/font&
+)&/em&应用的版本号&br&
+&li&name: &em&(&font class=&type&&String&/font&
+)&/em&应用的名称&br&
+&li&description: &em&(&font class=&type&&String&/font&
+)&/em&应用描述信息&br&
+&li&author: &em&(&font class=&type&&String&/font&
+)&/em&应用描述信息&br&
+&li&email: &em&(&font class=&type&&String&/font&
+)&/em&开发者邮箱地址&br&
+&li&license: &em&(&font class=&type&&String&/font&
+)&/em&应用授权描述信息&br&
+&li&licensehref: &em&(&font class=&type&&String&/font&
+)&/em&应用授权说明链接地址&br&
+&li&features: &em&(&font class=&type&&String[]&/font&
+)&/em&应用许可特性列表&br&
+&h1&&a name=&plus.runtime.OpenFileOption&&OpenFileOption&/a&&/h1&
+&p&JSON对象,打开文件参数&/p&
+&h2&属性:&/h2&
+&ul&&li&popover: &em&(&font class=&type&&json&/font&
+)&/em&弹出系统选择程序界面指示区域&br&&p&JSON对象,格式如{top:10;left:10;width:200;height:200;},所有值为像素值,左上坐标相对于容器webview的位置。仅在iPad设备平台有效。&/p&
+&/li&&/ul&
+&h1&&a name=&plus.runtime.ApplicationInf&&ApplicationInf&/a&&/h1&
+&p&JSON对象,打开第三方程序参数&/p&
+&h2&属性:&/h2&
+&li&pname: &em&(&font class=&type&&String&/font&
+)&/em&第三方程序包名&br&&p&仅Android平台支持,表示程序的包名,其它平台忽略此属性值。&/p&
+&li&action: &em&(&font class=&type&&String&/font&
+)&/em&程序的操作行为&br&&p&Android平台上与系统的action值一致;iOS平台为要调用程序的URLScheme格式字符串。&/p&
+&li&extra: &em&(&font class=&type&&JSON&/font&
+)&/em&调用程序的参数&br&&p&仅Android平台支持,为JSON格式,用于传递给要调用程序的参数,如extra:{url:&http://www.html5plus.org&}。&/p&
+&h1&&a name=&plus.runtime.InstallSuccessCallback&&InstallSuccessCallback&/a&&/h1&
+&p&安装应用成功回调函数&/p&
+&pre class=&prettyprint linenums&&
+void onSuccess(widgetInfo){
+ // Code here
+&h2&参数:&/h2&
+&ul&&li&widgetInfo:
&font class=&type&&WidgetInfo&/font&
必选 &/em&&br&应用信息,参见:WidgetInfo&/li&&/ul&
+&h2&返回值:&/h2&
+&font class=&type&&void&/font&
: 无&h1&&a name=&plus.runtime.InstallErrorCallback&&InstallErrorCallback&/a&&/h1&
+&p&安装应用失败回调函数&/p&
+&pre class=&prettyprint linenums&&
+void onError(error){
+ // Handle the error
+&h2&参数:&/h2&
+&ul&&li&error:
&font class=&type&&DOMException&/font&
必选 &/em&&br&安装失败的错误信息&/li&&/ul&
+&h2&返回值:&/h2&
+&font class=&type&&void&/font&
: 无&h1&&a name=&plus.runtime.GetPropertyCallBack&&GetPropertyCallBack&/a&&/h1&
+&p&获取应用属性成功回调函数&/p&
+&pre class=&prettyprint linenums&&
+void onGetPropertyCB(widgetInfo){
+ // Code here
+&h2&参数:&/h2&
+&ul&&li&widgetInfo:
&a href=&#plus.runtime.WidgetInfo&&WidgetInfo&/a&
必选 &/em&&br&应用信息,参见:WidgetInfo&/li&&/ul&
+&h2&返回值:&/h2&
+&font class=&type&&void&/font&
: 无&h1&&a name=&plus.runtime.OpenErrorCallback&&OpenErrorCallback&/a&&/h1&
+&p&打开本地文件或URL失败回调函数&/p&
+&pre class=&prettyprint linenums&&
+void onError(error){
+ // Handle the error
+&h2&参数:&/h2&
+&ul&&li&error:
&font class=&type&&DOMException&/font&
必选 &/em&&br&打开操作失败的错误信息&/li&&/ul&
+&h2&返回值:&/h2&
+&font class=&type&&void&/font&
: 无&h1&&a name=&plus.runtime.LaunchErrorCallback&&LaunchErrorCallback&/a&&/h1&
+&p&调用第三方程序失败回调函数&/p&
+&pre class=&prettyprint linenums&&
+void onError(error){
+ // Handle the error
+&h2&参数:&/h2&
+&ul&&li&error:
&font class=&type&&DOMException&/font&
必选 &/em&&br&操作失败的错误信息&/li&&/ul&
+&h2&返回值:&/h2&
+&font class=&type&&void&/font&
: 无&br&&br&
+&/div&&/body&
Index: doc/nativeUI.html
===================================================================
--- doc/nativeUI.html (revision 0)
+++ doc/nativeUI.html (revision 2)
@@ -0,0 +1,391 @@
+&!DOCTYPE HTML&
+&meta charset=&utf-8&&
+&meta name=&viewport& content=&initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no&&
+&meta name=&HandheldFriendly& content=&true&&
+&meta name=&MobileOptimized& content=&320&&
+&title&Hello H5+&/title&
+&link rel=&stylesheet& type=&text/css& href=&res/doc.css& charset=&utf-8&&
+&link rel=&stylesheet& type=&text/css& href=&res/prettify.sons.css& charset=&utf-8&&
+&script type=&text/javascript& src=&res/doc.js& charset=&utf-8&&&/script&&script type=&text/javascript& src=&res/prettify.js& charset=&utf-8&&&/script&
+&body&&div id=&content& class=&content&&
+&h1&&a name=&plus.nativeUI&&nativeUI&/a&&/h1&
+&p&nativeUI管理系统原生界面,可用于弹出系统原生提示对话框窗口、时间日期选择对话框、等待对话框等。&/p&
+&h2&方法:&/h2&
+&a href=&#plus.nativeUI.actionSheet&&actionSheet&/a&: 弹出系统选择按钮框&/li&
+&a href=&#plus.nativeUI.alert&&alert&/a&: 弹出系统提示对话框&/li&
+&a href=&#plus.nativeUI.confirm&&confirm&/a&: 弹出系统确认对话框&/li&
+&a href=&#plus.nativeUI.closeWaiting&&closeWaiting&/a&: 关闭系统等待对话框&/li&
+&a href=&#plus.nativeUI.showWaiting&&showWaiting&/a&: 显示系统等待对话框&/li&
+&a href=&#plus.nativeUI.pickDate&&pickDate&/a&: 弹出系统日期选择对话框&/li&
+&a href=&#plus.nativeUI.pickTime&&pickTime&/a&: 弹出系统时间选择对话框&/li&
+&a href=&#plus.nativeUI.prompt&&prompt&/a&: 弹出系统输入对话框&/li&
+&a href=&#plus.nativeUI.toast&&toast&/a&: 显示自动消失的提示消息&/li&
+&h2&对象:&/h2&
+&a href=&#plus.nativeUI.ActionButtonStyle&&ActionButtonStyle&/a&: JSON对象,原生选择按钮框上按钮的样式参数&/li&
+&a href=&#plus.nativeUI.ActionSheetStyle&&ActionSheetStyle&/a&: JSON对象,原生选择按钮框的样式参数&/li&
+&a href=&#plus.nativeUI.PickDateOption&&PickDateOption&/a&: JSON对象,日期选择对话框的参数&/li&
+&a href=&#plus.nativeUI.PickTimeOption&&PickTimeOption&/a&: JSON对象,时间选择对话框的参数&/li&
+&a href=&#plus.nativeUI.Waiting&&Waiting&/a&: 系统等待对话框对象&/li&
+&a href=&#plus.nativeUI.WaitingOption&&WaitingOption&/a&: JSON对象,原生等待对话框的参数&/li&
+&a href=&#plus.nativeUI.ToastOption&&ToastOption&/a&: JSON对象,系统提示消息框要设置的参数&/li&
+&h2&回调方法:&/h2&
+&a href=&#plus.nativeUI.ActionSheetCallback&&ActionSheetCallback&/a&: 系统选择按钮框的回调函数&/li&
+&a href=&#plus.nativeUI.AlertCallback&&AlertCallback&/a&: 系统提示框确认的回调函数&/li&
+&a href=&#plus.nativeUI.ConfirmCallback&&ConfirmCallback&/a&: 关闭确认对话框的回调函数&/li&
+&a href=&#plus.nativeUI.PromptCallback&&PromptCallback&/a&: 系统输入对话框关闭后的回调函数&/li&
+&a href=&#plus.nativeUI.PickDatetimeSuccessCallback&&PickDatetimeSuccessCallback&/a&: 选择日期或时间操作成功的回调函数&/li&
+&a href=&#plus.nativeUI.PickDatetimeErrorCallback&&PickDatetimeErrorCallback&/a&: 选择日期或时间操作取消或失败的回调函数&/li&
+&h1&&a name=&plus.nativeUI.ActionButtonStyle&&ActionButtonStyle&/a&&/h1&
+&p&JSON对象,原生选择按钮框上按钮的样式参数&/p&
+&h2&属性:&/h2&
+&li&title: &em&(&font class=&type&&String&/font&
+)&/em&按钮上显示的文字内容&br&
+&li&style: &em&(&font class=&type&&String&/font&
+)&/em&按钮的样式,可取值“destructive”、“default”&br&&p&
+ “destructive”表示警示按钮样式、“default”表示默认按钮样式,默认为“default”。
+&h1&&a name=&plus.nativeUI.ActionSheetStyle&&ActionSheetStyle&/a&&/h1&
+&p&JSON对象,原生选择按钮框的样式参数&/p&
+&h2&属性:&/h2&
+&li&title: &em&(&font class=&type&&String&/font&
+)&/em&选择按钮框的标题&br&
+&li&cancel: &em&(&font class=&type&&String&/font&
+)&/em&取消按钮上显示的文字内容&br&&p&
+ 不设置此属性,则不显示取消按钮。
+&li&buttons: &em&(&font class=&type&&Array&/font&[
&a href=&#plus.nativeUI.ActionButtonStyle&&ActionButtonStyle&/a&
+)&/em&选择框上的按钮,ActionButtonStyle对象数组&br&
+&h1&&a name=&plus.nativeUI.PickDateOption&&PickDateOption&/a&&/h1&
+&p&JSON对象,日期选择对话框的参数&/p&
+&h2&属性:&/h2&
+&li&title: &em&(&font class=&type&&String&/font&
+)&/em&日期选择对话框显示的标题&br&&p&
+ 如果未设置标题,则默认显示标题为当前选择的日期。
+&li&date: &em&(&font class=&type&&Date&/font&
+)&/em&日期选择对话框默认显示的日期&br&&p&
+ 如果未设置默认显示的日期,则显示当前的日期。
+&li&minDate: &em&(&font class=&type&&Date&/font&
+)&/em&日期选择对话框可选择的最小日期&br&&p&
+ Date类型对象,如果未设置可选择的最小日期,则使用系统默认可选择的最小日期值。
+&li&maxDate: &em&(&font class=&type&&Date&/font&
+)&/em&日期选择对话框可选择的最大日期&br&&p&
+ Date类型对象,如果未设置可选择的最大日期,则使用系统默认可选择的最大日期值。
+ 其值必须大于minDate设置的值,否则使用系统默认可选择的最大日期值。
+&li&popover: &em&(&font class=&type&&JSON&/font&
+)&/em&时间选择对话框弹出指示区域&br&&p&
+ JSON类型对象,格式如{top:10;left:10;width:200;height:200;},所有值为像素值,其值为相对于容器Webview的位置。
+ 如未设置此值,默认在屏幕居中显示。仅在iPad上有效,其它设备忽略此值。
+&h1&&a name=&plus.nativeUI.PickTimeOption&&PickTimeOption&/a&&/h1&
+&p&JSON对象,时间选择对话框的参数&/p&
+&h2&属性:&/h2&
+&li&time: &em&(&font class=&type&&Date&/font&
+)&/em&时间选择对话框默认显示的时间&br&&p&
+ 如果未设置标题,则默认显示标题为当前选择的时间。
+&li&title: &em&(&font class=&type&&String&/font&
+)&/em&时间选择对话框显示的标题&br&&p&
+ 如果未设置标题,则默认显示标题为当前选择的时间。
+&li&is24Hour: &em&(&font class=&type&&Boolean&/font&
+)&/em&是否24小时制模式&br&&p&
+ true表示使用24小时制模式显示,fale表示使用12小时制模式显示,默认值为true。
+&li&popover: &em&(&font class=&type&&JSON&/font&
+)&/em&日期选择对话框弹出指示区域&br&&p&
+ JSON类型对象,格式如{top:10;left:10;width:200;height:200;},所有值为像素值,其值相对于容器webview的位置。
+ 如未设置此值,默认在屏幕居中显示。仅在iPad上有效,其它设备忽略此值。
+&h1&&a name=&plus.nativeUI.Waiting&&Waiting&/a&&/h1&
+&p&系统等待对话框对象&/p&
+&h2&说明:&/h2&
+&p class=&des&&
+ 可通过plus.nativeUI.showWaiting方法创建,用于控制系统样式等待对话框的操作,如关闭、设置标题内容等。
+&h2&方法:&/h2&
+&a href=&#plus.nativeUI.Waiting.setTitle&&setTitle&/a&: 设置等待对话框上显示的文字内容&/li&
+&a href=&#plus.nativeUI.Waiting.close&&close&/a&: 关闭显示的系统等待对话框&/li&
+&h2&事件:&/h2&
+&a href=&#plus.nativeUI.Waiting.onclose&&onclose&/a&: 等待对话框关闭事件&/li&&/ul&
+&h1&&a name=&plus.nativeUI.WaitingOption&&WaitingOption&/a&&/h1&
+&p&JSON对象,原生等待对话框的参数&/p&
+&h2&属性:&/h2&
+&li&width: &em&(&font class=&type&&String&/font&
+)&/em&等待框背景区域的宽度&br&&p&
+ 值支持像素值(&500px&)或百分比(&50%&),百分比相对于屏幕的宽计算,如果不设置则根据内容自动计算合适的宽度。
+&li&height: &em&(&font class=&type&&String&/font&
+)&/em&等待框背景区域的高度&br&&p&
+ 值支持像素绝对值(&500px&)或百分比(&50%&),如果不设置则根据内容自动计算合适的高度。
+&li&color: &em&(&font class=&type&&String&/font&
+)&/em&等待框中文字的颜色&br&&p&
+ 颜色值支持(参考CSS颜色规范):颜色名称(参考CSS Color Names)/十六进制值/rgb值/rgba值,默认值为白色。
+&li&textalign: &em&(&font class=&type&&String&/font&
+)&/em&等待对话框中标题文字的水平对齐方式&br&&p&
+ 对齐方式可选值包括:&left&:水平居左对齐显示,&center&:水平居中对齐显示,&right&:水平居右对齐显示。默认值为水平居中对齐显示,即&center&。
+&li&padding: &em&(&font class=&type&&String&/font&
+)&/em&等待对话框的内边距&br&&p&
+ 值支持像素值(&10px&)和百分比(&5%&),百分比相对于屏幕的宽计算,默认值为&3%&。
+&li&background: &em&(&font class=&type&&String&/font&
+)&/em&等待对话框显示区域的背景色&br&&p&
+ 背景色的值支持(参考CSS颜色规范):颜色名称(参考CSS Color Names)/十六进制值/rgb值/rgba值,默认值为rgba(0,0,0,0.8)。
+&li&style: &em&(&font class=&type&&String&/font&
+)&/em&等待对话框样式&br&&p&
+ 可取值&black&、&white&,black表示等待框为黑色雪花样式,通常在背景主色为浅色时使用;white表示等待框为白色雪花样式,通常在背景主色为深色时使用。
+ 仅在iOS平台有效,其它平台忽略此值,未设置时默认值为white。
+&li&modal: &em&(&font class=&type&&Boolen&/font&
+)&/em&等待框是否模态显示&br&&p&
+ 模态显示时用户不可操作直到等待对话框关闭,否则用户在等待对话框显示时也可操作下面的内容,未设置时默认为true。
+&li&round: &em&(&font class=&type&&Number&/font&
+)&/em&等待框显示区域的圆角&br&&p&
+ 值支持像素值(&10px&),未设置时使用默认值&10px&。
+&li&padlock: &em&(&font class=&type&&Boolen&/font&
+)&/em&点击等待显示区域是否自动关闭&br&&p&
+ true表示点击等待对话框显示区域时自动关闭,false则不关闭,未设置时默认值为false。
+&h1&&a name=&plus.nativeUI.ToastOption&&ToastOption&/a&&/h1&
+&p&JSON对象,系统提示消息框要设置的参数&/p&
+&h2&属性:&/h2&
+&li&icon: &em&(&font class=&type&&String&/font&
+)&/em&提示消息框上显示的图标&br&
+&li&duration: &em&(&font class=&type&&String&/font&
+)&/em&提示消息框显示的时间&br&&p&
+ 可选值为&long&、&short&,值为&long&时显示时间约为3.5s,值为&short&时显示时间约为2s,未设置时默认值为&short&。
+&li&align: &em&(&font class=&type&&String&/font&
+)&/em&提示消息框在屏幕中的水平位置&br&&p&
+ 可选值为&left&、&center&、&right&,分别为水平居左、居中、居右,未设置时默认值为&center&。
+&li&verticalAlign: &em&(&font class=&type&&String&/font&
+)&/em&提示消息在屏幕中的垂直位置&br&&p&
+ 可选值为&top&、&center&、&bottom&,分别为垂直居顶、居中、居底,未设置时默认值为&bottom&。
+&h1&&a name=&plus.nativeUI.ActionSheetCallback&&ActionSheetCallback&/a&&/h1&
+&p&系统选择按钮框的回调函数&/p&
+&pre class=&prettyprint linenums&&
+void onActioned( Event event ){
+ // actionsheet handled code.
+ var index=event. // 用户关闭时点击按钮的索引值
+&h2&参数:&/h2&
+&ul&&li&event:
&font class=&type&&Event&/font&
必选 &/em&用户操作选择按钮框关闭后返回的数据&br&
+ 可通过event.index(Number类型)获取用户关闭时点击按钮的索引值,索引值从0开始;
+ 0表示用户点击取消按钮,大于0值表示用户点击ActionSheetStyle中buttons属性定义的按钮,索引值从1开始(即1表示点击buttons中定义的第一个按钮)。
&/li&&/ul&
+&h2&返回值:&/h2&
+&font class=&type&&void&/font&
: 无&h1&&a name=&plus.nativeUI.AlertCallback&&AlertCallback&/a&&/h1&
+&p&系统提示框确认的回调函数&/p&
+&pre class=&prettyprint linenums&&
+void onAlerted(){
+ // Alert handled code.
+&h2&参数:&/h2&
+&p&无&/p&
+&h2&返回值:&/h2&
+&font class=&type&&void&/font&
: 无&h1&&a name=&plus.nativeUI.ConfirmCallback&&ConfirmCallback&/a&&/h1&
+&p&关闭确认对话框的回调函数&/p&
+&pre class=&prettyprint linenums&&
+void onConfirmed( Event event ) {
+ // Confirm handled code.
+ var index=event. // 用户关闭确认对话框点击按钮的索引值
+&h2&参数:&/h2&
+&ul&&li&event:
&font class=&type&&Event&/font&
必选 &/em&用户操作确认对话框关闭后返回的数据&br&
+ 可通过event.index(Number类型)获取用户关闭确认对话框点击按钮的索引值,索引值从0开始;
&/li&&/ul&
+&h2&返回值:&/h2&
+&font class=&type&&void&/font&
: 无&h1&&a name=&plus.nativeUI.PromptCallback&&PromptCallback&/a&&/h1&
+&p&系统输入对话框关闭后的回调函数&/p&
+&pre class=&prettyprint linenums&&
+function void onPrompted( Event event ) {
+ // Prompt handled code.
+ var index=event. // 用户关闭输入对话框点击按钮的索引值
+ var value=event. // 用户输入的内容
+&h2&参数:&/h2&
+&ul&&li&event:
&font class=&type&&Event&/font&
必选 &/em&用户操作输入对话框关闭后返回的数据&br&
+ 可通过event.index(Number

我要回帖

更多关于 微信h5页面制作 的文章

 

随机推荐