Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

支持通过defineProperty的getter/setter定义 #27

Open
otakustay opened this issue May 31, 2015 · 2 comments
Open

支持通过defineProperty的getter/setter定义 #27

otakustay opened this issue May 31, 2015 · 2 comments

Comments

@otakustay
Copy link
Member

在我们放弃IE8后,我的视野好像确实大了些- -

希望提供一个definePropertyAccessor的功能,使用defineProeprty来定义一个getter/setter的属性,功能和现在的defineAccessor是一样的就行

这里不使用普通的属性,而是要一个没有逻辑的getter/setter,目的是让uioc能更好地发现需要注入的属性而实现自动注入功能

@Exodia
Copy link
Contributor

Exodia commented May 31, 2015

没有逻辑是什么意思? 简单的:set: function (v) { innerValue = v;}, get:function () { return innerValue;} ?

@otakustay
Copy link
Member Author

没有逻辑是什么意思?

指没有额外的自定义逻辑,让getset等同现在的defineAccessor就行

本来想用Symbol定义私有变量让getset用的,考虑到步子太大,还是继续沿用现在的那个__eoo_members__

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants