Rearranged the order of the methods and properties in this definition, to be consistent with the original JS code.
Modified the test code.
Merge pull request #2716 from gyohk/master

Rearranged the order of the methods and properties in this definition, t...