New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@xiaobai-world/api

Package Overview
Dependencies
Maintainers
1
Versions
26
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@xiaobai-world/api - npm Package Compare versions

Comparing version 0.0.24 to 0.0.25

10

index.ts

@@ -7,3 +7,3 @@ declare global {

import { IContextMenuItem, IWindow } from './src/types'
import { IContextMenuItem } from './src/types'

@@ -36,3 +36,3 @@ /*

*/
export function mount(render: (selector: string, data: IWindow) => void): Promise<void> {
export function mount(render: (selector: string, appInfo: IXiaobaiWorldMessageData) => void): Promise<void> {
if (!window.xiaobaiApi) {

@@ -48,4 +48,4 @@ return Promise.reject()

}
const id = `#${data.id}`
const node = document.querySelector(id);
const mountPointId = `#${data.mountPointId}`
const node = document.querySelector(mountPointId);
// @ts-ignore: Unreachable code error

@@ -57,3 +57,3 @@ if (!appPackage.name) {

if (node && node.getAttribute('name') === appPackage.name) {
render(id, data.appInfo)
render(mountPointId, data)
}

@@ -60,0 +60,0 @@ }

{
"name": "@xiaobai-world/api",
"version": "0.0.24",
"version": "0.0.25",
"description": "xiaobai world api",

@@ -5,0 +5,0 @@ "main": "index.ts",

export interface IXiaobaiWorldMessageData {
XIAOBAI_EVENT: "XIAOBAI_APP_JAVASCRIPT_ENTRY_LOADED",
id: string,
mountPointId: string,
windowId:string,
name: string,
title: string,
appInfo: IWindow
}

@@ -8,0 +8,0 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc