[wp-trac] [WordPress Trac] #31701: Emoji: Avoid enqueueing JS by default

WordPress Trac noreply at wordpress.org
Fri Mar 20 02:10:14 UTC 2015


#31701: Emoji: Avoid enqueueing JS by default
--------------------------+--------------------------------------
 Reporter:  obenland      |       Owner:
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  4.2
Component:  General       |     Version:  trunk
 Severity:  normal        |  Resolution:
 Keywords:  emoji         |     Focuses:  javascript, performance
--------------------------+--------------------------------------

Comment (by dd32):

 When I first heard of this, I was hopeful that we'd be able to simply use
 a lightweight emoji detection inline script, unfortunately I then realised
 that the emoji detection code is covering a bunch of edge cases, which
 adds some significant size..

 > 2. `require.js` .. (it will reduce the download size by a few KB for
 browsers that support emoji, increase it by ~15KB for browsers that
 don't).
 I assume we wouldn't use `require.js`, but rather `wp-emoji.js` + a small
 amount of code to load `twemoji`, which shouldn't be too complex.. We'd
 also want it to run before DOMReady, to hopefully get `twomoji` loaded up
 asap..

--
Ticket URL: <https://core.trac.wordpress.org/ticket/31701#comment:3>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list