Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Feedback on the PowerManagementAPI
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  1 message - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
David Bruant  
View profile  
 More options Nov 6 2012, 9:17 am
Newsgroups: mozilla.dev.webapi
From: David Bruant <bruan...@gmail.com>
Date: Tue, 06 Nov 2012 15:17:32 +0100
Local: Tues, Nov 6 2012 9:17 am
Subject: Feedback on the PowerManagementAPI
Hi,

My comments refer to the API on the wiki page [1].

"PowerManager probably should implement the EventTarget interface and
remove the add/remove wake lock listener method. "
=> I agree. This is the same issue than the idleAPI
The main problem is that the current EventTarget API does not cover the
needs of the WebAPIs apparently.
EventTarget allows to specify an event using a string, but sometimes,
one wants to provide fine-granularity for the event.

I think a cross-spec solution would be the best solution, because the
current add/removeSomethingListener approach doesn't scale well.

Proposal:
abilty to create an event target on the fly:
     new EventTarget(any eventDecsription)
the argument can be used to describe what the event is like. EventTarget
can be made subclassable so that each subclass defines its semantics for
the description argument.

When generating an EventTarget (or one of its subclass) instance,
regular add/removeEventListener can be used.
What do you think?

David

[1] https://wiki.mozilla.org/WebAPI/PowerManagementAPI


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »