{"id":29177717,"url":"https://github.com/totvs/twebchannel-js","last_synced_at":"2025-07-01T18:07:51.229Z","repository":{"id":35035572,"uuid":"199062446","full_name":"totvs/twebchannel-js","owner":"totvs","description":null,"archived":false,"fork":false,"pushed_at":"2022-05-25T20:47:35.000Z","size":11,"stargazers_count":4,"open_issues_count":0,"forks_count":2,"subscribers_count":10,"default_branch":"master","last_synced_at":"2025-06-13T03:04:43.847Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/totvs.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-07-26T18:21:58.000Z","updated_at":"2022-05-25T20:46:50.000Z","dependencies_parsed_at":"2022-09-16T00:12:22.133Z","dependency_job_id":null,"html_url":"https://github.com/totvs/twebchannel-js","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/totvs/twebchannel-js","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/totvs%2Ftwebchannel-js","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/totvs%2Ftwebchannel-js/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/totvs%2Ftwebchannel-js/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/totvs%2Ftwebchannel-js/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/totvs","download_url":"https://codeload.github.com/totvs/twebchannel-js/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/totvs%2Ftwebchannel-js/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":263013723,"owners_count":23399813,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-07-01T18:07:50.512Z","updated_at":"2025-07-01T18:07:51.200Z","avatar_url":"https://github.com/totvs.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# twebchannel-js\r\nImplementação simples de comunicação com o componente AdvPL TWebChannel.\r\n\r\n## Instalação:\r\n\r\n```shell\r\nnpm install @totvs/twebchannel-js --save\r\n```\r\n\r\n## Uso:\r\n\r\n#### connect\r\nInicia a conexão com o TWebChannel AdvPL \r\n\r\nParametros: \r\n* callback: Function\r\n\r\n\r\n```js\r\n    twebchannel.connect(callback);\r\n```\r\n\r\n#### jsToAdvpl\r\nExecuta uma chamada para a execução do bloco de código **bJsToAdvpl** do TWebChannel AdvPL.\r\n\r\nParametros: \r\n* key: string\r\n* value: string\r\n\r\n\r\n```js\r\n    twebchannel.jsToAdvpl(\"key\", \"value\");\r\n```\r\n\r\n#### advplToJs\r\nFunção que é executada ao receber uma chamada do metodo **advplToJs** do TWebChannel AdvPL.\r\n\r\nTipo: Function\r\n\r\nParâmetros: \r\n* key: string\r\n* value: string\r\n\r\n```js\r\n    twebchannel.advplToJs = function(key, value) {\r\n        console.log(key, value);\r\n    }\r\n```\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftotvs%2Ftwebchannel-js","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftotvs%2Ftwebchannel-js","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftotvs%2Ftwebchannel-js/lists"}