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

119
Vistas
Print all data attributes of a JQuery object

I am looking to print all data elements of a JQuery object. Here is my current code.

    cy.on('tap', 'node', function(evt){
      var clickedData = evt.target.attr("data");
      document.getElementById("nodeInfo").innerHTML = clickedData;
    });

Here is the evt.target in the console

Oe(1)
0: Oe [Oe(1), _private: {…}]
length: 1
_private:
active: false
animation: {current: Array(0), queue: Array(0)}
appliedInitStyle: true
arrowBounds: {source: null, target: null, mid-source: null, mid-target: null}
autoHeight: undefined
autoPadding: undefined
autoWidth: undefined
backgrounding: false
bbCache: {x1: 1090.4404404505497, y1: 155.49162695178342, x2: 1172.4404404505497, y2: 237.49162695178342, w: 82, …}
bbCachePosKey: 0
bbCacheShift: {x: 0, y: 0}
bodyBounds: {x1: 1090.4404404505497, y1: 155.49162695178342, x2: 1172.4404404505497, y2: 237.49162695178342, w: 82, …}
children: []
classes: Set(0) {size: 0}
compoundBoundsClean: false
cy: Za {_private: {…}}
data:
id: "0000_86a2e18d-ea5f-44f3-94a3-aa5cf72f8652_20211010-224514"
name: "Ryan"
type: "somnas:Person"
[[Prototype]]: Object
edges: [Oe(1)]
emitter: Ni {qualifierCompare: ƒ, eventMatches: ƒ, addEventFields: ƒ, callbackContext: ƒ, beforeEmit: ƒ, …}
grabbable: true
grabbed: false
group: "nodes"
hasPie: false
labelBounds: {all: {…}, source: null, target: null, main: {…}, sourceRot: null, …}
labelDimsKey: 1274045721130407
labelKey: -1742728187463711
labelStyleKey: 2774432038878951
listeners: []

You can see the data element I want printed.

Expected: id: xxx name: xxx type: xxx

Result: undefined

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