I was working on a Gaia UI test script that would automatically grant
geolocation to https://maps.google.com when visiting from a browser.
This is what I used:
"
var detail = {'type': 'geolocation', 'permissions': [],
'origin': 'test', 'isApp': false, 'remember': true,
'id': 'perm1' };
var response = {
'id': 'perm1',
'permissions': ['geolocation'],
'isApp': false,
'type': 'permission-allow',
'remember': true,
'isGranted': true,
'manifestURL': '',
'origin': "https://maps.google.com"
};
var event = document.createEvent('CustomEvent');
event.initCustomEvent('mozContentEvent', true, true, {detail:
response});
window.dispatchEvent(event);
"
I ran this from the system app, it didn't work at all.
What am I doing wrong here?
Regards,
Martijn
_______________________________________________
dev-fxos mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-fxos