Re: [vibration] How to handle iframes?

On Sep 4, 2013, at 6:57 PM, "Kostiainen, Anssi" <anssi.kostiainen@intel.com> wrote:

> On Sep 4, 2013, at 6:45 PM, Michael van Ouwerkerk <mvanouwerkerk@chromium.org> wrote:

[...]

>> We would have to change the spec to say that navigator.vibrate(0) only cancels the pattern in that frame. Patterns played from other frames are unaffected.
>> 
>> I've gone over the Geolocation API spec a number of times recently, and I don't remember it saying anything about restricting to the top level frame. 
> 
> This was just a proposal sent to the mailing list IIRC, so it never landed to the spec.
> 
>> What do you think?
> 
> Looks good to me.
> 
> All - do you have concerns with Michael's proposal? If I hear no concerns, I'm happy to update the spec.


Here's a proposed fix to the algorithm.

Current:

[[

8. Cancel the pre-existing instance of the processing vibration patterns algorithm, if any.

9. If /pattern/ is an empty list, or if the device does not provide a vibration mechanism (or it is disabled), then return true and terminate these steps.

]]

Proposed fix:

[[

[NEW] If there is a pre-existing instance of the processing vibration patterns algorithm running for this browsing context, run the following substeps: 

1. Cancel the pre-existing instance of the processing vibration patterns algorithm, if any.

2. If /pattern/ is an empty list, or if the device does not provide a vibration mechanism (or it is disabled), then return true and terminate these steps.

]]

Here's the full context:

  http://dev.w3.org/2009/dap/vibration/#dfn-processing-vibration-patterns

Michael, All - let me know if you spot bugs in this proposal. I'll land this after your review.

Tracker - this relates to my ACTION-652.

Thanks,

-Anssi

Received on Wednesday, 2 October 2013 13:20:08 UTC