Skip to content
This repository was archived by the owner on Jan 10, 2021. It is now read-only.

Update class.core.js#4

Open
aphex wants to merge 1 commit into
tjbutz:masterfrom
aphex:patch-1
Open

Update class.core.js#4
aphex wants to merge 1 commit into
tjbutz:masterfrom
aphex:patch-1

Conversation

@aphex
Copy link
Copy Markdown

@aphex aphex commented Aug 7, 2014

I am not sure if there are any side effects here but this allows classes that extend other classes to maintain there constructors. This is helpful for looking up the classname, something like myInstance.proto.constructor.name. If you write over the constructor with an anonymous function we lose that lookup.

This might be a horrible idea but just throwing it out there :)

I am not sure if there are any side effects here but this allows classes that extend other classes to maintain there constructors. This is helpful for looking up the classname, something like myInstance.__proto__.constructor.name. If you write over the constructor with an anonymous function we lose that lookup. 

This might be a horrible idea but just throwing it out there :)
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant