Opened 13 years ago

Closed 13 years ago

Last modified 12 years ago

#586 closed enhancement (fixed)

Allow advice before/after ContentPane sets node.innerHTML

Reported by: jeoffwilks@… Owned by: bill
Priority: high Milestone:
Component: Widgets Version: 0.3
Keywords: ContentPane Cc: jeoffwilks@…
Blocked By: Blocking:

Description

With dojo.widget.html.ContentPane (trunk version), I've been connecting events to setContent so I can apply additional processing to the links in the HTML that gets loaded. The problem is, I've noticed there is a slight delay whereby, if a user clicks too quickly, the setContent-after-advice hasn't been applied yet.

What would work best for me is if I could hook it in immediately after the line:

258:    node.innerHTML = data.xml;

May I ask that the line be extracted into its own method call? That way we can use dojo.event.connect() to add before/after advice immediately around it. The revised code would look something like this:

258:    this._setInnerHTML(node, data.xml);
    _setInnerHTML: function(node, content) {
        node.innerHTML = content;
    },

Alternatively you could have it re-lookup the DOM node, so that you just pass in the content. However you do it, I just need a function there so I can hook into it with dojo.event.connect().

Thanks!

Change History (5)

comment:1 Changed 13 years ago by anonymous

Cc: jeoffwilks@… added

comment:2 Changed 13 years ago by alex

Milestone: 0.3release
Version: 0.3

comment:3 Changed 13 years ago by mumme@…

Hi !

As of rev 3457 there is a private _setContent function, I think you should be able to do what you want with that one. It is private and as such not part of widget API compatability (might get removed or renamed)

I would appreciate if you could test it and report how it went?

/ Fredrik

comment:4 Changed 13 years ago by jeoffwilks@…

Resolution: fixed
Status: newclosed

Fredrik: the _setContent function should work great! Thanks for your help.

Can you also look at ticket #616 if possible? I would really appreciate it. I have already provided a proposed fix.

comment:5 Changed 12 years ago by (none)

Milestone: 0.3release

Milestone 0.3release deleted

Note: See TracTickets for help on using tickets.