amilajack / amilajack/compat-db

Support for different JS contexts

Aperta
#39 0 commenti 0 reazioni 1 assegnatario Rivendicata da @amilajack Vedi su GitHub
Lingua principale
JavaScript
Stelle
64
Fork
3
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

Some tests can only be run in certain contexts. WebGL and Workers are examples of this. We currently do some primitive prototype lookups to check if an API is defined in the global context. For other contexts, we'll need to make some modifications:

example:
```js
// Try this in chrome, which has support for webgl:
WebGLRenderingContext.clearColor === undefined // true

// We need to do this instead:
const canvas = document.getElementById('glCanvas');
var webglContext = canvas.getContext('webgl')

webglContext.clearColor === undefined // false
```

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.