Setting CSS props and timers from JavaScript
David Faure
david at mandrakesoft.com
Sun Nov 3 16:54:58 GMT 2002
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On Sunday 03 November 2002 17:43, Koos Vriezen wrote:
> No, the speed penalty of 'styleDecl.getPropertyValue(prop)' is much
> smaller than that of a recalc imo.
Ah yes, I forgot to take into account the recalc. OK, now I see your point.
> It's only one extra lookup (which could
> be eliminated if we really want to, removeProperty also must find it).
Yes - but that means using Impl classes once more instead of the DOM.
> > Something else could have been changed first, which didn't trigger a recalc
> > - see MS docu on StyleSheet::removeRule (which I implemented but didn't
> > commit yet, due to my other CSS-related patch waiting for approval...)
> > What they suggest is elem.innerText=elem.innerText :}
>
> Which means that MS is even more lazier doing recalcs then?
Hmm, not particularly. Only that removeRule is _documented_ to not be
visible immediately (no recalc). Dunno if this can be generalized to other
methods etc.
> Btw, this looks like a workaround that might be fixed in next release.
of IE? Ah.
> > > > [ The real problem IMHO is that there is no DOM event for "scrollbars moved",
> > > > which such sites could use to move the static thingie, instead of polling :} ]
> > >
> > > IE has onScroll events, which are imo very suitable for this.
> >
> > Yup, sounds great. So
> > 1) we need to implement it
> > 2) we need to suggest it to the W3C DOM people
> > 3) we can finally ask the "makeStatic" people to rewrite their stuff :)
>
> That was not my point of course, could be said for all IE extension. I
> only noted that it existed.
Huh - I think you saw irony where I was in fact serious. I wasn't trying to imply
negative things here, all of the above is doable.
> > I think CSS already has some 'static' stuff (as seen on some w3c page iirc),
> > maybe this would be even better for this?
>
> Not sure what you mean be 'static'.
I don't know the proper term. I mean something that remains at the same
position on screen, even when you scroll up and down.
This is what makeStatic is about AFAICS - and I think CSS can do it much
better (without polling ;)
> But if you talk about this
> 'makeStatic' menu bar, I don't think it would help much if they don't
> include the animation effect of it.
Ah, the fact that it "catches up" when scrolling? Hmm ok, if that's important
then indeed JS is the only way, and onScroll would be much better than polling.
- --
David FAURE, david at mandrakesoft.com, faure at kde.org
http://people.mandrakesoft.com/~david/
Contributing to: http://www.konqueror.org/, http://www.koffice.org/
Get the latest KOffice - http://download.kde.org/stable/koffice-1.2/
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.7 (GNU/Linux)
iD8DBQE9xVTi72KcVAmwbhARAgxJAJ43+vxTjWuWS3avzIH1FPTgMfeu2QCfYlyZ
slof84p9vfyA5eD+/Vf28bs=
=Cpl1
-----END PGP SIGNATURE-----
More information about the kfm-devel
mailing list