Skip to content

Conversation

@konkissner
Copy link
Contributor

Added '*' as second parameter to function calls postMessage

This fixes the error

Uncaught TypeError: Failed to execute 'postMessage' on 'Window': 2 arguments required, but only 1 present.

fixed "Uncaught TypeError: Failed to execute 'postMessage' on 'Window': 2 arguments required, but only 1 present." error.
fixed "Uncaught TypeError: Failed to execute 'postMessage' on 'Window': 2 arguments required, but only 1 present." error
@rodneyrehm
Copy link
Member

interesting, when / where did this become a problem?

@rodneyrehm rodneyrehm added the bug label Oct 14, 2016
@konkissner
Copy link
Contributor Author

This error was thrown whenever i used Sass.compile() in my project.

Like the error says, Window.postMessage requires two params. So I added the '*' as a second parameter wherever postMessage is called.

When I have some time, I can try to reproduce the bug in a jsfiddle

@rodneyrehm rodneyrehm merged commit 72df0bd into medialize:master Oct 27, 2016
@rodneyrehm
Copy link
Member

thank you!

@rodneyrehm
Copy link
Member

I'm not sure why this slipped through. Neither of us realized that Worker.postMessage() does not have an origin, that's only relevant to Window.postMessage(). Your PR actually breaks the Sass.js worker API. I'll have to revert this commit…

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants