Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docs about using Handler #9

Open
vanslly opened this issue Nov 27, 2017 · 0 comments
Open

Docs about using Handler #9

vanslly opened this issue Nov 27, 2017 · 0 comments

Comments

@vanslly
Copy link

vanslly commented Nov 27, 2017

// The pattern shown here IS NOT RECOMMENDED.

In Chromium 30 (which is the version of the Android 4.2.2 WebView) Function.name is not spec complaint, and vuex-typescript relies on it being so. More specifically (function () { var x = function () { }; return x.name; })() should return "x", but in Chromium 30 returns "" since it is an anonymous function. For this situation I found using classes with the Hander decorator is absolutely necessary.

Since Function.name is an es2015 feature https://www.ecma-international.org/ecma-262/6.0/#sec-setfunctionname, and some vuex-typescript users will be targeting mobiles, it would be helpful documenting this use case; perhaps in the readme.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant