there is a possibility of browser preview in Komodo Edit. I use internal Komodo browser and I would like to have this browser preview updated on each file save. I have found this script here:
var views = ko.views.manager.getAllViews();
var view;
for (var i=0; i < views.length; i++) {
view = views[i];
if (view.getAttribute("type") == "browser") {
view.reload();
}
}
After attaching this macro to Komodo event “file save” it works perfectly, when the browser preview is in the same tab-bar as the edited files. However, it does not work when I use Split View feature and the browser tab is in another tab-bar. I would like to know how to modify the script to get the desired behavior. I also attach the screenshot to for better understanding of my question.
I’ve tried the macro on both OSX and Linux but am not able to reproduce your issue. Are you sure the browser is not reloading? To verify try using the following address and see if the timestamp changes: http://www.unixtimestamp.com/index.php
all: I did some additional testing with the original script in the meantime, before the toddw’s reply appeared. I’ve found out, that the original script works as long as split view is not used. When the split view is used, it works as long as all the file tabs are in the left-hand-side pane and the browser tab on the right-hand-side. And it does not work exactly in that layout that can be seen on the screenshot above (without the blue line of course).
Anyway, the script modification seems to solve this issue and it seems to work in all cases. Thanks a lot to you both!