大约有 8 项符合查询结果, 库内数据总量为 31,560 项。 (搜索耗时: 0.0025 秒)
...h-ios") { //iOS注意函数签名,注意与Android的不同 alert(bridge.call("testString:","hello")); alert(bridge.call("testNumber:",256.0)); alert(bridge.call("testBool:",false)); obj.value = "Hello OC!"; bridge.callWithBack(function(value) { var obj = JSON.parse(value) alert(obj.value); },"tes...
来源: Laya2.0_文档 发布时间: 20210714
...orker("my_task.js"); myWorker.onmessage = function (oEvent) { console.log("Called back by the worker!\n"); }; myWorker.postMessage("start"); // start the worker. ``` 新建一个my_task.js文件,代码如下: ```typescript self.addEventListener('message', function (e) { var xmlreq = new XMLHttpR...
来源: Laya2.0_文档 发布时间: 20210715
...orker("my_task.js"); myWorker.onmessage = function (oEvent) { console.log("Called back by the worker!\n"); }; myWorker.postMessage("start"); // start the worker. ``` 新建一个my_task.js文件,代码如下: ```typescript self.addEventListener('message', function (e) { var xmlreq = new XMLHttpR...
来源: Laya2.0_文档 发布时间: 20210715
...orker("my_task.js"); myWorker.onmessage = function (oEvent) { console.log("Called back by the worker!\n"); }; myWorker.postMessage("start"); // start the worker. ``` 新建一个my_task.js文件,代码如下 ```javascript self.addEventListener('message', function (e) { var xmlreq = new XMLHttp...
来源: Laya2.0_文档 发布时间: 20210715
... (_super) { function HttpRequestExtension() { HttpRequestExtension.__super.call(this); } Laya.class(HttpRequestExtension, 'HttpRequestExtension', _super); var __proto = HttpRequestExtension.prototype; __proto.send = function (url, data, method, responseType, headers) { (method === void 0) && (method...
来源: Laya2.0_文档 发布时间: 20210714
...mage = Laya.Image; var WID = 373, HEI = 85; function Item() { Item.__super.call(this); this.size(WID, HEI); this.img = new Image(); this.addChild(this.img); this.setImg = function(src) { this.img.skin = src; } } Laya.class(Item, "Item", Box); // 主要逻辑代码 var Stage = Laya.Stage; var List = ...
来源: Laya2.0_文档 发布时间: 20210714
...需求,flash插件提供了一个简单的接口函数`ExternalInterface.call`和`ExternalInterface.addCallback`与JS交互。但是发布HTML5,这个flash的接口就不能用了。 作为支持AS3语言编写HTML5的引擎,LayaAir可以通过`Browser.windows`和`__JS__`方法来和JS...
来源: Laya2.0_文档 发布时间: 20210715
...me": "render", "right": "0", "left": "0"}}; function Item() { Item.__super.call(this); this.right = 0; this.left = 0; var selectBox = new Clip("../../res/ui/tree/clip_selectBox.png", 1, 2); selectBox.name = "selectBox"; //设置 selectBox 的name 为“selectBox”时,将被识别为树结构的...
来源: Laya2.0_文档 发布时间: 20210715