Created
May 19, 2012 03:42
-
-
Save hafriedlander/2728933 to your computer and use it in GitHub Desktop.
Entwine create property on first access pattern
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
$('selector').entwine({ | |
Editor: null, | |
createEditor: function(){ | |
return createTheEditorSomehow(); | |
}, | |
getEditor: function(){ | |
var val = this._super(); | |
if (!val) this.setEditor(val = this.createEditor()); | |
return val; | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment