##imagelazyloader##
图片延迟加载 阅读代码笔记
//闭包,默认传入为window,参数变量名又为window,可以改为其它关键字
(function(window) {
//判断是否android系统,主要为后面是否有动画的判断量
// take SVG commands and draw this path to HTML5 canvas | |
// commandList should look like that: [ { marker: "M", values: [ 10, 10 ] }, | |
// { marker: "l", values: [ 5, 7 ] }, | |
// { marker: "C", values: [ -5, 7.2, .3, -16, 24, 10 ] }, | |
// . . . | |
// { marker: "z", values: [ ] } ] | |
// there's another gist which has the code to parse SVG paths: | |
// https://gist.github.com/shamansir/0ba30dc262d54d04cd7f79e03b281505 |
##imagelazyloader##
图片延迟加载 阅读代码笔记
//闭包,默认传入为window,参数变量名又为window,可以改为其它关键字
(function(window) {
//判断是否android系统,主要为后面是否有动画的判断量
/** | |
* @author jerry | |
*/ | |
var turnplate=(function(){ | |
var turnplate = { | |
turnplateBox : '', | |
turnplateBtn : '', | |
lightDom : '', | |
initBoxEle : '', |
"use strict" | |
var Promise = function () { | |
this.state = 'pending' | |
this.thenables = [] | |
} | |
Promise.prototype.resolve = function (value) { | |
if (this.state != 'pending') return | |
this.state = 'fulfilled' |