document body style height 400pt let response await fetch https notebook xbdev net var scripts fontlist json let text await response text let fontlist JSON parse text link rel preconnect href https fonts googleapis com link rel preconnect href https fonts gstatic com crossorigin link href https fonts googleapis com css2 family Roboto wght 100 display swap rel stylesheet CSS font family Roboto sans serif let container document createElement div container style max height 380pt container style border 1px solid blue container style overflow auto document body appendChild container console log number of fonts fontlist length for let i 0 i fontlist length i var link document createElement link link rel stylesheet link type text css link href https fonts googleapis com css2 family fontlist i link media all document head appendChild link link onload function console log loaded style let div document createElement div div innerHTML fontlist i abcdef ABCEFGH div style font family fontlist i div style font size 22pt div title fontlist i container appendChild div end for i console log ready document body style height 3000pt let response await fetch https notebook xbdev net var scripts fontlist json let text await response text let fontlist JSON parse text link rel preconnect href https fonts googleapis com link rel preconnect href https fonts gstatic com crossorigin link href https fonts googleapis com css2 family Roboto wght 100 display swap rel stylesheet CSS font family Roboto sans serif console log number of fonts fontlist length for let i 0 i fontlist length i var link document createElement link link rel stylesheet link type text css link href https fonts googleapis com css2 family fontlist i link media all document head appendChild link link onload function console log loaded style let div document createElement div div style display inline block div innerHTML fontlist i div style font family fontlist i div title fontlist i document body appendChild div end for i console log ready
2pt div title fontlist i container appendChild div end for i console log ready document body style height 3000pt let response await fetch https notebook xbdev net var scripts fontlist json let text await response text let fontlist JSON parse text link rel preconnect href https fonts googleapis com link rel preconnect href https fonts gstatic com crossorigin link href https fonts googleapis com css2 family Roboto wght 100 display swap rel stylesheet CSS font family Roboto sans serif console log number of fonts fontlist length for let i 0 i fontlist length i var link document createElement link link rel stylesheet link type text css link href https fonts googleapis com css2 family fontlist i link media all document head appendChild link link onload function console log loaded style let div document createElement div div style display inline block div innerHTML fontlist i div style font family fontlist i div title fontlist i document body appendChild div end for i console log ready