new mmir.compat.v1.CommonUtils(compatibilitySelf)
Set to "backwards compatibility mode v1" (for pre version 2.0) for CommonUtils.
NOTE: needs
mmir.compat.v1.CoreCompat
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#regexHTMLComment
as html_comment_regex : RegExpr -
mmir.CommonUtils#resizeFitToSourroundingBox
as html_resize_font_to_fit_surrounding_box() -
mmir.CommonUtils#toJSONStringValue
as to_json_string_value(String: theObjectValue) : String -
mmir.CommonUtils#convertJSONStringValueToHTML
as convert_to_json_value_HTML_string(String: str) : String -
mmir.CommonUtils#convertJSONStringToHTML
as convert_json_to_HTML_string(String: str) : String -
mmir.CommonUtils#parseParamsToDictionary
as 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, setUtilsCompatibility, core, utils){
setCoreCompatibility(core);
setUtilsCompatibility(utils);
});
Requires
- module:document
- module:document