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

97
Vistas
Read an element within an iframe

I'm building an Edge extension. I'm trying to get the exact same element as this question asks, but I want to use JS, not Selenium. Element

I'm running the JS through my extension's background script. In the future, I would like the popup to have a button and that button to read the syllable on screen.

The provided solution is in Selenium and I'd like to transpile it into JS. driver.switch_to_frame(driver.find_element_by_xpath("//div[@class='game']/iframe[contains(@src,'jklm.fun')]"))

If none of this works, I guess I'll have to use optical text recognition.

Here's manifest.json

{
    "name": "myName",
    "description": "myDescription",
    "version": "1.0.0",
    "manifest_version": 3,
    "icons": {
        "128": "myIcon.png"
    },
    "content_scripts": [
        {
            "matches": [
                "https://jklm.fun/*"
            ],
            "js": [
                "js/myScript.js"
            ]
        }
    ]
}

Inside js folder, here's myScript.js

console.log('myscript is running')

const syllableHandler = () => { 
    const iframe = document.getElementsByTagName("iframe")
    console.log(iframe?.[0]?.contentWindow)
}

document.addEventListener('keydown', syllableHandler)

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