As Masayuki pointed out per email, ``` document.execCommand('stylewithcss', false, true); document.execCommand('bold', false, null); ``` works.
Bug 1566795 Comment 16 Edit History
Note: The actual edited comment in the bug view page will always show the original commenter’s name and original timestamp.
As Masayuki pointed out per email, ``` document.execCommand('stylewithcss', false, true); document.execCommand('bold', false, null); ``` works. For the case when `stylewithcss` is set to `false` (which is the default), there's even a test which [expects to fail](https://searchfox.org/mozilla-central/rev/9ae20497229225cb3fa729a787791f424ff8087b/testing/web-platform/meta/editing/run/bold.html.ini#173-177).