Skip to content

Create the explainer about Dictionary API - #37

Merged
schenney-chromium merged 22 commits into
Igalia:mainfrom
jihyerish:patch-1
May 29, 2025
Merged

schenney-chromium merged 22 commits into
Igalia:mainfrom
jihyerish:patch-1

Conversation

@jihyerish

Copy link
Copy Markdown
Contributor

Create the explainer about Dictionary API.

This proposed API is for handling the browser's custom dictionary.
With this API, users can add, check and remove words to the custom dictionary

Comment thread dictionary-api/README.md Resolved
Comment thread dictionary-api/README.md Resolved
Comment thread dictionary-api/README.md Resolved
Comment thread dictionary-api/README.md Resolved
Comment thread dictionary-api/README.md Resolved
Comment thread dictionary-api/README.md Resolved
Comment thread dictionary-api/README.md Resolved
Comment thread dictionary-api/README.md Resolved
Comment thread dictionary-api/README.md Resolved
Comment thread dictionary-api/README.md Resolved
Comment thread dictionary-api/README.md Resolved
@jakearchibald

Copy link
Copy Markdown

We should figure out if document is the right place for this. Other storage systems don't hang off document.

The methods should probably be namespaced in something like customDictionary or just dictionary. Methods should be add/delete/has to match Set, or add/remove/contains to match DOMTokenList. It comes down to whether more modern web APIs have aligned with Set or DOMTokenList - some research to do here.

@jihyerish

jihyerish commented May 19, 2025 •

Copy link
Copy Markdown
Contributor Author

Hello @jakearchibald , thank you for your comments.

We should figure out if document is the right place for this. Other storage systems don't hang off document.

In terms of storage systems, saving the dictionary data will be implemented in components/spellcheck/renderer/spellcheck_language.h

The methods should probably be namespaced in something like customDictionary or just dictionary. Methods should be add/delete/has to match Set, or add/remove/contains to match DOMTokenList. It comes down to whether more modern web APIs have aligned with Set or DOMTokenList - some research to do here.

I agree with this idea of defining dictionary API with encapsulation. I will update the explainer with this.

Comment thread dictionary-api/README.md Resolved

@schenney-chromium schenney-chromium left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks ready for a first draft. Thanks.

@schenney-chromium
schenney-chromium merged commit 926dcff into Igalia:main May 29, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants