add PluginHost.HOOK_HEADLINE_RENDERED

master
Andrew Dolgov 6 years ago
parent a400a8ffc1
commit a0d332326c

@ -365,13 +365,13 @@ define(["dojo/_base/declare"], function (declare) {
`; `;
} }
if (row != null) {
const tmp = document.createElement("div"); const tmp = document.createElement("div");
tmp.innerHTML = row; tmp.innerHTML = row;
dojo.parser.parse(tmp); dojo.parser.parse(tmp);
PluginHost.run(PluginHost.HOOK_HEADLINE_RENDERED, tmp.firstChild);
$("headlines-frame").appendChild(tmp.firstChild); $("headlines-frame").appendChild(tmp.firstChild);
}
}, },
onLoaded: function (transport, offset) { onLoaded: function (transport, offset) {
const reply = App.handleRpcJson(transport); const reply = App.handleRpcJson(transport);

@ -12,6 +12,7 @@ PluginHost = {
HOOK_RUNTIME_INFO_LOADED: 9, HOOK_RUNTIME_INFO_LOADED: 9,
HOOK_FLOATING_TITLE: 10, HOOK_FLOATING_TITLE: 10,
HOOK_INIT_COMPLETE: 11, HOOK_INIT_COMPLETE: 11,
HOOK_HEADLINE_RENDERED: 12,
hooks: [], hooks: [],
register: function (name, callback) { register: function (name, callback) {
if (typeof(this.hooks[name]) == 'undefined') if (typeof(this.hooks[name]) == 'undefined')

Loading…
Cancel
Save