[whatwg] MediaModeAbstractView and changing of media dynamically
joao.eiras at gmail.com
Tue Sep 19 16:27:12 PDT 2006
For me, the w3c DOM 2 stylesheets spec always had the gap, which
MediaModeAbstractView fixes: a variable which holds the current media how
the page is being rendered.
But there's another small gap. Some UAs (Opera for desktop only to my
knowledge) can change the current media by displaying a webpage as
fullscreen (projection) or enabling small screen rendering (handheld). I
assume future versions will allow Opera to trigger tv mode, for
development sake. Also any other browsers can change from normal rendering
(screen) to print preview (print).
The only way for a script to keep track of this variable value, is to set
an interval, polling the variable.
I don't consider refreshing the page as valid workaround.
So, I suggest the creation of the 'media-change' event, which will fire
when the UA changes media, having the document as target.
The event object could be an instance of a UIEvent, and have 2 extra
properties: newMediaMode, and oldMediaMode.
More information about the whatwg