code from the Wiley book: WebKit for Dummies