Archive for the ‘其他’ Category

DOM操作琐碎知识点

1. parentWindow 与 defaultView parentWinow是IE下document的特有属性,表示的是document所在的window对象 defaultView DOM Level2中引入的属性,document.defaultView指向默认的AbstractView。
2. 各种坐标以及维度属性

 

Read the rest of this entry »

Google Closure Compiler压缩优化规则初探

前不久,Google发布了一系列与WEB开发相关的工具,包括Closure Compiler、Closure Library与Closure Templates,其中Closure Compiler被Google称之为Javascript 优化器(Javascript Optimizer)。通过编译,Compiler可以使代码获得更佳的紧凑性和更高的性能。它不仅能删除无用的代码,同时还会重写和压缩代码以获得更好的下载和运行速度。此外,它还能检查代码中的语法、变量引用以及变量类型,并在发现问题后给出警告。

Read the rest of this entry »