<commit_before>Custom communication with the native code is available by the `native` module. Such communication is always asynchronous.

```javascript
var native = require('native');

native.callFunction('functionName', arg1, arg2, ...);
native.on('nativeEventName', function(arg1, arg2, ...){});
```

You can call native function using `native.callFunction()` and listen on getting native event by registering a listener using the `native.on()` method.

Native communication right now supports only: nulls, booleans, floats and strings, but still you can operate on renderer items using their number IDs.

Native code must be placed in folder `/native` created in you application. 
You will find there a sample code with function registering and event sending.

Next article: [[Resources - Tour]]<commit_msg>Updated Native Communication (markdown)<commit_after>Custom communication with the native code is available by the `native` module. Such communication is always asynchronous.

```javascript
var native = require('native');

native.callFunction('functionName', arg1, arg2, ...);
native.on('nativeEventName', function(arg1, arg2, ...){});
```

You can call native function using `native.callFunction()` and listen on getting native event by registering a listener using the `native.on()` method.

Native communication right now supports only: nulls, booleans, floats and strings, but still you can operate on renderer items using their number IDs.

Native code must be placed in folder `/native` created in you application. 
You will find there a sample code with function registering and event sending.
{'fraction_non_alphanumeric': 0.08944099378881988, 'fraction_numerical': 0.004968944099378882, 'mean_word_length': 5.317647058823529, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7184585', 'n_tokens_mistral': 402, 'n_tokens_neox': 378, 'n_words': 198}