Why Ionic3 can not trigger document.click()

let a = document.createElement('a');
a.href = 'http://www.google.com';
document.getElementsByTagName('body')[0].appendChild(a);
console.log(a);
a.click();

I use this code to test document.click() event,but a.click() can not trigger in Ionic3
It’s usable in Angular5
why?

what are you trying to do?

I want to navigate to outsite website ,but i can’t use location.href or window.open or window.location.href

If you want to open in new page/tab use => window.open(‘http://www.google.com’, 'blank);
If you want to use the current page/tab use => window.location.href = ‘http://www.google.com’;

i can’t use location.href or window.open or window.location.href
Does anybody can help me?

What you mean you can’t? why?

I use it in special browser, this browser forbidden window.open,window.location.href

what browser you used?

it’s a custom brower used in an app…
emmm…
it’s not the point…