HTMLDivElement#animate兼容浏览器自带的animate

This commit is contained in:
shijian 2023-12-29 23:33:36 +08:00
parent 71e49f1a15
commit f19847cea0
1 changed files with 4 additions and 0 deletions

View File

@ -6,6 +6,10 @@ import { status as _status } from '../status/index.js';
import { UI as ui } from '../ui/index.js'; import { UI as ui } from '../ui/index.js';
HTMLDivElement.prototype.animate = function (name, time) { HTMLDivElement.prototype.animate = function (name, time) {
// 兼容原先的Div.animate
if (Array.isArray(name) || get.objtype(name) == 'object') {
return Element.prototype.animate.call(this, name, time);
}
var that; var that;
if (get.is.mobileMe(this) && name == 'target') { if (get.is.mobileMe(this) && name == 'target') {
that = ui.mebg; that = ui.mebg;