Is DOMWindow supposed to work with more than one window ? if not we could use a global variable for settings, it still wouldn't be a good design but at least would fix this without too much hassle. I think it would be better than passing the settings every time, which doesn't really make sense anyway ?