Skip to content

Commit

Permalink
Core: Update API doc to document Prism.highlightAllUnder()
Browse files Browse the repository at this point in the history
  • Loading branch information
Golmote committed Dec 5, 2017
1 parent 69f2e2c commit 6e50d44
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions extending.html
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,24 @@ <h2>Parameters</h2>
</dl>
</section>

<section id="highlight-all-under">
<h1><code>Prism.highlightAllUnder(element, async, callback)</code></h1>
<p>Fetches all the descendants of <code>element</code> that have a <code>.language-xxxx</code> class
and then calls <code>Prism.highlightElement()</code> on each one of them.</p>

<h2>Parameters</h2>
<dl>
<dt>element</dt>
<dd>The root element, whose descendants that have a <code>.language-xxxx</code> class will be highlighted.</dd>

<dt>async</dt>
<dd>Whether to use Web Workers to improve performance and avoid blocking the UI when highlighting very large chunks of code. False by default (<a href="faq.html#why-is-asynchronous-highlighting-disabled-by-default">why?</a>).</dd>

<dt>callback</dt>
<dd>An optional callback to be invoked after the highlighting is done. Mostly useful when <code>async</code> is true, since in that case, the highlighting is done asynchronously.</dd>
</dl>
</section>

<section id="highlight-element">
<h1><code>Prism.highlightElement(element, async, callback)</code></h1>
<p>Highlights the code inside a single element.</p>
Expand Down

0 comments on commit 6e50d44

Please sign in to comment.