polymer笔记1

polymer笔记1

c0710204 polymer js

使用polymer.created来初始化固定数据

使用

(function () {
var xxx=”xxx”;
Polymer({create:function(){this.xxx=xxx;});
}());

来初始化元素全局变量(作用于当前元素,对全局共享)

使用job()来代替window.setTimeout(),使用job()在其时效内将只调用1次

使用resolvePath()读取相对路径

%23%20polymer%u7B14%u8BB01%0A@%28c0710204%29%5Bpolymer%7Cjs%5D%0A%0A*%20%u4F7F%u7528%60%60%60polymer.created%60%60%60%u6765%u521D%u59CB%u5316%u56FA%u5B9A%u6570%u636E%0A*%20%u4F7F%u7528%0A%60%60%60%20javascript%0A%28function%20%28%29%20%7B%0A%20%20%20%20var%20xxx%3D%22xxx%22%3B%0A%20%20%20%20%20Polymer%28%7Bcreate%3Afunction%28%29%7Bthis.xxx%3Dxxx%3B%7D%29%uFF1B%0A%7D%28%29%29%3B%0A%60%60%60%0A%u6765%u521D%u59CB%u5316%u5143%u7D20%u5168%u5C40%u53D8%u91CF%28%u4F5C%u7528%u4E8E%u5F53%u524D%u5143%u7D20%2C%u5BF9%u5168%u5C40%u5171%u4EAB%29%0A*%20%u4F7F%u7528%60%60%60job%28%29%60%60%60%u6765%u4EE3%u66FF%60%60%60window.setTimeout%28%29%60%60%60%uFF0C%u4F7F%u7528%60%60%60job%28%29%60%60%60%u5728%u5176%u65F6%u6548%u5185%u5C06%u53EA%u8C03%u75281%u6B21%0A*%20%u4F7F%u7528%60%60%60resolvePath%28%29%60%60%60%u8BFB%u53D6%u76F8%u5BF9%u8DEF%u5F84

印象笔记,你的工作空间。下载印象笔记

from Gmail
via IFTTT

发表评论

电子邮件地址不会被公开。 必填项已用*标注