Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

214
Views
¿Por qué el script html no obtiene la lista de mi archivo code.gs?

Estoy trabajando en una especie de cosa de YouTube, pero la he estado probando y no pega los títulos de YouTube en el cuadro de diálogo personalizado. tengo 2 archivos Code.gs y youtube.html . Aquí están los archivos
Código.gs

 function youtube(input1){ const list = [] const sr = YouTube.Search.list("snippet", {q: input1, maxResults: 50}) sr.items.forEach(function(vid){ list.push(vid.snippet.title) }) return list }

youtube.html

 <!DOCTYPE html> <html> <head> <base target="_top"> </head> <body> <button onclick="printData()">Return</button> <script> function printData(){ const list = google.script.run.youtube("test") document.write(list) } </script> </body> </html>

Cuando lo ejecuto, simplemente no hace nada cuando hago clic en el botón

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

<script> function printData(){ const list = google.script.run .withSuccessHandler((list) => document.write(list)) .youtube("test") } </script>

controlador de éxito

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!