Skip to content

Instantly share code, notes, and snippets.

@sebmarkbage
Created September 27, 2010 17:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sebmarkbage/599413 to your computer and use it in GitHub Desktop.
Save sebmarkbage/599413 to your computer and use it in GitHub Desktop.
var myiframe = document.getElementById('#frame');
import 'MyLegacyClass' with { document: myiframe.contentWindow.document };
var frameBody = myiframe.contentWindow.document.body
new MyLegacyClass().toElement().inject(framebody); // Doesn't work without proper IoC
var MyLegacyClass = new Class({
initialize: function(){
this.element = new Element('div');
},
toElement. function(){
return this.element;
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment