-
Notifications
You must be signed in to change notification settings - Fork 312
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
Add API for postMessage with PostMessageOptions #1344
Conversation
The corresponding HTML changes have been merged. |
docs/index.bs
Outdated
@@ -309,6 +309,7 @@ spec: webappsec-referrer-policy; urlPrefix: https://w3c.github.io/webappsec-refe | |||
readonly attribute USVString scriptURL; | |||
readonly attribute ServiceWorkerState state; | |||
void postMessage(any message, optional sequence<object> transfer = []); | |||
void postMessage(any message, PostMessageOptions options); |
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 should be marked optional, the previous line should have its second argument marked as non-optional (and non-defaulting).
@annevk changes made |
Hi @dtapuska sorry that this never got merged. Can you rebase and reupload? You don't need the docs/index.html change, that gets generated automatically after you commit. I could attempt to do this manually but I'm afraid the commit would lose attribution to you. |
@mattto it shouldn't lose attribution. If it does, you can override the author explicitly using |
This is similar to the HTML changes in whatwg/html#3800
Rebased and forced pushed |
Thanks all, I ended up doing the manual merge to drop the change to index.html. It landed in 3b31974 and I expect index.html to be generated automatically soon. |
https://bugs.webkit.org/show_bug.cgi?id=191028 Reviewed by Alex Christensen. LayoutTests/imported/w3c: Rebaseline WPT tests now that we have more passes. * web-platform-tests/html/browsers/origin/cross-origin-objects/cross-origin-objects-expected.txt: * web-platform-tests/html/browsers/windows/document-access/document_access_parent_access.tentative-expected.txt: * web-platform-tests/service-workers/service-worker/clients-matchall-frozen.https-expected.txt: * web-platform-tests/service-workers/service-worker/postmessage.https-expected.txt: * web-platform-tests/webmessaging/message-channels/dictionary-transferrable-expected.txt: * web-platform-tests/webmessaging/message-channels/user-activation.tentative-expected.txt: * web-platform-tests/webmessaging/postMessage_MessagePorts_xsite.sub.window-expected.txt: * web-platform-tests/webmessaging/with-options/host-specific-origin-expected.txt: * web-platform-tests/webmessaging/with-options/message-channel-transferable-expected.txt: * web-platform-tests/webmessaging/with-options/no-target-origin-expected.txt: * web-platform-tests/webmessaging/with-options/null-transfer-expected.txt: * web-platform-tests/webmessaging/with-options/one-arg-expected.txt: * web-platform-tests/webmessaging/with-options/slash-origin-expected.txt: * web-platform-tests/webmessaging/with-options/undefined-transferable-expected.txt: * web-platform-tests/webmessaging/with-options/unknown-parameter-expected.txt: * web-platform-tests/webmessaging/without-ports/008-expected.txt: * web-platform-tests/webmessaging/worker_postMessage_user_activation.tentative-expected.txt: * web-platform-tests/workers/interfaces/DedicatedWorkerGlobalScope/postMessage/second-argument-dictionary-expected.txt: * web-platform-tests/workers/interfaces/DedicatedWorkerGlobalScope/postMessage/second-argument-null-expected.txt: Source/WebCore: Implement PostMessageOptions dictionary parameter for postMessage: - whatwg/html#3799 - w3c/ServiceWorker#1344 Blink and Gecko already support this. No new tests, rebaselined existing tests. * CMakeLists.txt: * DerivedSources-input.xcfilelist: * DerivedSources-output.xcfilelist: * DerivedSources.make: * Headers.cmake: * Sources.txt: * WebCore.xcodeproj/project.pbxproj: * dom/MessagePort.cpp: (WebCore::MessagePort::postMessage): * dom/MessagePort.h: * dom/MessagePort.idl: * page/DOMWindow.cpp: (WebCore::DOMWindow::postMessage): * page/DOMWindow.h: (WebCore::WindowPostMessageOptions::WindowPostMessageOptions): * page/DOMWindow.idl: * page/PostMessageOptions.h: Copied from Source/WebCore/workers/service/ServiceWorkerClient.idl. (WebCore::PostMessageOptions::PostMessageOptions): * page/PostMessageOptions.idl: Copied from Source/WebCore/workers/service/ServiceWorkerClient.idl. * workers/DedicatedWorkerGlobalScope.cpp: (WebCore::DedicatedWorkerGlobalScope::postMessage): * workers/DedicatedWorkerGlobalScope.h: * workers/DedicatedWorkerGlobalScope.idl: * workers/Worker.cpp: (WebCore::Worker::postMessage): * workers/Worker.h: * workers/Worker.idl: * workers/service/ServiceWorker.cpp: (WebCore::ServiceWorker::postMessage): * workers/service/ServiceWorker.h: * workers/service/ServiceWorker.idl: * workers/service/ServiceWorkerClient.cpp: (WebCore::ServiceWorkerClient::postMessage): * workers/service/ServiceWorkerClient.h: * workers/service/ServiceWorkerClient.idl: LayoutTests: Update a few existing tests due to the behavior change. * TestExpectations: * fast/dom/Window/post-message-crash.html: * fast/events/message-port-multi-expected.txt: * fast/events/resources/message-port-multi.js: * fast/workers/resources/worker-context-thread-multi-port.js: * fast/workers/resources/worker-multi-port.js: * fast/workers/worker-multi-port-expected.txt: * http/tests/security/postMessage/target-origin-expected.txt: * platform/mac-wk1/imported/w3c/web-platform-tests/html/dom/idlharness.https-expected.txt: * platform/mac-wk2/imported/w3c/web-platform-tests/html/dom/idlharness.https-expected.txt: git-svn-id: http://svn.webkit.org/repository/webkit/trunk@253497 268f45cc-cd09-0410-ab3c-d52691b4dbfc
This is similar to the HTML changes in whatwg/html#3800
Preview | Diff