Why is Extends the first property in the mootools class definition?

mootools docs state that "the Extends property should be the first property in the class definition.". After hours of investigation, I came across this line in a mootools document.

Although my original problem can be resolved after the settings are expanded as the first property, I do not understand why.

According to js docs, the order of properties of an object depends on the implementation of the mechanism. No warranties regarding the order are provided.

So why do mootools rely on order? Trying to read mootools code didn't help me;).

+4
source share
1 answer

, : MooTools , ,

implement - https://github.com/mootools/mootools-core/blob/master/Source/Class/Class.js#L75 - , . - . https://github.com/mootools/mootools-core/blob/master/Source/Class/Class.js#L98 - β†’ . overloadSetter for (var key in obj), FIFO - webkit , . ECMA

, Class.Mutators - Extends Implements - https://github.com/mootools/mootools-core/blob/master/Source/Class/Class.js#L100-L113 p >

extends parent, - https://github.com/mootools/mootools-core/blob/master/Source/Class/Class.js#L103-L104 - . Extends/Implements, , . Binds MooTools - - , , , API,

, , Implements Extends, Implements ... nevermind - , , MooTools, , . , : http://fragged.org/mootools-pattern-fun-class-implements-extends-at-the-same-time_1359.html

, mootools-2.0 AMD - https://github.com/kamicane/mootools-core/blob/define-2/Source/Core/Class.js#L19

, , Prime .

+5

All Articles