IE, open html file directly from hard disk(insead of from a http server), cssRules access is denied.
Thus an expection is thrown. But in the catch statement, another one is thrown again thus caused the whole mermaid code break.
In this line `console.warn('Invalid CSS selector "' + rule.selectorText + '"', err);` rule is undefined, so exception will be thrown if we don't check.
mermaid

Generation of diagrams and flowcharts from text in a similar manner as markdown.
Ever wanted to simplify documentation and avoid heavy tools like Visio when explaining your code?
This is why mermaid was born, a simple markdown-like script language for generating charts from text via javascript.
The code below would render the following image
Further reading
Credits
Many thanks to the d3 and dagre-d3 projects for providing the graphical layout and drawing libraries! Thanks also to the js-sequence-diagram project for usage of the grammar for the sequence diagrams. Thanks to Jessica Peter for inspiration and starting point for gantt rendering.
Mermaid was created by Knut Sveidqvist for easier documentation.
Knut has not done all work by him self, here is the full list of the projects contributors.

