- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
试图找出为什么我似乎无法在我的 dojo 构建中实习字符串。我的图层文件已正确创建,但与每个单独的 dijit 关联的代码未正确嵌入。
这是构建输出的一部分,说明了失败的地方:
release: Interning strings for : ../../release/fwijits5.31.2012/content/fwijits/optionalDijits/commenting.js
release: ../../release/fwijits5.31.2012/content/fwijits/optionalDijits/templates/commenting.htm
release: Optimizing (shrinksafe, stripConsole=normal) file: ../../release/fwijits5.31.2012/content/fwijits/optionalDijits/commenting.js
release: Could not strip comments for file: ../../release/fwijits5.31.2012/content/fwijits/optionalDijits/commenting.js,error: InternalError: illegal character
看起来优化失败了,因为模板没有正确添加到 js 文件中。这是 html 被实习后 js 的样子。您无法从输出中分辨出来,但是在 javascript 的末尾添加了一些特殊字符。
if(!dojo._hasResource["fwijits.optionalDijits.commenting"]){ //_hasResource checks added by build. Do not use _hasResource directly in your code.
dojo._hasResource["fwijits.optionalDijits.commenting"] = true;
dojo.provide("fwijits.optionalDijits.commenting");
dojo.require("dijit._Widget");
dojo.require("dijit._Templated");
dojo.require("dijit.layout.ContentPane");
dojo.require("dijit.layout.TabContainer");
//The main widget that gets returned to the browser
dojo.declare("fwijits.optionalDijits.commenting", [dijit.layout.ContentPane, dijit._Templated], {
widgetsInTemplate: true,
_earlyTemplatedStartup: true,
templateString: dojo.cache("fwijits.optionalDijits", "templates/commenting.htm"),
basePath: dojo.moduleUrl("fwijits.optionalDijits"),
//This function contains all configurable parameters
constructor: function(params){
params = params ||{};
this.inherited(arguments);
},
//This functions run on a "startup" call
startup: function(){
var _this = this;
this.inherited(arguments);
},
_addPointComment:function(){
console.debug("button clicked");
}
});
}
htm 文件非常简单,所以我认为这不是问题的根源。
<div dojoAttachPoint="containerNode">
<div dojoattachpoint="_outerDiv">
<div dojoattachpoint="_addPoint" dojotype="dijit.form.Button" dojoattachevent="onClick:_addPointComment"><b>Add Comment</b></div>
</div>
</div>
有什么建议吗?
最佳答案
哪个版本的 Dojo?构建系统中存在一个错误,其驻留字符串不以 HTML 或 HTM 结尾,尽管我从未尝试使用 HTM 来确定这一点。
可能值得一试。我知道这已在 1.7 中修复并向后移植到 1.8。
关于dojo - 自定义 Dojo 构建的问题实习字符串,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10853861/
记录第一次实习 记录自己大三期间,在成都一家公司实习了一个多月的经历,总结一下自己第一次实习经验、收获以及不足的地方。 公司使用的技术: 公司使用的是微服务开发的,还好之前对微服务
问题: 代理的目的是什么? 在所有的文档中,没有一个关于代理存在的直接解释——然而,它似乎是 intern.js 难题的一个重要部分。 它的职责是什么,代理在许多功能(在测试上下文中不是功能)特性中使
例如,我有一个类,我在二进制文件中存储了一些有关的信息: class car { char car_manufacturer; //other stuff }; car_manufac
是UUIDs在Java中像字符串一样实习?如果不是,我是否应该尝试回收 UUID 对象以最大限度地减少 RAM 使用? 我使用 UUID 作为数据库主键和外键列的数据类型。因此,这意味着许多行重复使用
我是 Scala 的新手,但我了解 Java。因此,据我了解,区别在于 Scala 中的 == 充当 Java 中的 .equals ,这意味着我们正在寻找值(value); Scala 中的 eq
我是一名优秀的程序员,十分优秀!