Security News
38% of CISOs Fear They’re Not Moving Fast Enough on AI
CISOs are racing to adopt AI for cybersecurity, but hurdles in budgets and governance may leave some falling behind in the fight against cyber threats.
@netless/app-embedded-page
Advanced tools
Netless App for embedding web apps, providing the ability to sync state and event messaging.
Netless App for embedding web apps, providing the ability to sync state and event messaging.
addApp
to add it to whiteboard.manager.addApp({
kind: "EmbeddedPage",
attributes: {
src: "<your-url>",
},
});
If you need the ability to store shared replayable states and send/receive replayable events, use @netless/app-embedded-page-sdk
and set the initial state:
manager.addApp({
kind: "EmbeddedPage",
attributes: {
src: "<your-url>",
state: { initial: "state" }, // must be an object, will be `{}` by default
},
});
If you need whiteboard on top of your page, pass a scenePath
option:
manager.addApp({
kind: "EmbeddedPage",
options: {
scenePath: "/demo", // `scenePath` should be globally unique (across apps).
},
attributes: {
src: "<your-url>",
},
});
Important: When whiteboard drawing is enabled, the embedded page will not receive mouse events from user. Whiteboard drawing is disabled if and only if
room.state.memberState.currentApplianceName
isclicker
orselector
.
If your app has multiple pages and want to have multiple whiteboards for each page independently, you can use pages APIs from SDK.
import { createEmbeddedApp } from "@netless/app-embedded-page-sdk";
const pages = [
{ content: "page 1", pageNum: "1" },
{ content: "page 2", pageNum: "2" },
{ content: "page 3", pageNum: "3" },
];
const renderPage = pageNum => {
const page = pages.find(e => e.pageNum === pageNum);
$("#page-area").textContent = page.content;
};
// Create an app and wait for its initialization
const app = createEmbeddedApp();
app.onInit.addListener(() => {
renderPage(app.page || pages[0].pageNum);
});
// Switch to another page
$("#btn-to-page-2").onclick = () => {
app.setPage("2");
};
// Listen page changed
app.onPageChanged.addListener(() => {
renderPage(app.page || pages[0].pageNum);
});
MIT @ netless
FAQs
Netless App for embedding web apps, providing the ability to sync state and event messaging.
The npm package @netless/app-embedded-page receives a total of 0 weekly downloads. As such, @netless/app-embedded-page popularity was classified as not popular.
We found that @netless/app-embedded-page demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 11 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
CISOs are racing to adopt AI for cybersecurity, but hurdles in budgets and governance may leave some falling behind in the fight against cyber threats.
Research
Security News
Socket researchers uncovered a backdoored typosquat of BoltDB in the Go ecosystem, exploiting Go Module Proxy caching to persist undetected for years.
Security News
Company News
Socket is joining TC54 to help develop standards for software supply chain security, contributing to the evolution of SBOMs, CycloneDX, and Package URL specifications.