Security News
Cloudflare Adds Security.txt Setup Wizard
Cloudflare has launched a setup wizard allowing users to easily create and manage a security.txt file for vulnerability disclosure on their websites.
weex-vdom-tester
Advanced tools
Virtual-DOM test driver for Weex.
import {
Runtime,
DEFAULT_MODULES,
DEFAULT_COMPONENTS,
DEFAULT_ENV
} from 'weex-vdom-tester'
// Create a Weex JavaScript runtime for a certain Weex JS framework.
const runtime = new Runtime(jsFramework, {
// modules: DEFAULT_MODULES,
// components: DEFAULT_COMPONENTS
// env: DEFAULT_ENV
})
// Listen `nativeLog` calls.
runtime.onlog((type, args) => { ... })
runtime.onlog(type, (args) => { ... })
runtime.offlog((args) => { ... })
// Register more modules and components.
runtime.registerModules({
x: {
foo: (instance, document, ...args) => {},
bar: (instance, document, ...args) => {}
}
})
runtime.registerComponents([
x: { type: 'x', append: true }
])
import { Instance } from 'weex-vdom-tester'
// Create a Weex instance in a certain runtime.
// The `runtime` parameter is optional.
const instance = new Instance(runtime)
// Send commands to Weex JS runtime about this instance.
instance.$create(code, config, data)
instance.$refresh(data)
instance.$destroy()
instance.$fireEvent(element, type, detail)
instance.$callback(callbackId, detail, isLast)
instance.$getRoot()
// Listen `callNative` from Weex JS runtime.
// The module API would always run even you don't listen it.
instance.oncall(moduleName, (methodName, args) => { ... })
instance.oncall(moduleName, methodName, (args) => { ... })
instance.oncall((moduleName, methodName, args) => { ... })
// Mock default behavior of module APIs
instance.mockModuleAPI(
moduleName, methodName,
(instance, document, originFunc, ...args) => { ... })
// Get JSON object from the real instance document.
instance.getRealRoot()
// Watch changes of a certain element or its children.
// The default element is the root.
instance.watchDOMChanges((target, changes) => { ... })
instance.watchDOMChanges(element, (target, changes) => { ... })
// The history of `callNative` and `callJS`
instance.history.callNative[{ timestamp, module, method, args }]
instance.history.callJS[{ timestamp, method, args }]
instance.history.refresh[{ timestamp, data }]
// Control the connection status to Weex JS runtime.
instance.play()
instance.pause()
runtime.test([inputFileOrCode, outputFileOrCode])
runtime.test([inputFileOrCode, ...refreshs, outputFileOrCode])
runtime.test([inputFileOrCode, ...events, outputFileOrCode])
runtime.test([inputFileOrCode, ...mockCallbacks, outputFileOrCode])
FAQs
Virtual-DOM test driver for Weex
We found that weex-vdom-tester demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer 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
Cloudflare has launched a setup wizard allowing users to easily create and manage a security.txt file for vulnerability disclosure on their websites.
Security News
The Socket Research team breaks down a malicious npm package targeting the legitimate DOMPurify library. It uses obfuscated code to hide that it is exfiltrating browser and crypto wallet data.
Security News
ENISA’s 2024 report highlights the EU’s top cybersecurity threats, including rising DDoS attacks, ransomware, supply chain vulnerabilities, and weaponized AI.