Closed xyz003 closed 1 year ago
Thanks for letting me know @It-SuperDev ,
Could this work?
self.Accessibility = _main["default"];
Changed window to self, please let me know if that's fixing your issue.
I checked with self
.
But I got another issue like ReferenceError: regeneratorRuntime is not defined
in new version.
Also I think this module works well on other fraimeworks but only donesn't work on Frontity.
I don't know well about frontity but we can't get window object at first time after runing.
So I suggest you fix this problem with exception handling as I already pointed out on above.
There is no error in the module.
Thank you.
I don't understand how you are not getting self
or window
. Is this not running on the browser? Anyway, please check 4.5.2
and let me know.
Thank you for your trying.
I checked the new version. But I think you changed some from ^4.4.1 version.
Now I get ReferenceError: regeneratorRuntime is not defined
error.
As I said the module works well and my issue comes from Frontity framework.
So, I would like you to change the node_modules/accessibility/dist/accessibility.js
file of version ^4.4.1 to check only the window
object.
Best regards.
Yes, I checked.
But I get regeneratorRuntime is not defined
from accessibility/dist/main.js
Perhaps it has something to do with your project? Maybe it doesn't accept ES2015 or something like that?
Also, this post might be relevant. I do use async
await
syntax.
Yes, it is frontity framework issue. I hope you check your module on frontity.
Is there a quick way to do it? Some project that I can clone, install the module and run it? I've never developed on WordPress or React.
So it is working or not?
I have no idea, was hoping you could reproduce and send me a link.
if (typeof window !== 'undefined') {
window.Accessibility = _main["default"];
}
This is the idea. Please make version same as 4.4.1 and add above code. Then it will work perfectly.
difficult to solve
Hello, Ran Buchnik. I used accessibility module and feeling it is very good. But I found an issue. When I use it in React it worked perfect. Nowadays, I built a project using Frontity. When run project, Accessibility is caused an issue that can't find window object. So I replaced the last code of a JS file to solve this.
node_modules/accessibility/dist/accessibility.js.
I hope you fix this issue.
Regards.