SafeFrame
SafeFrame is an IAB standard that allows advertisers and publishers to use the next generation "viewable" metric to analyze their advertising.
Introduction
An introduction to SafeFrame from the IAB is here:
Original Source Code
The original source code was written in 2012 and is maintained in Sourceforge, here:
http://sourceforge.net/projects/safeframes/
Github Repository
Safeframe code is being mirrored on Github by Ad.js here:
http://github.com/adjs/safeframe
Ad.js makes an easy to use ad library where both advertisers and publishers can take advantage of the SafeFrame standard.