Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

84
Vistas
Symbols and cross realms

I found this example on the internet to understand cross realms and Symbols, however, I don't get the output the article states (both print false), am I replicating the example wrong? I want to try it because I want to learn about Symbols and cross kingdoms.

<body>
  <iframe srcdoc="<script>var sharedSymbol = Symbol.for('Shared symbol');</script>"></iframe>
  <script>
    const iframe = document.querySelector("iframe");
    const iframeWindow = iframe.contentWindow;

    // Will print false!
    console.log(iframeWindow.Symbol === Symbol);

    // But will print true!
    console.log(iframeWindow.sharedSymbol === Symbol.for("Shared symbol"));
  </script>
</body>
about 4 years ago · Juan Pablo Isaza
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda