我一直在閱讀有關declare.safeMixin()
的dojo 1.9文檔,重點介紹它與lang.mixin
之間的區別。dojo 1.9:什麼註釋聲明.safeMixin添加?
這裏是我發現的解釋...
safeMixin() is a function defined in dojo/declare. It has the same functionality as dojo/_base/lang::mixin(), but additionally it annotates all copied methods compatibly with dojo/declare. This decoration can affect how this.inherited() works in mixed-in methods.
我可以按照example,但它並沒有真正解釋加入正是何地,任何人都可以給註釋附加了任何進一步的例子到每個複製的方法?
所以要說清楚,我並不是要求繼承的解釋,我只是特別詢問使用declare.safeMixin()
而不是lang.mixin
添加的註釋。