Javascript 中的 Windows 8 Metro SyndicateClient.retrieveFeedAsync 实际上不是异步的?
我正在尝试 Microsoft 网站上的 JS Metro 示例代码。但是,我发现retrieveFeedAsync 不起作用。我的代码是从他们的网站复制/粘贴的,如下所示:
var syn = new Windows.Web.Syndication.SyndicationClient();
var url = new Windows.Foundation.Uri("Some RSS");
console.log("1********************onactive");
syn.retrieveFeedAsync(url).then(processPosts, downloadError);
console.log("2********************onactive");
从 JS 控制台,我注意到第二条日志行从未显示,而它应该显示,因为retrieveFeedAsync 应该给出一个“promise”对象并立即返回。
有人遇到过类似的问题吗?
I'm trying out the JS Metro Sample Code form Microsoft site. However, I discovered that somehow the retrieveFeedAsync didn't work. My code was copied/pasted from their site as follows:
var syn = new Windows.Web.Syndication.SyndicationClient();
var url = new Windows.Foundation.Uri("Some RSS");
console.log("1********************onactive");
syn.retrieveFeedAsync(url).then(processPosts, downloadError);
console.log("2********************onactive");
From the JS console, I noticed that the 2nd log line never got displayed, while it's supposed to because retrieveFeedAsync should give a "promise" object and return immediately.
Anyone had similar issues?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
你见过第二个console.log吗?
使用下面的代码,我看到请求是异步的,日志中事件的顺序是:之前、之后、成功。这是我期望的异步请求的顺序。
Do you ever see the 2nd console.log?
Using the code below I'm seeing the request is async and the order of the events in the log is: before, after, success. Which is the order I would expect for an async request.