:(
Yeah, I can see the underlying problems with this too, and I got no ideas on fixing them :(
Yeah, I can see the underlying problems with this too, and I got no ideas on fixing them :(
Yeah, the nesting thing is a security thing to limit people pulling in things they shouldn't. The only way really is not to nest iframes. Or indeed not use iframes if at all possible :/
Surely the secondary load (page 2 or whatever) knows it's loaded via AJAX...
so it just needs to include the code for calling the menu for the items in question...
the menu constructor plus main data (what buttons are available) will already be loaded so it's just a case of submitting the extra menu data and some glue, right?
The advantage of the iframe, is that I really don't have to fear any JavaScript changes in the future will break the feature, and to me that made the deal; hence, my disappointment with the YT thing.
The first draft (the one in use here), yes, it does, well it can.
For instance, let's just think about a per-post non-mini-menu JS snippet that's rendered through a plugin. How do I tell the plugin, "okay I've loaded the next page, now do your thing"...? I can't, not really.
So, the iframe solution, really is the only 'realistic' solution right now.
I was kind of hoping you were building it via the msg skeleton so it could serve arbitrary slices of topics...
If you're pulling the full page and manipulating it there and then, surely you can just run any other JS at that point in time?
I dunno, bit pissed off and a bit frazzled from the search crap right now :(


But I get the impression that the solution is to ultimately do it the long way - not using an iframe, and in the second (and onward) page, triggering the menu generation manually on the new items as inline code. I don't see how else to get around all the issues.
PS: just pushed this version online, so that you can test it...
1) I think the behaviour needs to be predictable and documentable but that's all it needs to be.
2) Plugins will just splice themselves into the normal menus, and/or splice themselves into the template layers as given.
Provided display_main is still called and there's some way for a plugin to know that it's being called via infinite scroll vs not by infinite scroll... hell, could even provide two hooks - one that will be run for each post a la display_main and one that is only run for the first place (for things like topic_solved to splice its information into the page, that's not needed every iteration of page load, only the 'master' load for a topic)
3) That sounds like a huge and drastic change :(