async function in module not working in mobile

Aperta
#620 2 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
25/100
Tipo di issue
Bug
Chiarezza
Da chiarire
Stato di attività
Ferma
Stack tecnologico
javascript, python

Direzione di ricerca

Start with the module script in the issue and the generated target/index.js, then reproduce the async call on the reported iPhone 7s browser and on a desktop browser. Compare the generated module and runtime behavior, and document a confirmed cause or a minimal reproduction that maintainers can use to define the fix.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

IS: exploratory

there's a class like this, get_data is a async function:

class A(object):
    def __init__(self):
        self.name = 'I am A'

    async def get_data(self, p1, p2):
        print(self)
        print(p1, p2)
        # some await logic
        # ...

        print(self.name)
        return p1 + p2

a = A()

and in the html, I called a.get_data('a', 'b'), like this:

<script type="module">           
        import * as app from './__target__/index.js';
        
        app.a.get_data('a', 'b')

</script>

it works fine in PC, the output is:

<object of type: object>
a b
I am A

but, not working in mobile browser (iPhone 7s), the output is:

None
None None
None

Why?

Lingua principale
Python
Stelle
2.9k
Fork
218
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di TranscryptOrg/Transcrypt

Tutte le issue di TranscryptOrg/Transcrypt

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.