From 7b8c835858ee07b89fe95940a214c6071ac9a97c Mon Sep 17 00:00:00 2001 From: huqi Date: Thu, 24 Feb 2022 15:59:37 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E9=87=8D=E5=A4=8D=E8=AF=B7?= =?UTF-8?q?=E6=B1=82=E5=90=8C=E6=AD=A5=E6=97=B6=E7=9A=84callback=E6=89=A7?= =?UTF-8?q?=E8=A1=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- o2web/source/o2_core/o2.js | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/o2web/source/o2_core/o2.js b/o2web/source/o2_core/o2.js index e50a4013c0..8f7fcdac4b 100644 --- a/o2web/source/o2_core/o2.js +++ b/o2web/source/o2_core/o2.js @@ -1383,7 +1383,8 @@ if (!window.o2) { * //获 * node.loadHtmlText(html, {"bind": json}); */ - this.o2.loadHtmlText = this.o2.injectHtml = function (html, op) { + this.o2.loadHtmlText = this.o2.injectHtml = function (html, options) { + var op = (_typeOf(options) === "object") ? _getHtmlOptions(options) : _getHtmlOptions(null); _injectHtml(op, html); }; if (window.Element) Element.prototype.loadHtmlText = Element.prototype.injectHtml = function (html, options) { @@ -2059,11 +2060,9 @@ if (!window.o2) { _restful = function (method, address, data, callback, async, withCredentials, cache) { var p = null; - if (method.toLowerCase()==="get"){ + if (method.toLowerCase()==="get" && async!==false){ p = _checkRestful(address, callback); //if (p) return p; - }else{ - } var _addr = address; -- GitLab