[OU] MIME-type for locally-populated windows
Hallvord Steen
hallvors at yahoo.com
Wed Dec 12 09:24:15 UTC 2007
> Code of the following type:
>
> var doc = window.open("output.html", "output").document;
> doc.open("text/plain");
> doc.writeln("This should be plain text");
> doc.writeln("This should be on the second line");
> doc.close();
>
> apparently causes IE and Firefox to associate a MIME-type of "text/plain"
> with the contents being placed in the new window
<X>
> Is this functionality likely to appear in Opera any time soon? Is there
> another (better?) way to achieve the intended result?
Well, you could try something like
window.open( 'data:text/plain,First line%0aSecond line' )
or even without a MIME type (default for data: is text/plain):
data:,First line%0aSecond line
Whether that is better depends on what you're trying to do :-p
--
Unsubscribe: mailto:opera-users-request at opera.com?subject=unsubscribe
___________________________________________________________
Support the World Aids Awareness campaign this month with Yahoo! For Good http://uk.promotions.yahoo.com/forgood/
More information about the Opera-Users
mailing list