Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

User Javascript's ability to prevent content loading

3 views
Skip to first unread message

Eik

unread,
Oct 5, 2008, 12:01:30 PM10/5/08
to
If using the DOMContentLoaded event with a user javascript to remove
images from a page, does this prevent Opera from downloading those images?
It certainly doesn't appear to if the load event is used, but is
DOMContentLoaded also too late to intercept the requests? I've been
testing this in 9.52 but get inconsistent results.

Also, when using DOMContentLoaded, is it possible to remove iFrames from
pages before their content is requested? I don't appear to be able to get
this to work at all. The iFrames never appear but I see their URLs flash
in the progress bar so Opera is still requsting them. I also tried
inserting a stylesheet into the document at the start of the javascript
(not on any handler, literally at the start, before the Body even exists,
by appending a document.createElement('style') to
document.documentElement.firstChild) that included "iframe{content:"";
display:none;}" but that didn't help either.


I understand there is a difference of opinion between Opera and other
browser vendors as to what point DOMContentLoaded should fire, but I think
Opera's approach would be more useful for user javascripts if it allowed
them to intercept replaced elements before the request is made for their
content.

And as for standardising the behaviour of DOMContentLoaded, why not do
what XMLHttpRequest has done for years and have a series of states for
page loading to cover when the document doesn't exist yet, when the body
object has been created, when the DOM has finished being built from the
HTML, when the CSS has been applied, when replaced elements are being
loaded, when they have finished loading, and when the document is
complete, etc? The entire process of page loading seems too complicated to
have simple event objects, especially when you want to allow the user to
apply user javascripts.

I know that allowing for both dynamic rendering and coping with street
HTML is problematic (for example what would happen with the state that
signals the CSS has been applied but the DOM isn't yet built - but then a
<style> element is encountered inside the <body> element?), but surely
some kind of load event with states is feasible and useful?

asker

unread,
Oct 29, 2008, 10:08:24 AM10/29/08
to
hi there.
look at mypage12.ir.pl . there is a bug in opera when you click on the
calendar icon near input on the left of the page. the calendar shows on
which is ok. but when you hover the slideshow on the right of the page, it
shows as the very first on the screen (like it has the highest z-index but
it doesn't).

what does cause this problem?

0 new messages