Indeed, the usage of mozAlarms for synchronization purposes is a trick
to circumvent the lack of such an API as mozSync.
AFAIK, with mozSync, the users are guaranteed their signals don't
trigger before the interval but some privileged apps can intercept every
sync request to increase their intervals and, for instance, pack them
accordingly to external factors (battery, connection status, user
preferences...)
On 07/01/15 18:33, Jonas Sicking wrote:
On Tue, Jan 6, 2015 at 9:18 AM, <[email protected]> wrote:
The only open question on feasibility would be on how to programmatically
trigger a message handler?
You can do that by doing
var syncHandlers = [];
var oldSetMessageHandler = window.setMessageHandler;
window.setMessageHandler = function(type, handler) {
if (type == "request-sync") {
syncHandlers.push(handler);
}
oldSetMessageHandler.call(window, type, handler);
}
/ Jonas
_______________________________________________
dev-b2g mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-b2g
________________________________
Este mensaje y sus adjuntos se dirigen exclusivamente a su destinatario, puede
contener información privilegiada o confidencial y es para uso exclusivo de la
persona o entidad de destino. Si no es usted. el destinatario indicado, queda
notificado de que la lectura, utilización, divulgación y/o copia sin
autorización puede estar prohibida en virtud de la legislación vigente. Si ha
recibido este mensaje por error, le rogamos que nos lo comunique inmediatamente
por esta misma vía y proceda a su destrucción.
The information contained in this transmission is privileged and confidential
information intended only for the use of the individual or entity named above.
If the reader of this message is not the intended recipient, you are hereby
notified that any dissemination, distribution or copying of this communication
is strictly prohibited. If you have received this transmission in error, do not
read it. Please immediately reply to the sender that you have received this
communication in error and then delete it.
Esta mensagem e seus anexos se dirigem exclusivamente ao seu destinatário, pode
conter informação privilegiada ou confidencial e é para uso exclusivo da pessoa
ou entidade de destino. Se não é vossa senhoria o destinatário indicado, fica
notificado de que a leitura, utilização, divulgação e/ou cópia sem autorização
pode estar proibida em virtude da legislação vigente. Se recebeu esta mensagem
por erro, rogamos-lhe que nos o comunique imediatamente por esta mesma via e
proceda a sua destruição
_______________________________________________
dev-b2g mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-b2g