diff --git a/examples/index.html b/examples/index.html
index 1eebae8b5e5a90..2951e55e013061 100644
--- a/examples/index.html
+++ b/examples/index.html
@@ -60,7 +60,7 @@
const links = {};
const validRedirects = new Map();
- const container = document.createElement( 'div' );
+ const fragment = document.createDocumentFragment();
let selected = null;
@@ -68,8 +68,6 @@
async function init() {
- content.appendChild( container );
-
viewSrcButton.style.display = 'none';
const files = await ( await fetch( 'files.json' ) ).json();
@@ -82,14 +80,14 @@
const header = document.createElement( 'h2' );
header.textContent = key;
header.setAttribute( 'data-category', key );
- container.appendChild( header );
+ fragment.appendChild( header );
for ( let i = 0; i < category.length; i ++ ) {
const file = category[ i ];
const link = createLink( file, tags[ file ] );
- container.appendChild( link );
+ fragment.appendChild( link );
links[ file ] = link;
validRedirects.set( file, file + '.html' );
@@ -98,6 +96,8 @@
}
+ content.appendChild( fragment );
+
if ( window.location.hash !== '' ) {
const file = window.location.hash.substring( 1 );