Created
September 27, 2010 17:19
-
-
Save sebmarkbage/599413 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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