У меня есть этот код здесь:
<script type="text/javascript">
function goFunction(){
history.pushState("google.ca", "GOOGLE CANADA", "http://www.google.ca");
return event.preventDefault();
}
</script>
и
<a href="#" onclick="javascript:goFunction();">GO</a>
когда я нажимаю на ссылку, я получаю эту ошибку в журнале ошибок:
Uncaught SecurityError: A history state object with URL 'http://www.google.ca/' cannot be created in a document with origin 'http://cowelllaserhair.com'.
это можно увидеть по адресу: http://cowelllaserhair.com/test.html
Что я делаю неправильно?
Нужно ли мне что-то указывать?
Спасибо, J