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

Fixes in the getResizeObserver() helper docs and tests.

Aleksander Nowodzinski 6 лет назад
Родитель
Сommit
a30682aef3

+ 4 - 5
packages/ckeditor5-utils/src/dom/getresizeobserver.js

@@ -21,8 +21,7 @@ const RESIZE_CHECK_INTERVAL = 100;
  * In browsers that support the `ResizeObserver` API, the native observer instance is returned.
  * In other browsers, a polyfilled instance is returned instead with a compatible API.
  *
- * See https://developer.mozilla.org/en-US/docs/Web/API/ResizeObserver to learn more about the
- * API.
+ * [Learn more](https://developer.mozilla.org/en-US/docs/Web/API/ResizeObserver) about the native API.
  *
  * @param {Function} callback A function called when any observed element was resized. Refer to the
  * native [`ResizeObserver`](https://developer.mozilla.org/en-US/docs/Web/API/ResizeObserver) API to
@@ -62,7 +61,7 @@ class ResizeObserverPolyfill {
 	 */
 	constructor( callback ) {
 		/**
-		 * A function called when any observed element was resized.
+		 * A function called when any observed {@link #_elements element} was resized.
 		 *
 		 * @readonly
 		 * @protected
@@ -80,7 +79,7 @@ class ResizeObserverPolyfill {
 		this._elements = new Set();
 
 		/**
-		 * Cached DOM elements bounding rects to compare to upon the next check.
+		 * Cached DOM {@link #_elements elements} bounding rects to compare to upon the next check.
 		 *
 		 * @readonly
 		 * @protected
@@ -90,7 +89,7 @@ class ResizeObserverPolyfill {
 
 		/**
 		 * An UID of the current timeout upon which the observed elements rects
-		 * will be compared to the {@link #_previousRects past rects}.
+		 * will be compared to the {@link #_previousRects previous rects} from the past.
 		 *
 		 * @readonly
 		 * @protected

+ 1 - 1
packages/ckeditor5-utils/tests/dom/getresizeobserver.js

@@ -11,7 +11,7 @@ import global from '@ckeditor/ckeditor5-utils/src/dom/global';
 import testUtils from '@ckeditor/ckeditor5-core/tests/_utils/utils';
 import DomEmitterMixin from '@ckeditor/ckeditor5-utils/src/dom/emittermixin';
 
-describe.only( 'getResizeObserver()', () => {
+describe( 'getResizeObserver()', () => {
 	testUtils.createSinonSandbox();
 
 	it( 'returns the native implementation if available', () => {