nl_tokens: -------------------------------- HELPER METHODS -------------------------------- Adds the given meta list to the current document of the given jQuery instance . @private
pl_tokens: function _addMetasToDoc ( $ , metaList ) { if ( ! _ . isArray ( metaList ) || metaList . length === 0 ) return ; const $head = $ ( 'head' ) ; let lastMeta ; const existingMetas = $head . find ( 'meta' ) ; if ( existingMetas . length > 0 ) { lastMeta = existingMetas . <mask> ( existingMetas . length - 1 ) ; } else { lastMeta = HtmlParser . DOM . N_TAB + HtmlParser . DOM . getMetaElem ( metaList [ 0 ] ) ; lastMeta = $head . prepend ( lastMeta ) . find ( 'meta' ) ; metaList . shift ( ) ; // remove first } metaList . forEach ( metaInfo => { const meta = HtmlParser . DOM . N_TAB + HtmlParser . DOM . getMetaElem ( metaInfo ) ; lastMeta = $ ( meta ) . insertAfter ( lastMeta ) ; } ) ; }