
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.
@ecomfe/san-devhook
Advanced tools
Hook for San. Append a __san_devtool__
namespace on global context contains
components and stores raw data.
<script src="http://xxx/hook.js?autohook"></script>
import {initHook} from '@ecomfe/san-devhook';
const config = {
hookOnly: true, // Do not send any message to content script (Only for extension).
subKey: 'treeData', // Key for the array of sub component tree.
prefixForBindingData: 'my', // Auto bing data and props using specified prefix.
conditions: [{
listeners: ['onAfterGenerateData', e => { }],
event: eventName,
target: targetDOM // All listeners will be disabled (do not execute) until the event
}], // binding on the target is triggered.
onGenerateData: (
message, cnode, parentId, component) => {}, // Append customized data for generating component tree.
onAfterGenerateData: (message, cnode, parentId, component) => {},
onBeforeListenSan: () => {}, // Do something before a San event.
onSanMessage: (
message, cnode, parentId, component) => {}, // Procedure when a San event triggering.
onAfterListenSan: () => {}, // Procedure after a San event.
onBeforeListenStore: () => {}, // Procedure before a san-store event.
onStoreMessage: () => {}, // Procedure when a san-store event triggering.
onAfterListenStore: () => {}, // Procedure after a san-store event.
onRetrieveData: tree => {}, // Retrieve root CNode after calling retrieveData().
onRootReady: (cnode, component) => {} // Emit when root component is ready.
onSan: sender => {} // Emit when San is initialized.
};
// The last argument called *config* is the configuration of san-devhook in all callbacks.
initHook(config);
__san_devtool__
namespacedata
synchronously.__SAN_COMPONENT__
: The component instance of current DOM object.__SAN_DATA__
: The component data.__SAN_PROPS__
: The component props.__SAN_CNODE__
: A CNode instance of component acts as a serializable object.__SAN_PATH__
: Ancestor component ID list.showTree()
: Display the component tree under current DOM object.More instructions refer to docs folder.
$ npm run chrome
And open a page using San.
$ npm run browser
FAQs
Hook for san-devtool.
The npm package @ecomfe/san-devhook receives a total of 1 weekly downloads. As such, @ecomfe/san-devhook popularity was classified as not popular.
We found that @ecomfe/san-devhook demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 8 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.