我为Outlook Office365创建了外接程序,并使用他们的office.js从电子邮件中获取信息。
dart.js示例:
js.context['Office']['context']['mailbox']['userProfile']['emailAddress']或
js.context['Office']['context']['mailbox']['item']['to'].callMethod('getAsync', [callback(result)])如何使用新的dart-js-interop来满足这些需求?
发布于 2016-03-29 01:51:53
@JS('Office.context.mailbox.userProfile.emailAddress')
external get emailAddress;@JS('Office.context.mailbox.item.to.getAsync')
external getAsync(Function callback);调用getAsync时,需要用allowInterop或allowInteropCaptureThis包装传递给回调的函数
getAsync(allowInterop((x) => print(x)));请谨慎尝试。几个月前,我尝试过新的dart-js-interop,但我自己还没有在真正的代码中使用它。
https://stackoverflow.com/questions/36267592
复制相似问题