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

Open
jarlep opened this Issue Mar 13, 2019 · 3 comments

Comments

Projects
None yet
3 participants
@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

This comment has been minimized.

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

@wsc-julia-shaptala

This comment has been minimized.

Copy link
Member

wsc-julia-shaptala 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,

@wsc-julia-shaptala

This comment has been minimized.

Copy link
Member

wsc-julia-shaptala commented Mar 13, 2019

@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.

@wsc-julia-shaptala wsc-julia-shaptala 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
You can’t perform that action at this time.