--- title: 'Error: Permission denied to access property "x"' slug: Web/JavaScript/Reference/Errors/Property_access_denied tags: - Error - JavaScript - Seguridad - errores translation_of: Web/JavaScript/Reference/Errors/Property_access_denied ---
Error: Permission denied to access property "x"
{{jsxref("Error")}}.
Se ha intentado acceder a un objeto al cual no tienes permiso. Probablemente es un elemento {{HTMLElement("iframe")}} cargado de otro dominio en el cual violaste la política del mismo origen.
<!DOCTYPE html>
<html>
<head>
<iframe id="myframe" src="http://www1.w3c-test.org/common/blank.html"></iframe>
<script>
onload = function() {
console.log(frames[0].document);
// Error: Permission denied to access property "document"
}
</script>
</head>
<body></body>
</html>