Re: curl equivalence
Re: curl equivalence
- Subject: Re: curl equivalence
- From: kai <email@hidden>
- Date: Thu, 27 Oct 2005 23:46:31 +0100
On 27 Oct 2005, at 21:31, John R. wrote:
On Thu, 27 Oct 2005 00:06:07 kai said:
(1) Change of document name indicates the start of a load, NOT the
completion. Only DOM readyState indicates completion...
You seem to have overlooked the fact that my suggestion checks for
*two* changes of name - not just one. You may well be right about
readyState, although repeated tests here, loading numerous different
web pages, suggest that changes of status occur virtually
simultaneously. The following summary, extracted from the event log
of the test script (from which delays were removed for finer
granularity) is fairly typical of the results:
-----------------------
(*pageLoading = false*)
do JavaScript "document.readyState" in document 1 --> "complete"
get name of document 1 --> "Mactopia"
do JavaScript "document.readyState" in document 1 --> "complete"
get name of document 1 --> "Mactopia"
do JavaScript "document.readyState" in document 1 --> "complete"
get name of document 1 --> "Mactopia"
do JavaScript "document.readyState" in document 1 --> "Loading"
get name of document 1 --> "Loading “Apple”"
(*pageLoading = true*)
do JavaScript "document.readyState" in document 1 --> "Loading"
get name of document 1 --> "Loading “Apple”"
do JavaScript "document.readyState" in document 1 --> "Loading"
get name of document 1 --> "Loading “Apple”"
do JavaScript "document.readyState" in document 1 --> "Loading"
get name of document 1 --> "Loading “Apple”"
do JavaScript "document.readyState" in document 1 --> "complete"
get name of document 1 --> "Apple"
-----------------------
(2) Just asking for the document name to soon after setting the url
will wipe out the url for some reason. This seems to occur when my
own machine (not the internet) is slow.
I haven't been able to replicate that, but I'll take your word for it.
Compare your code to mine own. They are pretty close:
Agreed - although your code seems to have altered somewhat since your
original post... ;-)
---
kai
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden