-
-
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
Implement microdata #18528
Comments
cc @jdm |
Posting here since IRC seems to be down. We're facing issues with html5ever, it gives error for xml5ever. However, we didn't make any changes to xml5ever. Can you guide what we can do move forward? Pastebin: https://pastebin.com/pXfK5Fnx |
What happens if you run |
Thanks @jdm , servo build now uses xml5ever version 0.6.2 which no longer causes the issue we were facing. |
[Resolved] Right now we have created test cases, but not able to run using test-wpt. While creating the tests using create-wpt, we're getting the following error: Any input on why we are getting this issue? |
All the issues have been resolved and the pull request is ready to be merged with only one problem, we are having difficulties in rebasing the code :( |
We are trying to compile servoshell with a local copy of servo(upto date with servo repository) and are getting this error unresolved import I am thinking that current code in servoshell is not compatible with the changes that exist in latest servo code or is this some know dependency issue that can be fixed |
That should be fixable by changing the import to |
Ok one more dependency issue --> impl WindowMethods for ServoCallbacks |
You should be able to return a Size2D value based off of the values in |
Thanks @jdm, that resolved the issue. Now, for the next part, we are passing a hardcoded string from servo to servoshell which works, so we have identified the files where changes are required to establish the communication between servo and servoshell. Now, as per our previous discussion, we are trying to serialize the tree dom as json in order to send it, using serde_json. However, we are facing issues while trying to use serde_json as extern crate. We have pushed our changes in this branch: https://github.com/CJ8664/servo/tree/serde_try Looks like there's some namespace clashing, as the error is on some previously working code. |
That's super weird! I've filed an issue against the Rust compiler for that; you can work around the problem by replacing Default::default() with 0. |
Thanks, @jdm, the code is now creating a JSON of nested Hashmap as of now by replacing Default::default() with 0. |
Style wise I'd always prefer |
We are trying to create the JSON for a Node of the DomObject by serializing it. For the same, we are trying to use serde_json. We also found that there is a serializer implemented for Node in script/dom/html.rs but we are not able to use in out our module. Can you please help us. |
Just to add to @CJ8664 's point, if we implement the trait for Are we expected to implement the serialization, because we found this issue (#16696) that seems like the logic for serialization would already be there. Can you help us figure out how to use the serialization logic? |
The specification describes exactly what serialized output is expected; you need to implement that - an object containing an "items" property which is an array, where each is an object that matches this algorithm. |
serde_json just provides building blocks for creating the object/array values, and serializing those values into a valid JSON string once it is complete. |
We're on it @jdm . Meanwhile, for vCard we have a small doubt. What will be the expected vCard output for the following? As per our understanding of the vCard algorithm on WHATWG HTML spec, it should be: But as per some other online vCard examples, this seems to be the constructed vCard: |
I would stick with the algorithm in the specification for now. |
Actually, the specification appears to agree with the online examples: for the h1 element with the |
WHATWG HTML spec for microdata: https://html.spec.whatwg.org/multipage/microdata.html
The text was updated successfully, but these errors were encountered: