Event that signals document being loaded?

classic Classic list List threaded Threaded
7 messages Options
sbq
Reply | Threaded
Open this post in threaded view
|

Event that signals document being loaded?

sbq
Greetings,
 
I've read that Gecko fires events document:load-complete,
document:reload and document:load-stopped so assistive technology apps
can determine when to start examining the AT-SPI tree.  Is there an
event fired at the front end of the loading process, that is, after an
action is performed that causes Gecko to start loading new content into
the window?
 
Some actions are likely to cause a new document to load, like clicking a
hyperlink.  But any onclick handler could decide to load a new document.
What is the best way for an assistive app to know: "a new document is
being loaded, wait for one of the above document:load events before
examining the AT-SPI tree"?
 
-Sam
_______________________________________________
dev-accessibility mailing list
[hidden email]
https://lists.mozilla.org/listinfo/dev-accessibility
Reply | Threaded
Open this post in threaded view
|

Re: Event that signals document being loaded?

Eitan Isaacson-2
I think object:state-changed:busy

On Mon, Jan 12, 2009 at 6:23 PM, Quiring, Sam <[hidden email]> wrote:

> Greetings,
>
> I've read that Gecko fires events document:load-complete,
> document:reload and document:load-stopped so assistive technology apps
> can determine when to start examining the AT-SPI tree.  Is there an
> event fired at the front end of the loading process, that is, after an
> action is performed that causes Gecko to start loading new content into
> the window?
>
> Some actions are likely to cause a new document to load, like clicking a
> hyperlink.  But any onclick handler could decide to load a new document.
> What is the best way for an assistive app to know: "a new document is
> being loaded, wait for one of the above document:load events before
> examining the AT-SPI tree"?
>
> -Sam
> _______________________________________________
> dev-accessibility mailing list
> [hidden email]
> https://lists.mozilla.org/listinfo/dev-accessibility
>
_______________________________________________
dev-accessibility mailing list
[hidden email]
https://lists.mozilla.org/listinfo/dev-accessibility
Reply | Threaded
Open this post in threaded view
|

Re: Event that signals document being loaded?

Willie Walker
Yep - that's what we look for in Orca.

Hope this helps,

Will

Eitan Isaacson wrote:

> I think object:state-changed:busy
>
> On Mon, Jan 12, 2009 at 6:23 PM, Quiring, Sam <[hidden email]> wrote:
>> Greetings,
>>
>> I've read that Gecko fires events document:load-complete,
>> document:reload and document:load-stopped so assistive technology apps
>> can determine when to start examining the AT-SPI tree.  Is there an
>> event fired at the front end of the loading process, that is, after an
>> action is performed that causes Gecko to start loading new content into
>> the window?
>>
>> Some actions are likely to cause a new document to load, like clicking a
>> hyperlink.  But any onclick handler could decide to load a new document.
>> What is the best way for an assistive app to know: "a new document is
>> being loaded, wait for one of the above document:load events before
>> examining the AT-SPI tree"?
>>
>> -Sam
>> _______________________________________________
>> dev-accessibility mailing list
>> [hidden email]
>> https://lists.mozilla.org/listinfo/dev-accessibility
>>
> _______________________________________________
> dev-accessibility mailing list
> [hidden email]
> https://lists.mozilla.org/listinfo/dev-accessibility

_______________________________________________
dev-accessibility mailing list
[hidden email]
https://lists.mozilla.org/listinfo/dev-accessibility
sbq
Reply | Threaded
Open this post in threaded view
|

RE: Event that signals document being loaded?

sbq
Will, Eitan,

Thanks for the quick responses.

-Sam

-----Original Message-----
From: [hidden email] [mailto:[hidden email]]
Sent: Monday, January 12, 2009 9:36 AM
To: Eitan Isaacson
Cc: Quiring, Sam; [hidden email]
Subject: Re: Event that signals document being loaded?

Yep - that's what we look for in Orca.

Hope this helps,

Will

Eitan Isaacson wrote:
> I think object:state-changed:busy
>
> On Mon, Jan 12, 2009 at 6:23 PM, Quiring, Sam
<[hidden email]> wrote:
>> Greetings,
>>
>> I've read that Gecko fires events document:load-complete,
>> document:reload and document:load-stopped so assistive technology
>> apps can determine when to start examining the AT-SPI tree.  Is there

>> an event fired at the front end of the loading process, that is,
>> after an action is performed that causes Gecko to start loading new
>> content into the window?
>>
>> Some actions are likely to cause a new document to load, like
>> clicking a hyperlink.  But any onclick handler could decide to load a
new document.
>> What is the best way for an assistive app to know: "a new document is

>> being loaded, wait for one of the above document:load events before
>> examining the AT-SPI tree"?
>>
>> -Sam
>> _______________________________________________
>> dev-accessibility mailing list
>> [hidden email]
>> https://lists.mozilla.org/listinfo/dev-accessibility
>>
> _______________________________________________
> dev-accessibility mailing list
> [hidden email]
> https://lists.mozilla.org/listinfo/dev-accessibility

_______________________________________________
dev-accessibility mailing list
[hidden email]
https://lists.mozilla.org/listinfo/dev-accessibility
sbq
Reply | Threaded
Open this post in threaded view
|

RE: Event that signals document being loaded?

sbq
In reply to this post by Willie Walker
I set up a listener for object:state-changed:busy [o:s-c:b] and also one
for the three document:* events.  I then ran an experiment hitting the
back-button in Firefox while logging events.  Below is the log.  I am
trying to interpret this data and have a few questions.

1. There are multiple o:s-c:b events prior to the :load-complete.  Is
a o:s-c:b event generated each time Firefox starts to fetch
content from a new URL?  Why isn't there a :load-complete generated
for each o:s-c:b event?

2. What is the significance of the value "1" for the detail1 field of
the o:s-c:b event?  I am seeing it on the first o:s-c:b event, but
not on the others of that group.  I am guessing:s "this event was caused
by the user".  Therefore, a value of 0 would mean the event was
programmatically generated, i.e., as part of the loading process.
Is that correct?

3. I notice that the accessibility object delivered with the last
o:s-c:b event matches the object delivered with the :load-complete.
Is this just coincidence or is there a deeper relation there?

-Sam

Log of hitting the Firefox back button 3 times, which navigated
to 3 unique web locations.  The text at the far right of each line
is "name(role)" of the event's source field:

TCF 35:43.669: ev object:state-changed:busy (det1: 0x1, det2: 0x0)
www.weather.com - Favorites(document frame)
TCF 35:44.330: ev object:state-changed:busy (det1: 0x0, det2: 0x0) Click
here to find out more!(document frame)
TCF 35:44.420: ev object:state-changed:busy (det1: 0x0, det2: 0x0)
weather.com - Map Navigator - Current Airport Delays(document frame)
TCF 35:44.977: ev object:state-changed:busy (det1: 0x0, det2: 0x0)
http://www.weather.com/maps/travel.html?from=gn_six_welcome(document
frame)
TCF 35:44.978: ev document:load-complete (det1: 0x0, det2: 0x0)
http://www.weather.com/maps/travel.html?from=gn_six_welcome(document
frame)

TCF 35:46.192: ev object:state-changed:busy (det1: 0x1, det2: 0x0)
http://www.weather.com/maps/travel.html?from=gn_six_welcome(document
frame)
TCF 35:46.847: ev object:state-changed:busy (det1: 0x0, det2: 0x0)
www.weather.com - Customization Signup(document frame)
TCF 35:46.848: ev document:load-complete (det1: 0x0, det2: 0x0)
www.weather.com - Customization Signup(document frame)

TCF 35:47.757: ev object:state-changed:busy (det1: 0x1, det2: 0x0)
www.weather.com - Customization Signup(document frame)
TCF 35:49.382: ev object:state-changed:busy (det1: 0x0, det2: 0x0)
National and Local Weather Forecast, Hurricane, Radar and
Report(document frame)
TCF 35:49.383: ev document:load-complete (det1: 0x0, det2: 0x0) National
and Local Weather Forecast, Hurricane, Radar and Report(document frame)

-----Original Message-----
From: [hidden email] [mailto:[hidden email]]
Sent: Monday, January 12, 2009 9:36 AM
To: Eitan Isaacson
Cc: Quiring, Sam; [hidden email]
Subject: Re: Event that signals document being loaded?

Yep - that's what we look for in Orca.

Hope this helps,

Will

Eitan Isaacson wrote:
> I think object:state-changed:busy
>
> On Mon, Jan 12, 2009 at 6:23 PM, Quiring, Sam
<[hidden email]> wrote:
>> Greetings,
>>
>> I've read that Gecko fires events document:load-complete,
>> document:reload and document:load-stopped so assistive technology
>> apps can determine when to start examining the AT-SPI tree.  Is there

>> an event fired at the front end of the loading process, that is,
>> after an action is performed that causes Gecko to start loading new
>> content into the window?
>>
>> Some actions are likely to cause a new document to load, like
>> clicking a hyperlink.  But any onclick handler could decide to load a
new document.
>> What is the best way for an assistive app to know: "a new document is

>> being loaded, wait for one of the above document:load events before
>> examining the AT-SPI tree"?
>>
>> -Sam
>> _______________________________________________
>> dev-accessibility mailing list
>> [hidden email]
>> https://lists.mozilla.org/listinfo/dev-accessibility
>>
> _______________________________________________
> dev-accessibility mailing list
> [hidden email]
> https://lists.mozilla.org/listinfo/dev-accessibility

_______________________________________________
dev-accessibility mailing list
[hidden email]
https://lists.mozilla.org/listinfo/dev-accessibility
Reply | Threaded
Open this post in threaded view
|

Re: Event that signals document being loaded?

Aaron Leventhal-3
In reply to this post by sbq
What's wrong with the document:load-complete and document:load-stopped
events? AT-SPI provides them, after all.

Here are our API docs:
https://developer.mozilla.org/en/Accessibility/AT-APIs

Check under the "supported events" section.

- Aaron

https://developer.mozilla.org/en/Accessibility/AT-APIs
On 1/12/2009 5:23 PM, Quiring, Sam wrote:

> Greetings,
>
> I've read that Gecko fires events document:load-complete,
> document:reload and document:load-stopped so assistive technology apps
> can determine when to start examining the AT-SPI tree.  Is there an
> event fired at the front end of the loading process, that is, after an
> action is performed that causes Gecko to start loading new content into
> the window?
>
> Some actions are likely to cause a new document to load, like clicking a
> hyperlink.  But any onclick handler could decide to load a new document.
> What is the best way for an assistive app to know: "a new document is
> being loaded, wait for one of the above document:load events before
> examining the AT-SPI tree"?
>
> -Sam

_______________________________________________
dev-accessibility mailing list
[hidden email]
https://lists.mozilla.org/listinfo/dev-accessibility
Reply | Threaded
Open this post in threaded view
|

Re: Event that signals document being loaded?

Aaron Leventhal-3
In reply to this post by Willie Walker
You can look at the state change for busy, on a document, true.
The detail flag indicates whether the busy state is being set or
cleared. It's cleared when the doc is finished loading.

But, I'd thing that the document:load-complete is best.

- Aaron
_______________________________________________
dev-accessibility mailing list
[hidden email]
https://lists.mozilla.org/listinfo/dev-accessibility