8
0
Просмотр исходного кода

Added a comment for the feature detector.

Maciej Bukowski 6 лет назад
Родитель
Сommit
3ff2d62857
1 измененных файлов с 2 добавлено и 0 удалено
  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() {