内置构造函数
const event = new customEvent('customEvent')
window.addEventListener('customEvent', () => {)
window.dispatch(event)
const observer = new IntersectionObserver((e) => {
console.log(e[0].target, e[0].intersectionRatio)
},
{threshold: 0.5})
observer.observe(document.getElementById('app'))
window对象
window.innerWidth
window.innerWidth
window.devicePixelRatio
window.requestIdleCallback(callback)
window.onbeforeunload = function(){return "onbeforeunload is work";}
window.onunhandledrejection = (e) => { console.log(e.msg, e.stash)}
window.performance.timing
window.performance.getEntries()[0]
window.open('www.baidu.com', 'wroxWindow', 'width=400, height=400')
window.print()

Document对象
document.getComputedStyle()
Event对象
e.clientX
e.clientY
dom对象
ele.contains(child)
ele.scrollToView()
ele.getBoundingClientRect().left
ele.getBoundingClientRect().top
ele.offsetLeft()
ele.offsetTop()
ele.offsetParent
时间日期(内置对象构造函数)
var b = new Date();
b.getTime()
b.getFullYear()
b.getMonth()+1;
b.getDate()
b.getHours()
b.getMinutes()
b.getSeconds()
b.getDay()
b.getMilliseconds()
数字(内置对象函数)
数学函数(用Math来调用):
abs(x) 返回数的绝对值。
ceil(x) 对小数进行上舍入。
floor(x) 对数进行下舍入。
round(x) 把数四舍五入为最接近的整数。
max(x,y) 返回 x 和 y 中的最高值。
min(x,y) 返回 x 和 y 中的最低值。
pow(x,y) 返回 x 的 y 次幂。
sqrt(x) 返回数的平方根。
random() 返回 0 ~ 1 之间的随机数。
类型
let arr =[1,2,3]
arr.concat(arr2)
arr.join()
arr.indexOf(1)
arr.slice(0,1)
arr.includes()
push pop unshift shift
arr.splice(inidex, count, add)
Array.form(likeArray)