new mmir.CommonUtils.setToCompatibilityModeExtension(compatibilitySelf)
Set to "backwards compatibility mode v1" (for pre version 2.0) for CommonUtils.
NOTE: needs
mmir.Core.setToCompatibilityModeExtension to be set first!
This function re-adds deprecated and removed functions and
properties to the CommonUtils instance.
NOTE that once set to compatibility mode, it cannot be reset to
non-compatibility mode.
In addition, the following functions of CommonUtils are made accessible
on the mmir.CommonUtils instance with these additional names
-
mmir.CommonUtils#regexHTMLCommentas html_comment_regex : RegExpr -
mmir.CommonUtils#resizeFitToSourroundingBoxas html_resize_font_to_fit_surrounding_box() -
mmir.CommonUtils#toJSONStringValueas to_json_string_value(String: theObjectValue) : String -
mmir.CommonUtils#convertJSONStringValueToHTMLas convert_to_json_value_HTML_string(String: str) : String -
mmir.CommonUtils#convertJSONStringToHTMLas convert_json_to_HTML_string(String: str) : String -
mmir.CommonUtils#parseParamsToDictionaryas get_params_as_dict(String: str) : Object
mmir.extensions.JsonUtils will be made available.
| Name | Type | Description |
|---|---|---|
compatibilitySelf |
mmir.CommonUtils | the instance of mmir.CommonUtils to which the compatibility functions etc. will be attached |
Example
mmir.require(['mmirf/core3Compatibility', 'mmirf/commonUtilsCompatibility', 'mmirf/core', 'mmirf/commonUtils'], function(setCoreCompatibility, setCompatibility, core, utils){
setCoreCompatibility(core);
setCompatibility(utils);
});
Requires
- module:document
- module:document