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

Bug found in wsc.js when inside chrome extension #56

Closed
jarlep opened this issue Mar 13, 2019 · 3 comments
Closed

Bug found in wsc.js when inside chrome extension #56

jarlep opened this issue Mar 13, 2019 · 3 comments
Assignees
Milestone

Comments

@jarlep
Copy link

jarlep commented Mar 13, 2019

We use webspellchecker in a web application running in a chrome extension, and we noticed we got a ton of errors from Chrome OS reported in trackjs from wsc.js in CKeditor. We have made a Chrome OS app that runs our exam system and then also CKEditor.
Checked latest version 4.11.3 and get the same error there.

I made a workaround in the minified code by doing

if("string"===typeof a.data &&(a=window.JSON.parse(a.data))&&a.id)
instead of
if((a=window.JSON.parse(a.data))&&a.id)

The reason is that a.data is an object in some events. Look at the screendump (I formatted the source):
image

@jarlep
Copy link
Author

jarlep commented Mar 13, 2019

var handlerIncomingData = function(event) {
		event = event || window.event;
		var response;
		try {
			response = window.JSON.parse(event.data);
		} catch (e) {}

		if(response && response.id) {
			handlerId[response.id](response);
		}
	};

should fix it

@jshaptala
Copy link
Member

jshaptala commented Mar 13, 2019

Hi @jarlep,

We will review the information about your issue and get back to you with our comments shortly.

Kind regards,

@jshaptala
Copy link
Member

@jarlep, we will add this small enhancement as a part of our next release 5.4.0. ETA: end of March, beginning of April 2019.

@jshaptala jshaptala added this to the 5.4.0 milestone Mar 13, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants