Have ideas to improve npm?Join in the discussion! »

    @cqlinkoff/bridge

    1.2.0 • Public • Published

    Bridge

    Bridge of native and web

    node npm license Build Status Standard - JavaScript Style Guide Coverage Status

    Installation

    npm i @cqlinkoff/bridge

    Use

    import Bridge from '@cqlinkoff/bridge'
     
    const bridge = new Bridge('namespace')
     
    bridge.call(func, args)
     
    bridge.addEventListener(event, handler)
     
    bridge.removeEventListener(event, handler)

    API

    • bridge.call(funcName: string, args: any): call native function with args

    • bridge.addEventListener(event: string, handler: function): add event listener

    • bridge.removeEventListener(event: string, handler: function): remove event listener

    Install

    npm i @cqlinkoff/bridge

    DownloadsWeekly Downloads

    4

    Version

    1.2.0

    License

    MIT

    Unpacked Size

    11.5 kB

    Total Files

    5

    Last publish

    Collaborators

    • avatar