[Javascript] Questions about document.readyState
tedd
tedd at sperling.com
Sun Jun 25 11:34:46 CDT 2006
At 3:43 PM +0100 6/25/06, Nick Fitzsimons wrote:
>tedd wrote:
>>Oh javascript masters:
>>
>>I'm trying to figure out "document.readyState" and how it works.
>>
>>In my quest, I came across a couple of things that don't seem logical to me. Maybe someone here would be knowledge and kind enough to explain it to me.
>>
>>My questions and example are shown here:
>>
>>http://xn--ovg.com/a7.php
>>
>>Why?
>>
>>tedd
>>
>>PS: If you browser complains about the url, please let me now -- thanks.
>>
>
>Your code is writing to the document (using document.write()) and then recursively calling itself. The document can never be complete until you stop writing to it. Also the JavaScript interpreter has a sanity check which, finding that the function has called itself 1000 times, assumes that a bug is causing an infinite recursive descent and stops it to prevent your browser from crashing.
Ahhhh. I see.
It's to protect itself from people like me. :-)
tedd
--
------------------------------------------------------------------------------------
http://sperling.com http://ancientstones.com http://earthstones.com
More information about the Javascript
mailing list