Hello,
I was also facing the same problem that i am not able to get the
document.readyState property in the FF and this thread has solved my
problem.

Thanks a lot,
Kusum

On Nov 18 2009, 1:15 am, John Resig <jere...@gmail.com> wrote:
> Oh, just to mention, regarding your solution snippet - it doesn't really
> solve anything (especially not for us). The case that we're looking to
> handle with the readyState code was when jQuery is loaded after the document
> ready event has already occurred. Your snippet will be stuck in a permanent
> loading state and never move to complete in this case.
>
> As to using readyState - we added it in when we did because we were informed
> that Firefox 3.5 was going to ship with it, unfortunately that wasn't the
> case. Regardless, we need to pressure browsers to keep moving and this is
> one way to do so. Until we drop support for Firefox 3.5 we will continue to
> make no guarantees about loading jQuery dynamically.
>
> Of course, an alternative working solution for Firefox < 3.6 would be great.
>
> --John
>
> On Tue, Nov 17, 2009 at 11:12 AM, Andrea Giammarchi 
> <andrea.giammar...@gmail.com> wrote:
> > John I am not that familiar with github yet, I did a mess wven with last
> > PureDom for taskspeed so please forgive me ... but there is another problem
> > there, if I am not wrong.
>
> > Line 826 of the same file:
>
> >    // Catch cases where $(document).ready() is called after the
> >    // browser event has already occurred.
> >    if ( document.readyState === "complete" ) {
>
> >            return jQuery.ready();
>
> > We got a problem here, Firefox < 3.6 (beta included) does not have the
> > readyState proeprty.
> > Everybody else seems to have it. There is a massive bug in MDC for this
> > missed property which apparently now is into HTML5
>
> > For an event handler I am creating for other reasons I have solved in this
> > way:
>
> >     if(document.readyState == null &&
> > document.addEventListener)(function(){
> >         document.addEventListener("DOMContentLoaded", function
> > DOMContentLoaded(){
> >             document.removeEventListener("DOMContentLoaded",
> > DOMContentLoaded, false);
> >             document.readyState = "complete";
> >         }, false);
> >         document.readyState = "loading";
> >     })();
>
> > With above code we are sure that if jQuery or a plugin is evaluated after
> > the onload event (lazy load) Firefox will directly fire the events as every
> > other browser does.
>
> > being document a first class node without attributes, above snippet will
> > make readyState behavior a bit more consistent.
>
> > Please let me know if I have missed something in the bindReady stuff.
>
> > Regards
>
> > On Tue, Nov 17, 2009 at 3:46 PM, John Resig <jere...@gmail.com> wrote:
>
> >> Good suggestion, just landed it:
>
> >>http://github.com/jquery/jquery/commit/3a23a5c17dd0522da06db8f36890f1...
>
> >> You should mention stuff like this as comments on the commits - and file
> >> follow-up patches through Github. It makes it super-easy to manage (on my
> >> end, at least).
>
> >> --John
>
> >> On Tue, Nov 17, 2009 at 6:33 AM, Andrea Giammarchi <
> >> andrea.giammar...@gmail.com> wrote:
>
> >>> AFAIK top window frameElement returns null and not undefined, as is for
> >>> document.body when not present yet.
>
> >>> Moreover we can use the JavaScript weird case where null == undefined but
> >>> while null is static, undefined can be redefined or in any case it needs 
> >>> to
> >>> be discovered in the scope chain.
>
> >>> On line 857 of this event.js
> >>>http://github.com/jquery/jquery/blob/master/src/event.js
>
> >>> I can spot this:
>
> >>>     toplevel = window.frameElement === undefined;
>
> >>> In few words and at least in my IE8 that doScroll try/catch is never
> >>> performed at all since the condition
>
> >>>     if( document.documentElement.doScroll && toplevel)
>
> >>> cannot be true.
>
> >>> Is that file part of the release? I did not check but you can quickly fix
> >>> via
>
> >>>     toplevel = window.frameElement == null;
>
> >>> Regards
>
> >>> --
> >>> You received this message because you are subscribed to the Google Groups
> >>> "jQuery Development" group.
> >>> To post to this group, send email to jquery-...@googlegroups.com.
> >>> To unsubscribe from this group, send email to
> >>> jquery-dev+unsubscr...@googlegroups.com<jquery-dev%2bunsubscr...@googlegroups.com>
> >>> .
> >>> For more options, visit this group at
> >>>http://groups.google.com/group/jquery-dev?hl=.
>
> >>  --
> >> You received this message because you are subscribed to the Google Groups
> >> "jQuery Development" group.
> >> To post to this group, send email to jquery-...@googlegroups.com.
> >> To unsubscribe from this group, send email to
> >> jquery-dev+unsubscr...@googlegroups.com<jquery-dev%2bunsubscr...@googlegroups.com>
> >> .
> >> For more options, visit this group at
> >>http://groups.google.com/group/jquery-dev?hl=.
>
> >  --
> > You received this message because you are subscribed to the Google Groups
> > "jQuery Development" group.
> > To post to this group, send email to jquery-...@googlegroups.com.
> > To unsubscribe from this group, send email to
> > jquery-dev+unsubscr...@googlegroups.com<jquery-dev%2bunsubscr...@googlegroups.com>
> > .
> > For more options, visit this group at
> >http://groups.google.com/group/jquery-dev?hl=.
-- 
You received this message because you are subscribed to the Google Groups 
"jQuery Development" group.
To post to this group, send email to jquery-...@googlegroups.com.
To unsubscribe from this group, send email to 
jquery-dev+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/jquery-dev?hl=en.


Reply via email to