Created
February 3, 2015 09:14
-
-
Save ooflorent/55ad63a7682ca934a21a to your computer and use it in GitHub Desktop.
dart2js curiosities
This file contains hidden or 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
// Curiosity #1 | |
// ------------ | |
function dart() { | |
this.x = 0; | |
delete this.x; | |
} | |
var A = new dart; |
This file contains hidden or 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
// Curiosity #2 | |
// ------------ | |
function convertToFastObject(properties) { | |
function MyClass() {} | |
MyClass.prototype = properties; | |
new MyClass(); | |
return properties; | |
} | |
A = convertToFastObject(A); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment