Closed f1nnix closed 9 years ago
Yes, it uses two iframes, 0 and 1 - if you use the standard flipper, which it sounds like you do. 0 and 1 are flipped as necessary, there's no real difference between them. If you want to find the one that is currently topmost, you can use reader.visiblePages()[0]
. If you want to find the one in a componentchanging
event that is about to get a new src
, use evt.m.pageDiv.m.activeFrame
. Or something like that.
@joseph brilliant, thank you very much!
As I got, Monocle operates with two iframes evenly. One for current active component, second (hidden) for content preloading or something about this. Correct me please, if I'm wrong.
I'm interested if it's possible to get current active iframe inside callback of
componentchange
event? The reason I want to do this is that I bind several events to contents of iframe:0 (maybe 0 is a bad idea) oncomponentchange
event, and when active iframe changed, I need to unbind all events from old iframe and bind them to a new one.Not sure, but unbinding should be performed on
monocle:componentchanging
, and new biding onmonocle:componentchange
, yeah? The question is, how to get one particular iframe to bind/unbind something on these events firied.Any help is highly appreciated, thank you in advance.