Create a gist now

Instantly share code, notes, and snippets.

anonymous /dict-ie.js
Created Dec 28, 2012

What would you like to do?
old IE shim for creating empty dict objects
// pre-ES5 IE version
var dict = (function() {
var frame = document.createElement("iframe");
var proto = frame.contentWindow.Object.prototype;
for (var i = 0, n = PROPERTY_KEYS.length; i < n; i++) {
delete proto[PROPERTY_KEYS[i]];
function Dict() { }
Dict.prototype = proto;
function dict() {
return new Dict();
return dict;


Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment