在 Alfresco Share 中,搜索页面是使用 Aikau 实现的。我对更一般的问题感兴趣,是否可以调试 Aikau 小部件?
我在这个问题上找到了一些链接,但他们更多地谈论日志记录而不是实际的 javascript 调试:
- http://docs.alfresco.com/5.1/tasks/dev-extensions-share-tutorials-debugging.html
- https://github.com/Alfresco/Aikau/blob/master/tutorial/chapters/Tutorial4.md
假设我有以下 Aikau 小部件 alfresco/search/AlfSearchResult 和其中的以下方法:
/**
* This function is called to create a
* [SearchResultPropertyLink]{@link module:alfresco/renderers/SearchResultPropertyLink} widget
* to render the displayName of the result. It can be overridden to replace the default widget
* with a reconfigured version.
*
* @instance
*/
createDisplayNameRenderer: function alfresco_search_AlfSearchResult__createDisplayNameRenderer() {
// jshint nonew:false
var config = {
id: this.id + "_DISPLAY_NAME",
currentItem: this.currentItem,
pubSubScope: this.pubSubScope,
propertyToRender: "displayName",
renderSize: "large",
newTabOnMiddleOrCtrlClick: this.newTabOnMiddleOrCtrlClick,
defaultNavigationTarget: this.navigationTarget
};
if (this.navigationTarget)
{
config.navigationTarget = this.navigationTarget;
}
new SearchResultPropertyLink(config, this.nameNode);
}
有什么方法可以在使用 this.currentItem 的行插入断点并停止执行,以便我评估它的属性?