-
Notifications
You must be signed in to change notification settings - Fork 35
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
SharedReference
serialization + deserialization
#180
Conversation
WDYT about the deserialization approach? |
b531d10
to
1c07480
Compare
CrossSandboxReference
serialization + deserialization
A couple of quick high-level comments; I still need to do a full review:
|
CrossSandboxReference
serialization + deserializationSharedReference
serialization + deserialization
I'm not sure if I understand this. Do you mean we should not reference the wrapped object?
I changed name to
WDYT? |
I mean if we use the model that any DOM object is really a A I'm not sure if that clarifies things or not? |
UPD 2022-12-20: outdated |
index.bs
Outdated
production, set |remote value| to the result of | ||
[=deserialize remote object reference=] given |remote reference|. | ||
|
||
1. If |remote value| is undefined and |remote reference| matches the |
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.
So this means if you send {objectId: "foo", sharedId: "bar"}
we won't reject the request, but we will prefer the objectId
and use sharedId
if the objectId
doesn't exist. I think we should make that an InvalidArgument
error.
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.
I wanted to avoid having InvalidArgument
in case of sanding back the object received from the backend, as we do with remoteReference
.
Hi @sadym-chromium. As it looks like this pull request hasn't been updated for quite a while and it might be great to actually have the proposed changes landed. Would you be still interested to continue? Thanks! |
Hi Henrik! Thanks for reminding, I'm going to continue working on it soon. |
@sadym-chromium, just a friendly reminder... Did you had a chance to continue on this PR? Another three months passed by and it would be great to have a shared id for elements. Thanks. |
The Browser Testing and Tools Working Group just discussed The full IRC log of that discussion<jgraham> Topic: Update on `SharedReference`<jgraham> github: https://github.com//pull/180 <jgraham> sadym: I expect to start working on this again in the next week or two. |
Ensure that BiDi only gives access to the same objects we'd be able to access using javascript.
<!-- This is specifically ordered in the order in which matches need to be --> | ||
<!-- evaluated, since the definitions are overlapping --> |
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 is not visible to viewers of the spec. Shall we make that a note instead?
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.
Well the intent was for spec authors to know not to change things. The problem we have here is that if you actually use CDDL directly you can't tell the difference between these constructs. But also CDDL doesn't tell you which production actually matched. So I think the conclusion would be that we should have a general note that if you're trying to derive types from the CDDL productions then the order matters. But also we should document the other conventions we're using.
<!-- Ensure that if we have a handle, it at least has the correct type --> | ||
?handle: Handle, |
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.
I may have missed a discussion (due the lengthy thread) but is that actually necessary to still check for the correct type if we are going to ignore the handle
anyway?
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.
It means that you can't write:
{
sharedId: "foo",
handle: ["some other type"]
}
which otherwise would match due to Extensible
. Given that the proposed use case is "we want to allow people to directly send JSON data from responses" it makes sense to me to ensure that we can't extend this in a way that doesn't make sense (but honestly I still think we should care less about this use case and prefer nomnative typing over structural typing. However I don't seem to have much support for that position).
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.
I think that this looks fine to me now. For the remaining open questions I would like to see what others think as well. @foolip might you be able to have a look at this PR while @sadym-chromium is away?
SHA: 620a116 Reason: push, by jgraham Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
SharedReference
;handle
first andsharedId
afterwards.Node
serialization.(edit @whimboo) No longer blocked by w3c/webdriver#1707
Preview | Diff