You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Sep 25, 2023. It is now read-only.
如果能提供全套的es6支持就好了,现在已经不习惯callback了
在 2017-07-30 18:54:16,"Sean" <notifications@github.com> 写道:
Remote不支持。Handler支持。还在查。
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or mute the thread.
Activity
fantasyni commentedon Jan 20, 2017
es6 的支持需要研究一下,我这里先记一下
39Er commentedon Jul 26, 2017
遇到同样的问题,求解
seancheung commentedon Jul 30, 2017
Remote不支持。Handler支持。
对于Remote,使用如下方法实现:
Remote和Handler都通过
pomelo-loader
来加载, 但是Remote是通过pomelo-rpc
来调用的. 可能其中有进行ownProperty
的判断redelva commentedon Aug 9, 2017
seancheung commentedon Aug 9, 2017
@redelva
Remote
和Handler
的基类给你在
Handler
或Remote
的方法中返回Promise
, 就会被自动处理并调用next
传递异常错误或正确结果;若不返回
Promise
, 则需要手动调用next
回调. 不可以既调用next
回调又返回Promise
.Remote
用法示例Handler
用法类似注意,
rpc
方法是Proxy
, 不支持Promise
错误(next不会被执行, 导致
timeout
):正确(手动调用
next
):或者
Promise
化(返回Promise
):如果需要将session中的方法
Promise
化, 添加以下Filter
即可promisify.js
app.js
调用