Skip to content

Commit

Permalink
fix(macros/EmbedLiveSample): un-deprecate the 6th parameter (allowed …
Browse files Browse the repository at this point in the history
…features) (#10106)
  • Loading branch information
teoli2003 authored Dec 1, 2023
1 parent 300e93e commit 012f5e4
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions kumascript/macros/EmbedLiveSample.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,17 @@
// $5 - (Deprecated) The class name of the frame; defaults to "sample-code-frame". If you
// pass this parameter and give it a value other than "sample-code-frame",
// then the "Open in CodePen"/"Open in JSFiddle" buttons will not be displayed.
// $6 - (Deprecated) Allowed features, separated by semicolons (optional)
// $6 - Allowed features (like geolocation, microphone), separated by semicolons (optional).
// Defaults to ''.
//
// See also : LiveSampleLink
// We have deprecated the use of the $4 to $6 parameters
// If one of this parameter is not empty, we raise a MacroDeprecationError flaw
// When there will be 0 use left on translated-content (May 2022: 203 occurrences for $4),
// we will be able to simplify this macro (and likely the whole of MDN).
if ($4 !== "" || $5 !== "" || $6 !== "") {
mdn.deprecatedParams("The fourth to sixth parameters of 'EmbedLiveSample' are deprecated");
if ($4 !== "" || $5 !== "") {
mdn.deprecatedParams("The fourth and fifth parameters of 'EmbedLiveSample' are deprecated");
}
var sampleIdOrOffset = $0 || $token.location.start.offset;
Expand Down

0 comments on commit 012f5e4

Please sign in to comment.