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

390
Vistas
Type 'Node' is missing the following properties

What causes the following issue below ? Any idea guys ? Thanks. the issue is on clone = thead.cloneNode(true);

Type 'Node' is missing the following properties from type 'HTMLElement': accessKey, accessKeyLabel, autocapitalize, dir, and 227 more.

Also I am having issue with Cannot read properties of null (reading 'getBoundingClientRect')

Actually I am using angular but there is some custom things I need to do that is why I am doing this manual JS things.

#code snippet

let container = document.querySelector('#properties-content-left-container');
         container.addEventListener("scroll", () => {
     let filterChips = document.querySelector('#properties-filter-chips');
     let filterChipsBB = filterChips.getBoundingClientRect();
     let top = filterChipsBB.top + filterChipsBB.height;
     let table = document.querySelector('#table') as HTMLElement | null;
     let tableBB = table.getBoundingClientRect();
     let thead = table.querySelector('thead:not(.temporary)') as HTMLElement | null;;
     let gridContainer = document.querySelector('.grid-container');
     let clone = table.querySelector('thead.temporary') as HTMLElement | null;
      table.style.position = 'relative';
     if (tableBB.top < top) {
         if (thead.style.position != 'fixed') {
             thead.style.position = 'fixed';
             thead.style.top = top + 'px';
             thead.style.width = (gridContainer ? gridContainer.clientWidth : table.clientWidth)  + 'px';
             thead.style.maxWidth = (gridContainer ? gridContainer.clientWidth : table.clientWidth)  + 'px';
             thead.style.overflowX = 'auto';
         }

         if (!clone) {
             clone = thead.cloneNode(true);
             clone.classList.add('temporary');
             clone.style.opacity = '0';
             clone.style.top = '0';
             clone.style.position = 'sticky';
             clone.style.width = 'auto';
             clone.style.maxWidth = 'unset';
             table.prepend(clone);
         }
about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

For the first question, use type assertion to tell the compiler that the node is actually an HTMLElement

clone = thead.cloneNode(true) as HTMLElement

For the second question, check if either filterChips or table are null. Use debugger/console for that.

about 4 years ago · Juan Pablo Isaza Denunciar
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