Fetching contributors…
Cannot retrieve contributors at this time
41 lines (38 sloc) 1 KB
<!doctype html>
<link href="/basic.css" rel="stylesheet" type="text/css">
<script type="text/javascript" src="/webfont.js"></script>
<style type="text/css">
iframe {
height: 100px;
width: 100%;
<script type="text/javascript">
function loaded() {
var child = frames["child"];
child.document.body.innerHTML = "<h1 style=\"font-family: 'Droid Sans'\">Hello World. I am Droid Sans.</h1>";
google: {
families: ['Droid Sans'],
api: '/fonts/api'
context: child
<iframe name="child" src="/blank.html" onload="loaded()"></iframe>
<a href="#" onclick="document.getElementsByTagName('body')[0].style.color = '#fff';return false;">Hide Page</a> |
<a href="/google.html">Reload Cached</a>
The goal of this page is demonstrate fonts loading from Google via
Javascript into a child iframe.