Skip to content

Commit 776c9a2

Browse files
committed
Remove backward-compatibiliyt handling of options.
1 parent 94e7d27 commit 776c9a2

2 files changed

Lines changed: 0 additions & 49 deletions

File tree

ts/a11y/explorer.ts

Lines changed: 0 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -284,7 +284,6 @@ export function ExplorerMathDocumentMixin<B extends MathDocumentConstructor<HTML
284284
* @constructor
285285
*/
286286
constructor(...args: any[]) {
287-
processSreOptions(args[2]);
288287
super(...args);
289288
const ProcessBits = (this.constructor as typeof BaseDocument).ProcessBits;
290289
if (!ProcessBits.has('explorer')) {
@@ -329,32 +328,6 @@ export function ExplorerMathDocumentMixin<B extends MathDocumentConstructor<HTML
329328

330329
}
331330

332-
//
333-
// TODO(v3.2): This is for backward compatibility of old option parameters.
334-
//
335-
/**
336-
* Processes old a11y options for backward compatibility.
337-
* @param {OptionList} options The options to process.
338-
*/
339-
function processSreOptions(options: OptionList) {
340-
if (!options || !options.a11y) {
341-
return;
342-
}
343-
if (!options.sre) {
344-
options.sre = {};
345-
}
346-
if (options.a11y.locale) {
347-
options.sre.locale = options.a11y.locale;
348-
delete options.a11y.locale;
349-
}
350-
if (options.a11y.speechRules) {
351-
let [domain, style] = (options.a11y.speechRules as string).split('-');
352-
options.sre.domain = domain;
353-
options.sre.style = style;
354-
delete options.a11y.speechRules;
355-
}
356-
}
357-
358331

359332
/*==========================================================================*/
360333

ts/a11y/semantic-enrich.ts

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -276,7 +276,6 @@ export function EnrichedMathDocumentMixin<N, T, D, B extends MathDocumentConstru
276276
* @constructor
277277
*/
278278
constructor(...args: any[]) {
279-
processSreOptions(args[2]);
280279
super(...args);
281280
MmlJax.setMmlFactory(this.mmlFactory);
282281
const ProcessBits = (this.constructor as typeof AbstractMathDocument).ProcessBits;
@@ -362,24 +361,3 @@ export function EnrichHandler<N, T, D>(handler: Handler<N, T, D>, MmlJax: MathML
362361
);
363362
return handler;
364363
}
365-
366-
367-
//
368-
// TODO(v3.2): This is for backward compatibility of old option parameters.
369-
//
370-
/**
371-
* Processes old enrichment option for backward compatibility.
372-
* @param {OptionList} options The options to process.
373-
*/
374-
function processSreOptions(options: OptionList) {
375-
if (!options) {
376-
return;
377-
}
378-
if (!options.sre) {
379-
options.sre = {};
380-
}
381-
if (options.enrichSpeech) {
382-
options.sre.speech = options.enrichSpeech;
383-
delete options.enrichSpeech;
384-
}
385-
}

0 commit comments

Comments
 (0)