1.0.3 • Published 5 years ago

@totvs/twebchannel-js v1.0.3

Weekly downloads
-
License
MIT
Repository
github
Last release
5 years ago

twebchannel-js

Implementação simples de comunicação com o componente AdvPL TWebChannel.

Instalação:

npm install @totvs/twebchannel-js --save

Uso:

connect

Inicia a conexão com o TWebChannel AdvPL

Parametros:

  • callback: Function
    twebchannel.connect(callback);

jsToAdvpl

Executa uma chamada para a execução do bloco de código bJsToAdvpl do TWebChannel AdvPL.

Parametros:

  • key: string
  • value: string
    twebchannel.jsToAdvpl("key", "value");

advplToJs

Função que é executada ao receber uma chamada do metodo advplToJs do TWebChannel AdvPL.

Tipo: Function

Parâmetros:

  • key: string
  • value: string
    twebchannel.advplToJs = function(key, value) {
        console.log(key, value);
    }
1.0.3

5 years ago

1.0.2

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago