Browse Source

Docs: Added a usage example to the IframeView class docs.

Aleksander Nowodzinski 6 years ago
parent
commit
55716ffd57
1 changed files with 11 additions and 0 deletions
  1. 11 0
      packages/ckeditor5-ui/src/iframe/iframeview.js

+ 11 - 0
packages/ckeditor5-ui/src/iframe/iframeview.js

@@ -12,6 +12,17 @@ import View from '../view';
 /**
  * The iframe view class.
  *
+ * 		const iframe = new IframeView();
+ *
+ *		iframe.render();
+ *		document.body.appendChild( iframe.element );
+ *
+ * 		iframe.on( 'loaded', () => {
+ *			console.log( 'The iframe has loaded', iframe.element.contentWindow );
+ *		} );
+ *
+ * 		iframe.element.src = 'https://ckeditor.com';
+ *
  * @extends module:ui/view~View
  */
 export default class IframeView extends View {