tracemonkey

PDF.js实现在线展示pdf文件

久未见 提交于 2020-04-09 19:42:38
PDF.js是一个使用HTML5构建的可移植文档格式库。 PDF.js官网: http://mozilla.github.io/pdf.js/ 下载下来的压缩包包含两个文件夹:build和web,打开web文件夹下的viewer.html,就能看到PDF的预览效果了。 预览的PDF文件是位于viewer.html同目录下的compressed.tracemonkey-pldi-09.pdf, 而设置加载这个文件的地方是:与viewer.html同目录下的viewer.js的DEFAULT_URL属性,修改这个属性的值就能够预览不同的文件,中英文的pdf文件都能成功预览。 中文展示:修改viewer.html中的文件 <link rel="resource" type="application/l10n" href="locale/zh-CN/viewer.properties"> 需要添加MIME,否则会报404 .net core 添加方式 修改 Configure 中的 UseStaticFiles //添加MIME var provider = new FileExtensionContentTypeProvider(); provider.Mappings[".properties"] = "application/octet-stream"; app

How do the various Javascript optimization projects affect DOM performance?

左心房为你撑大大i 提交于 2019-12-06 04:08:52
问题 There's a lot of capital C, capital S computer science going into Javascript via the Tracemonkey, Squirrelfish, and V8 projects. Do any of these projects (or others) address the performance of DOM operations, or are they purely Javascript computation related? 回答1: The performance of pure DOM operations (getElementById/Tagname/Selector, nextChild, etc) are unaffected as they're already in pure C++. How the JS engine improvements will effect performance does depend to an extent on the

How do the various Javascript optimization projects affect DOM performance?

一曲冷凌霜 提交于 2019-12-04 09:53:55
There's a lot of capital C, capital S computer science going into Javascript via the Tracemonkey, Squirrelfish, and V8 projects. Do any of these projects (or others) address the performance of DOM operations, or are they purely Javascript computation related? The performance of pure DOM operations (getElementById/Tagname/Selector, nextChild, etc) are unaffected as they're already in pure C++. How the JS engine improvements will effect performance does depend to an extent on the particular techniques used for the performance improvements, as well as the performance of the DOM->JS bridge. An