[apologies for top-posting] All our cataloguers' work stations use Opera (v.44) which (from dev.opera):

"Opera now [version 29] supports ES6 classes in strict mode, providing the following features: prototype-based inheritance, constructors, super calls, instance methods, and static methods."

Can you confirm that "strict" mode (for whatever values that might have) is what you have in mind?

Thanks
--
Paul
Tired old sys-admin

On 2017-08-03 07:23 PM, Jesse wrote:
As part of my work with Preact (and previous work with React), I've been unsure what to do about these libraries' enthusiasm for ES6.

If you're not familiar, ES6 (or ES2015) is a recent, major update to the JavaScript standard, and brings in a number of improvements to the language. Many of these make small parts of JS development a bit more pleasant, but the most relevant addition is native class support.

These built-in classes have been embraced by a lot of modern JS libraries, including Preact. The commonly accepted way to write code in this libraries depends on support for classes, either from the browser itself or a transpiler like Babel. To use Preact, we have two options:

* Use ES6 classes. This will work in Firefox 45+ (which includes two ESR releases), Chrome 42+, Edge and Safari 9 [1][2]. I believe this is a very reasonable set of browsers, for the staff client. * Use a shim for ES3 support (see [3] for an example of how this might work). This can be done, but locks us to an older and less-used way of developing on Preact/React.

I strongly prefer the first option, but would like your feedback.

[1] http://kangax.github.io/compat-table/es6/#test-class (Check "show obsolete platforms", and get ready for your browser to slow down.) [2] http://caniuse.com/#feat=es6-class (This is pessimistic; FF has had support since version 45.)
[3] https://github.com/developit/preact-in-es3/blob/master/index.js
_______________________________________________
Koha-devel mailing list
Koha-devel@lists.koha-community.org
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

Reply via email to