![Deno 2.2 Improves Dependency Management and Expands Node.js Compatibility](https://cdn.sanity.io/images/cgdhsj6q/production/97774ea8c88cc8f4bed2766c31994ebc38116948-1664x1366.png?w=400&fit=max&auto=format)
Security News
Deno 2.2 Improves Dependency Management and Expands Node.js Compatibility
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
botframework-webchat
Advanced tools
Embeddable web chat control for the Microsoft Bot Framework using the DirectLine API.
Used by the Bot Framework developer portal, Emulator, WebChat channel, and Azure Bot Service
You can easily play with a recent build using botchattest
WebChat is a React component built in TypeScript using Redux for state management and RxJS for wrangling async.
See more detailed instructions below.
Not the most formal one you'll ever see, but:
Feel free to suggest features by filing an issue (please make sure one doesn't already exist).
npm install
npm run build
(to build on every change npm run watch
, to build minified npm run minify
)This is a quick and dirty method, perfect for testing. It requires embedding your Direct Line Secret in the web page or querystring, and as such should primarily be used for local testing.
npm run start
and aim your browser at http://localhost:8000/samples/standalone?s={Direct Line Secret}
In this scenario you will host two web pages, one for WebChat and one for the page which embeds it. They could be hosted by the same web server, or two entirely different web servers.
<iframe src="http://{host}:{port}/samples/standalone?[s={Direct Line Secret}|t={Direct Line Token}]" width="320" height="500"/>
(An example of this approach is botchattest)
In this scenario you will include a JavaScript file which embeds its own copy of React, which will run in a DOM element.
webpacked/botchat.js
and you will get an object called BotChat
BotChat.DirectLine
using your Direct Line Secret or TokenBotChat.App
with the DOM element where you want your chat instance, your DirectLine instance, user and bot identities, and other properties as demonstrated in samples/standalone/index.html.In this scenario you will incorporate WebChat's multiple JavaScript files into your React webapp.
DirectLine
using your Direct Line Secret or TokenChat
React component with your DirectLine instance, user and bot identities, and other properties as demonstrated in samples/standalone/index.html.NOTE: The provided backchannel [sample]((https://github.com/Microsoft/BotFramework-WebChat/blob/master/samples/standalone/index.html) requires a bot which can send and receive specific event messages. Follow the instructions here to deploy such a bot.
Backchannel is a way to send activities of type "event" (which are ignored by the actual webchat) between the page that hosts webchat and your bot web service. The backchannel sample provided in this project listens for events of name "changeBackground" and sends events of activity name "buttonClicked". This highlights the ability for a bot to communicate with a page that embeds the bot through WebChat. In other words, our bot can:
window.frames["{iframe_id}"].botchatDebug = true
from the browser consolewindow.botchatDebug = true
or var botchatDebug = true
from the browser consoleIn src/Strings.ts :
localizedStrings
strings
strings
to return the existing locale's strings© 2016 Microsoft Corporation
FAQs
A highly-customizable web-based chat client for Azure Bot Services.
The npm package botframework-webchat receives a total of 6,776 weekly downloads. As such, botframework-webchat popularity was classified as popular.
We found that botframework-webchat demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
Security News
React's CRA deprecation announcement sparked community criticism over framework recommendations, leading to quick updates acknowledging build tools like Vite as valid alternatives.
Security News
Ransomware payment rates hit an all-time low in 2024 as law enforcement crackdowns, stronger defenses, and shifting policies make attacks riskier and less profitable.