-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Added test for postMessage structured clones #1250
Added test for postMessage structured clones #1250
Conversation
*/ | ||
define(['Modernizr', 'test/postmessage'], function( Modernizr ) { | ||
Modernizr.addTest('postmessagestructuredclones', function () { | ||
if (Modernizr.postmessage === false) return false; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was be if (!Modernizr.postmessage) return false;
since we know its a bool
thanks a lot for the PR, @gregersrygg Can't wait to close out one of our oldest issues :D |
@patrickkettner Not sure if this is how you meant, but I moved the detection into the postmessage test and added the result as a property. |
Another thing; How would user find out about this property? Can I document sub-properties with the meta-tags? Any automation into play, or manually edit this file? |
That file will not exist (in current sense) for 3.0, so no worries about updating it. You would want to edit the DOC portion to include any relevant information about the test, and the When you are doing so, could you remove the empty line before and after the doc block? Finally, could you squish everything down to a single commit when you are done, that would be great. Once again, fantastic work! |
Thanks for the feedback :) Updated and squashed now. Is this allowed in the meta-data? |
@gregersrygg, we don't include sub props in the property list currently - do you have an opinion on adding this @stucox ? |
Anything I can do to get this merged @patrickkettner @stucox ? :) |
@stucox had had a lack of availability lately, but pinging him one more time to see if he is against it. If not, we may be able to make that work |
any ETA on when this can be merged? |
Quite a few years have passed @gregersrygg sorry about that. still, would you be willing to update the PR to rebase it against the latest sources? |
759f495
to
81aa035
Compare
@rejas No worries. Rebased and fixed up the metadata. |
feature-detects/postmessage.js
Outdated
define(['Modernizr'], function(Modernizr) { | ||
Modernizr.addTest('postmessage', 'postMessage' in window); | ||
define(['Modernizr'], function( Modernizr ) { | ||
/* jshint -W053 */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
jshint isnt used anymore, can be removed
feature-detects/postmessage.js
Outdated
@@ -5,14 +5,25 @@ | |||
"caniuse": "x-doc-messaging", | |||
"notes": [{ | |||
"name": "W3C Spec", | |||
"href": "https://www.w3.org/TR/html5/comms.html#posting-messages" | |||
"href": "http://www.w3.org/TR/webmessaging/#crossDocumentMessages" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please use https
only minor nitpicks from my side. what do you say @patrickkettner ? |
lgtm |
81aa035
to
6b1ff98
Compare
Fixed review issues |
Thx a lot! |
Implemented the test discussed in Issue #388.
The name
postmessagestructuredclones
is terribly long. Other name suggestions?Noticed the can-i-use test forces partial support to boolean true. So to test this with can-i-use I have to modify the
testify
function to handle partial support => false for only this test. But then I noticed the caniuse have some errors in their browser-support, so probably should contact Alexis to fix that first anyways...