How does Chrome decide what to highlight when you double-click Japanese text?

If you double-click English text in Chrome, the whitespace-delimited word you clicked on is highlighted. This is not surprising. However, the other day I was clicking while reading some text in Japanese and noticed that some words were highlighted at word boundaries, even though Japanese doesn’t have spaces. Here’s some example text:

どこで生れたかとんと見当がつかぬ。何でも薄暗いじめじめした所でニャーニャー泣いていた事だけは記憶している。

For example, if you click on 薄暗い, Chrome will correctly highlight it as a single word, even though it’s not a single character class (this is a mix of kanji and hiragana). Not all the highlights are correct, but they don’t seem random.

How does Chrome decide what to highlight here? I tried searching the Chrome source for “japanese word” but only found tests for an experimental module that doesn’t seem active in my version of Chrome.

2 Answers
2

Leave a Comment