dynamic-remove-1.html (508B)
1 <!DOCTYPE html> 2 <html class="reftest-wait"> 3 <style> 4 body { font-family: One; } 5 </style> 6 <script> 7 var f1 = new FontFace("One", "url(../fonts/markA.ttf)"); 8 var f2 = new FontFace("One", "url(../fonts/mark2A.ttf)"); 9 10 f1.load(); 11 f2.load(); 12 13 Promise.all([f1.load(), f2.load()]) 14 .then(function() { 15 document.fonts.add(f1); 16 document.fonts.add(f2); 17 }) 18 .then(document.fonts.ready) 19 .then(function() { 20 document.fonts.delete(f2); 21 document.documentElement.className = ""; 22 }); 23 </script> 24 <p>ABC</p>