diff --git a/README.md b/README.md index 10817b6b..090ea6de 100644 --- a/README.md +++ b/README.md @@ -97,6 +97,11 @@ playground('.selector', options) ``` +**Options description:** + +- `server` — string, server where the code will be sent to be compiled and analyzed +- `offline` — boolean, if true don't send any requests to server + **Events description:** - `onChange(code)` — Fires every time the content of the editor is changed. Debounce time: 0.5s. diff --git a/examples.md b/examples.md index 39247e11..162d07a3 100644 --- a/examples.md +++ b/examples.md @@ -277,7 +277,39 @@ document.addEventListener('DOMContentLoaded', function() { }); ``` -Add additional hidden files: + +## Offline mode + +You can opt out of any server communication (code completion, execution, etc) by passing an `offline` flag: + +```html + +``` + + +
+ +```kotlin +class Contact(val id: Int, var email: String) + +fun main(args: Array) { + val contact = Contact(1, "mary@gmail.com") + println(contact.id) +} +``` + +
+ + +## Add additional hidden files: Put your files between `