Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

390
Visualizações
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 Respostas
Responde à pergunta

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 Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda