You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+18-1Lines changed: 18 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -14,7 +14,24 @@ AngleSharp.Js extends the core AngleSharp library with a .NET-based JavaScript e
14
14
15
15
## Basic Configuration
16
16
17
-
(tbd)
17
+
If you just want a configuration *that works* you should use the following code:
18
+
19
+
```cs
20
+
varconfig=Configuration.Default
21
+
.WithJs(); // from AngleSharp.Js
22
+
```
23
+
24
+
This will register a scripting engine for JS files. The JS parsing options and more could be set with parameters of the `WithJs` method.
25
+
26
+
You can also use this part with a console for logging. The call for this is `WithConsoleLogger`, e.g.,
27
+
28
+
```cs
29
+
varconfig=Configuration.Default
30
+
.WithJs()
31
+
.WithConsoleLogger(ctx=>newMyConsoleLogger(ctx));
32
+
```
33
+
34
+
in the previous example `MyConsoleLogger` refers to a class implementing the `IConsoleLogger` interface. Examples of classes implementing this interface are available in our [samples repository](https://github.com/AngleSharp/AngleSharp.Samples).
0 commit comments