scroll-iframe.js 425 B

1234567891011121314
  1. /**
  2. * @license Copyright (c) 2003-2019, CKSource - Frederico Knabben. All rights reserved.
  3. * For licensing, see LICENSE.md.
  4. */
  5. /* global window, document */
  6. import { scrollViewportToShowTarget } from '../../../src/dom/scroll';
  7. document.getElementById( 'scroll' ).addEventListener( 'click', () => {
  8. const target = window.frames[ 0 ].document.querySelector( '#target' );
  9. scrollViewportToShowTarget( { target } );
  10. } );