Skip to content
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 NavigatorLanguage #9992

Closed
jdm opened this issue Mar 14, 2016 · 4 comments
Closed

Implement NavigatorLanguage #9992

jdm opened this issue Mar 14, 2016 · 4 comments

Comments

@jdm
Copy link
Member

@jdm jdm commented Mar 14, 2016

Spec: https://html.spec.whatwg.org/multipage/webappapis.html#navigatorlanguage (and add Navigator implements NavigatorLanguage;)
Code: components/script/dom/webidls/Navigator.webidl, components/script/dom/navigator.rs
Tests:

  • ./mach test-wpt tests/wpt/html/dom/interfaces.html
  • ./mach test-wpt tests/wpt/web-platform-tests/html/webappapis/system-state-and-capabilities/the-navigator-object/navigatorlanguage.html
  • Follow the documentation to adjust for tests that now pass.

The lack of this feature is makes clicking links on Twitter break (see #9870). Let's just hardcode this as en-US right now.

@creativcoder
Copy link
Contributor

@creativcoder creativcoder commented Mar 14, 2016

I'll take that, will help me get familiar with dom parts.

@jdm
Copy link
Member Author

@jdm jdm commented Mar 14, 2016

Great!

@jdm jdm added the C-assigned label Mar 14, 2016
@creativcoder
Copy link
Contributor

@creativcoder creativcoder commented Mar 15, 2016

I am getting an error from the CodegenRust.pyfor the languages attribute, which returns a StringArray.
Maybe CodegenRust.py does not have type declarations for DOMString[] types:
Here's some stack trace:
File "/home/creativcoder/Desktop/github/servo/components/script/dom/bindings/codegen/CodegenRust.py", line 1310, in getRetvalDeclarationForType returnType) TypeError: Don't know how to declare return value for StringArray

@Ms2ger
Copy link
Contributor

@Ms2ger Ms2ger commented Mar 15, 2016

Start with just language for now; we can do languages later when whatwg/html#863 is fixed and we support FrozenArray.

bors-servo added a commit that referenced this issue Mar 15, 2016
implements NavigatorLanguage

For #9992

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/10009)
<!-- Reviewable:end -->
bors-servo added a commit that referenced this issue Mar 16, 2016
implements NavigatorLanguage

Fixes #9992

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/10009)
<!-- Reviewable:end -->
bors-servo added a commit that referenced this issue Mar 18, 2016
implements NavigatorLanguage

Fixes #9992

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/10009)
<!-- Reviewable:end -->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants
You can’t perform that action at this time.