mirror of
https://github.com/cocos/cocos4.git
synced 2026-11-20 15:42:39 +08:00
e3e1db619f
* Revert "move in port/native to platforms/native (#7962)"
This reverts commit 96871ba26b.
* move port/native into platforms/native
34 lines
670 B
JavaScript
Executable File
34 lines
670 B
JavaScript
Executable File
const Node = require('./Node');
|
|
const DOMRect = require('./DOMRect');
|
|
|
|
class Element extends Node {
|
|
constructor() {
|
|
super()
|
|
this.className = ''
|
|
this.children = []
|
|
this.clientLeft = 0;
|
|
this.clientTop = 0;
|
|
this.scrollLeft = 0;
|
|
this.scrollTop = 0;
|
|
}
|
|
|
|
get clientWidth() {
|
|
return 0;
|
|
}
|
|
|
|
get clientHeight() {
|
|
return 0;
|
|
}
|
|
|
|
getBoundingClientRect() {
|
|
return new DOMRect(0, 0, window.innerWidth, window.innerHeight);
|
|
}
|
|
|
|
// attrName is a string that names the attribute to be removed from element.
|
|
removeAttribute(attrName) {
|
|
|
|
}
|
|
}
|
|
|
|
module.exports = Element;
|