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

384
Vistas
How to console.dir() on extendScript?

I want to familiarize with the DOM in extendScript , I want to console.log(certainObject) or console.dir(certainObject) in order to check its properties.

There is a way to console.log() such as $.writeln(certainVariable) but that won't return the properties of that object.

I can use the extendScript toolkit but in the Data Browser I can't identify all the objects.

Going to the documentation is confusing , for instance for this object app.activeDocument.placedItems it list certain properties , but a basic property such as the method app.activeDocument.placedItems.add(); is not there.

Where does that method come from? Inheritance ? , How can I check this?.

about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

The simplest way to get all (?) properties of the object is just to loop through them and to print the result in the console:

var obj = app.selection[0];
var props = '';
for (var prop in obj) {
    try { props += prop + ' : ' + obj[prop] + '\n' }
    catch(e) { props += prop + ': ???\n' }
}
$.writeln(props.split('\n').sort().join('\n'));

Not sure if it's the best way, but I'm doing it sometimes. )

I saw the solution that does the same and put the result into a panel. It can be done quite easy if you know how to create a panel and to fill it with a text.

As for the methods... Well, I don't know the answer.

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