- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
I have some JS code which uses function pointers and yield. This code works fine in Firefox and Chrome, but XDK gives me the following messages:
'function*' is only available in ES6 (use esnext option). (W119) function* coro()
'yield' is available in ES6 (use esnext option) or Mozilla JS extensions (use moz). (W104) x = yield undefined;
The messages suggest I need to use the "esnext" option, but I am not sure how to do this.
Thanks for your help.
- Tags:
- HTML5
- Intel® XDK
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Benoit,
The editor you are using in Intel XDK is Brackets and the errors you are seeing is none other than JSHint errors. The esnext option tells JSHint that your code uses ECMAScript 6 specific syntax. Note that these features are not finalized yet and not all browsers implement them. When relying upon ECMAScript 6 features you should set this option so JSHint doesn't raise unnecessary warnings.
/*jshint esnext: true */
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
p.s. The HTML, CSS and JavaScript features you get in a Cordova webview depend on the target device, not on the XDK. See this article for a little background: http://blogs.intel.com/evangelists/2014/09/02/html5-web-app-webview-app/
One of the reasons we recommend using Crosswalk on Android is because that webview is much more up-to-date than what you will find in the typical native Android webview. On other platforms you will be using the native webview (iOS, Windows, etc.) and you need to consider that what is provided in those webviews will vary by the version of the device as well as the platform. So do not assume that what works in the Emulate tab will work on a device. You must try your app on real devices to be certain you have the features you need.
Start here in the docs: https://software.intel.com/en-us/xdk/docs/intel-xdk-introduction

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page