Commit eccb423c authored by Kenton Lam's avatar Kenton Lam Committed by Chromium LUCI CQ

Change <emoji-picker> to have emoji-data-url attribute.

Defaults to the current emoji ordering from emoji-metadata,
but this will allow smaller emoji data files to be used for tests.

Change-Id: Ibc3ffdeb0c05f7ad9c3880c899c92ef6dc6cbcbd
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2639713Reviewed-by: default avatarJohn Palmer <jopalmer@chromium.org>
Reviewed-by: default avatarKeith Lee <keithlee@chromium.org>
Commit-Queue: Kenton Lam <kentonlam@google.com>
Cr-Commit-Position: refs/heads/master@{#845403}
parent e2602980
...@@ -38,6 +38,7 @@ class EmojiPicker extends PolymerElement { ...@@ -38,6 +38,7 @@ class EmojiPicker extends PolymerElement {
static get properties() { static get properties() {
return { return {
emojiDataUrl: {type: String, value: EMOJI_ORDERING_JSON},
groups: {type: Array}, groups: {type: Array},
/** @type {?EmojiData} */ /** @type {?EmojiData} */
emojiData: { emojiData: {
...@@ -78,7 +79,7 @@ class EmojiPicker extends PolymerElement { ...@@ -78,7 +79,7 @@ class EmojiPicker extends PolymerElement {
const xhr = new XMLHttpRequest(); const xhr = new XMLHttpRequest();
xhr.onloadend = () => this.onEmojiDataLoaded(xhr.responseText); xhr.onloadend = () => this.onEmojiDataLoaded(xhr.responseText);
xhr.open('GET', EMOJI_ORDERING_JSON); xhr.open('GET', this.emojiDataUrl);
xhr.send(); xhr.send();
this.addEventListener( this.addEventListener(
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment