44![ Tests] ( https://github.com/elmahio/netstack.js/actions/workflows/test.yml/badge.svg )
55
66
7- A simple and easy jQuery plugin for highlighting .NET stack traces
7+ A simple and easy JavaScript library for highlighting .NET stack traces
88
99#### Stacktrace - Language support
1010[ ![ English] ( images/flags/US%20-%20United%20States.svg )] ( # ) [ ![ Danish] ( images/flags/DK%20-%20Denmark.svg )] ( # ) [ ![ German] ( images/flags/DE%20-%20Germany.svg )] ( # ) [ ![ Russian] ( images/flags/RU%20-%20Russian%20Federation.svg )] ( # ) [ ![ Chinese] ( images/flags/CN%20-%20China.svg )] ( # )
@@ -15,13 +15,19 @@ A simple and easy jQuery plugin for highlighting .NET stack traces
1515[ Stack Trace Formatter - Online pretty print of .NET stack traces] ( https://elmah.io/tools/stack-trace-formatter/ )
1616
1717#### Initialization
18+ Using a string that represents a CSS selector:
1819``` javascript
19- $ (' .stacktrace' ).netStack ();
20+ const stack = new netStack (' .stacktrace' );
21+ ```
22+ Passing an HTMLElement object:
23+ ``` javascript
24+ const stackElement = document .querySelector (' .stacktrace' );
25+ const stack = new netStack (stackElement);
2026```
2127
2228#### Default values for classes
2329``` javascript
24- $ (' .stacktrace' ). netStack ( {
30+ const stack = new netStack (' .stacktrace' , {
2531 frame: ' st-frame' ,
2632 type: ' st-type' ,
2733 method: ' st-method' ,
@@ -38,7 +44,7 @@ $('.stacktrace').netStack({
3844Default: false.
3945Pretty prints your stacktrace.
4046``` javascript
41- $ (' .stacktrace' ). netStack ( {
47+ const stack = new netStack (' .stacktrace' , {
4248 prettyprint: true
4349});
4450```
@@ -58,4 +64,4 @@ pre, code {background-color:#333; color: #ffffff;}
5864---
5965### Acknowledgments
6066
61- * [ IgoR-NiK] ( https://github.com/IgoR-NiK )
67+ * [ IgoR-NiK] ( https://github.com/IgoR-NiK )
0 commit comments