扩展API加载完成事件 document.addEventListener( "plusready", plusreadyCallback, capture ); 说明: String 类型 为了保证扩展API的有效调用,所有应用页面都会用到的重要事件。 应用页面显示时需要首先加载扩展和API代码库,当扩展API代码库加载完成时会触发pluseready事件,当设备触发该事件后,用户就可以安全的调用扩展AP...
storage Storage模块管理应用本地数据存储区,用于应用数据的保存和读取。应用本地数据与localStorage、sessionStorage的区别在于数据有效域不同,前者可在应用内跨域操作,数据存储期是持久化的,并且没有容量限制。通过plus.storage可获取应用本地数据管理对象。 方法: getLength: 获取应用存储区中保存的键值对的个数 getItem:...
// 扩展API加载完毕,现在可以正常调用扩展API // 直接创建android.content.Intent类的实例对象 var intent = plus.android.newObject("android.content.Intent"); }, false ); </script> </head> <body> </body> </html> getAttribute 获取对象(类对象/实例对象)的属性值 Object plus.android.getAttribute( ...
document.addEventListener( "plusready", function(){ // 扩展API加载完毕,现在可以正常调用扩展API // 导入android.content.Intent类对象 var Intent = plus.android.importClass("android.content.Intent"); // 导入后可以使用new方法创建类的实例对象 var intent=new Intent(); }, false ); </script> </head...
HTML5+APIReference net XMLHttpRequest模块管理网络请求,与标准HTML中的XMLHttpRequest用途一致,差别在于前者可以进行跨域访问。通过plus.net可获取网络请求管理对象。 对象: XMLHttpRequest: 跨域网络请求对象 ProgressEvent: HTTP请求进度事件 回调方法: XhrStateChangeCallback: 网络请求状态变化的回调函数 XhrProgressEvent...
HTML5 API ReferenceThis chapter provides a detailed reference for all of the new HTML5 JavaScript APIs. For a detailed discussion of these APIs, including examples and support level at time of press, see Chapter 3.doi:10.1007/978-1-4302-6368-5_8Jonathan Reid...
styleName {String} The style name pieSlices {Array} An array.of OM.style.PieSlice stroke {String} A color string, format is "#rrggbb". Default value is "#000000". strokeThickness {float} The stroke width. Default value is 1. startingAngle {float} Angle of the first pie slice center. ...
Oracle Maps HTML5 Javascript API Reference Namespaces Classes Mixins Global Class: MarkerOM.style. Marker new Marker(config) This class represents a Marker or symbol style that can be applied to geometry features, typical points. For example, the following code can be used to create a ...
html5 API Reference sqlite plus.sqlite.openDatabase({ name: 'db1', path: '_doc/db1.db' }); function selectSql({ sql, successed, failed }) { plus.sqlite.selectSql({ name: 'db1', sql: sql, success: function(e) { if (successed)...
接下来,我们定义window.SpeechRecognition``as a reference to the API;请注意,我们将它设置为 OR 语句,以确保涵盖那些仍然需要供应商前缀支持的浏览器。作为其中的一部分,我们还设置了两个属性:recognition.interimResults设置为 true,以便在从语音转换成文本时显示文本。另一个是recognition.maxAlternatives,设置为 1,...