mirror of
https://github.com/smallmain/cocos-enhance-kit.git
synced 2025-11-10 17:35:27 +00:00
[adapters] 增加小游戏适配部分源码
This commit is contained in:
18
adapters/platforms/baidu/wrapper/builtin/Image.js
Normal file
18
adapters/platforms/baidu/wrapper/builtin/Image.js
Normal file
@@ -0,0 +1,18 @@
|
||||
/* eslint-disable */
|
||||
import * as Mixin from './util/mixin'
|
||||
import HTMLImageElement from './HTMLImageElement'
|
||||
|
||||
export default function() {
|
||||
const image = swan.createImage();
|
||||
|
||||
// image.__proto__.__proto__.__proto__ = new HTMLImageElement();
|
||||
|
||||
if (!('tagName' in image)) {
|
||||
image.tagName = 'IMG'
|
||||
}
|
||||
|
||||
Mixin.parentNode(image);
|
||||
Mixin.classList(image);
|
||||
|
||||
return image;
|
||||
};
|
||||
Reference in New Issue
Block a user