对于客户端的使用,你可以做make dist生产 一个独立的JavaScript文件js/dist/commonmark.js, 适合用于链接到一个网页,或获取最新 从 https://raw.githubusercontent.com/jgm/commonmark.js/master/dist/commonmark.js, 或bower install commonmark。
这里是我的演示HTML。
window.onload = function() {
console.log(commonmark)
}
我在一个名为foo.html文件保存在本地的HTML这样,开辟与Firefox 55.0.1这个本地文件。
但是,如果我用Firefox 55.0.1加载它,我得到了在控制台下面的错误。
Loading failed for the
ReferenceError: commonmark is not defined foo.html:9:5
问题:
为什么会出现这种错误发生的呢?
我该如何解决,而无需commonmark.js复制到本地文件系统的这个错误?
难道我引用上面还是一个错误在我的文档的理解commonmark.js README文件中的错误?