Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

277
Views
Hacer que window.close funcione en Firefox con Cross-Origin-Opener-Policy: mismo origen

Tengo un SitioA que abre el SitioB en una ventana emergente y el SitioB redirige al SitioA que tiene window.close . SiteB tiene Cross-Origin-Opener-Policy: same-origin . El problema es que window.close no funciona en Firefox (funciona en Chrome).

El flujo es así:

SitioA/1.html -> var openedWindow = window.open(SiteA/2.html)

-> SiteA/2.html redirige a SiteB

-> SiteB tiene Cross-Origin-Opener-Policy: same-origin

-> SiteB redirige a SiteA/3.html (todavía en ventana emergente)

-> SitioA/3.html -> window.close()

Esto solo funciona en Firefox si Cross-Origin-Opener-Policy en SiteB se establece en cross-origin o se elimina por completo.

Probé en lugar de window.close en 3.html, openedWindow.close en 1.html pero eso tampoco funcionó.

Probé el truco window.open('','_parent','') que tampoco funcionó.

¿Hay alguna manera de lograr esto?

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!