Răsfoiți Sursa

Added a comment for the feature detector.

Maciej Bukowski 6 ani în urmă
părinte
comite
3ff2d62857
1 a modificat fișierele cu 2 adăugiri și 0 ștergeri
  1. 2 0
      packages/ckeditor5-watchdog/tests/watchdog.js

+ 2 - 0
packages/ckeditor5-watchdog/tests/watchdog.js

@@ -918,6 +918,8 @@ function throwCKEditorError( name, context ) {
 	throw new CKEditorError( name, context );
 }
 
+// Feature detection works as a race condition - if the `unhandledrejection` event
+// is supported then the listener should be called first. Otherwise the timeout will be reached.
 function doesEnvSupportUnhandledRejectionEvent() {
 	return new Promise( res => {
 		window.addEventListener( 'unhandledrejection', function listener() {