usb 2.0.0-alpha.2 → 2.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.gitmodules +1 -1
- package/CHANGELOG.md +81 -0
- package/README.md +570 -0
- package/binding.gyp +2 -2
- package/dist/usb/bindings.d.ts +13 -0
- package/dist/usb/bindings.js +2 -1
- package/dist/usb/bindings.js.map +1 -1
- package/dist/usb/index.js +86 -2
- package/dist/usb/index.js.map +1 -1
- package/dist/usb/interface.js.map +1 -1
- package/dist/webusb/index.d.ts +28 -19
- package/dist/webusb/index.js +152 -66
- package/dist/webusb/index.js.map +1 -1
- package/dist/webusb/webusb-device.d.ts +1 -1
- package/dist/webusb/webusb-device.js +9 -4
- package/dist/webusb/webusb-device.js.map +1 -1
- package/libusb/.private/pre-commit.sh +7 -1
- package/libusb/.travis.yml +49 -0
- package/libusb/AUTHORS +44 -3
- package/libusb/Brewfile +4 -0
- package/libusb/ChangeLog +74 -2
- package/libusb/README.md +32 -0
- package/libusb/TODO +1 -1
- package/libusb/Xcode/common.xcconfig +12 -0
- package/libusb/Xcode/config.h +25 -0
- package/libusb/Xcode/libusb.xcodeproj/project.pbxproj +959 -1
- package/libusb/android/README +4 -2
- package/libusb/android/config.h +75 -0
- package/libusb/appveyor.yml +41 -0
- package/libusb/appveyor_cygwin.bat +11 -0
- package/libusb/appveyor_minGW.bat +19 -0
- package/libusb/autogen.sh +1 -1
- package/libusb/bootstrap.sh +3 -16
- package/libusb/configure.ac +108 -80
- package/libusb/doc/doxygen.cfg.in +1785 -739
- package/libusb/examples/Makefile.am +1 -1
- package/libusb/examples/dpfp.c +3 -1
- package/libusb/examples/dpfp_threaded.c +23 -10
- package/libusb/examples/ezusb.c +3 -3
- package/libusb/examples/ezusb.h +2 -2
- package/libusb/examples/fxload.c +31 -9
- package/libusb/examples/hotplugtest.c +35 -7
- package/libusb/examples/listdevs.c +3 -1
- package/libusb/examples/sam3u_benchmark.c +3 -3
- package/libusb/examples/testlibusb.c +277 -0
- package/libusb/examples/xusb.c +40 -34
- package/libusb/libusb/Makefile.am +49 -23
- package/libusb/libusb/core.c +855 -457
- package/libusb/libusb/descriptor.c +72 -78
- package/libusb/libusb/hotplug.c +122 -76
- package/libusb/libusb/hotplug.h +42 -25
- package/libusb/libusb/io.c +625 -390
- package/libusb/libusb/libusb-1.0.def +12 -0
- package/libusb/libusb/libusb.h +218 -150
- package/libusb/libusb/libusbi.h +346 -176
- package/libusb/libusb/os/darwin_usb.c +604 -319
- package/libusb/libusb/os/darwin_usb.h +61 -20
- package/libusb/libusb/os/haiku_pollfs.cpp +367 -0
- package/libusb/libusb/os/haiku_usb.h +113 -0
- package/libusb/libusb/os/haiku_usb_backend.cpp +533 -0
- package/libusb/libusb/os/haiku_usb_raw.cpp +267 -0
- package/libusb/libusb/os/haiku_usb_raw.h +188 -0
- package/libusb/libusb/os/linux_netlink.c +186 -146
- package/libusb/libusb/os/linux_udev.c +36 -14
- package/libusb/libusb/os/linux_usbfs.c +426 -225
- package/libusb/libusb/os/linux_usbfs.h +5 -3
- package/libusb/libusb/os/netbsd_usb.c +21 -77
- package/libusb/libusb/os/openbsd_usb.c +32 -115
- package/libusb/libusb/os/poll_posix.c +38 -5
- package/libusb/libusb/os/poll_posix.h +3 -0
- package/libusb/libusb/os/poll_windows.c +277 -626
- package/libusb/libusb/os/poll_windows.h +11 -44
- package/libusb/libusb/os/sunos_usb.c +1695 -0
- package/libusb/libusb/os/sunos_usb.h +80 -0
- package/libusb/libusb/os/threads_posix.c +24 -26
- package/libusb/libusb/os/threads_posix.h +73 -21
- package/libusb/libusb/os/threads_windows.c +71 -157
- package/libusb/libusb/os/threads_windows.h +68 -44
- package/libusb/libusb/os/wince_usb.c +276 -420
- package/libusb/libusb/os/wince_usb.h +23 -28
- package/libusb/libusb/os/windows_common.h +78 -58
- package/libusb/libusb/os/windows_nt_common.c +1010 -0
- package/libusb/libusb/os/windows_nt_common.h +110 -0
- package/libusb/libusb/os/windows_nt_shared_types.h +147 -0
- package/libusb/libusb/os/windows_usbdk.c +830 -0
- package/libusb/libusb/os/windows_usbdk.h +103 -0
- package/libusb/libusb/os/windows_winusb.c +4391 -0
- package/libusb/libusb/os/windows_winusb.h +783 -0
- package/libusb/libusb/strerror.c +41 -7
- package/libusb/libusb/sync.c +41 -13
- package/libusb/libusb/version.h +1 -1
- package/libusb/libusb/version_nano.h +1 -1
- package/libusb/libusb-1.0.pc.in +1 -1
- package/libusb/msvc/appveyor.bat +27 -0
- package/libusb/msvc/config.h +5 -4
- package/libusb/msvc/ddk_build.cmd +87 -43
- package/libusb/msvc/fxload_2010.vcxproj +24 -104
- package/libusb/msvc/fxload_2012.vcxproj +24 -107
- package/libusb/msvc/fxload_2013.vcxproj +24 -107
- package/libusb/msvc/fxload_2015.vcxproj +91 -0
- package/libusb/msvc/fxload_2017.vcxproj +114 -0
- package/libusb/msvc/fxload_sources +1 -1
- package/libusb/msvc/getopt_2010.vcxproj +16 -75
- package/libusb/msvc/getopt_2012.vcxproj +16 -79
- package/libusb/msvc/getopt_2013.vcxproj +16 -79
- package/libusb/msvc/getopt_2015.vcxproj +73 -0
- package/libusb/msvc/getopt_2017.vcxproj +98 -0
- package/libusb/msvc/getopt_sources +6 -2
- package/libusb/msvc/hotplugtest_2010.vcxproj +18 -99
- package/libusb/msvc/hotplugtest_2012.vcxproj +18 -102
- package/libusb/msvc/hotplugtest_2013.vcxproj +18 -102
- package/libusb/msvc/hotplugtest_2015.vcxproj +83 -0
- package/libusb/msvc/hotplugtest_2017.vcxproj +106 -0
- package/libusb/msvc/hotplugtest_sources +1 -1
- package/libusb/msvc/libusb_2005.sln +20 -20
- package/libusb/msvc/libusb_2010.sln +57 -46
- package/libusb/msvc/libusb_2012.sln +57 -46
- package/libusb/msvc/libusb_2013.sln +57 -50
- package/libusb/msvc/libusb_2015.sln +59 -52
- package/libusb/msvc/libusb_2017.sln +186 -0
- package/libusb/msvc/libusb_dll.dsp +2 -2
- package/libusb/msvc/libusb_dll_2005.vcproj +30 -2
- package/libusb/msvc/libusb_dll_2010.vcxproj +26 -90
- package/libusb/msvc/libusb_dll_2012.vcxproj +28 -96
- package/libusb/msvc/libusb_dll_2013.vcxproj +28 -96
- package/libusb/msvc/libusb_dll_2015.vcxproj +107 -0
- package/libusb/msvc/libusb_dll_2017.vcxproj +134 -0
- package/libusb/msvc/libusb_dll_wince.vcproj +9 -1
- package/libusb/msvc/libusb_sources +10 -5
- package/libusb/msvc/libusb_static.dsp +2 -2
- package/libusb/msvc/libusb_static_2005.vcproj +32 -4
- package/libusb/msvc/libusb_static_2010.vcxproj +24 -83
- package/libusb/msvc/libusb_static_2012.vcxproj +25 -87
- package/libusb/msvc/libusb_static_2013.vcxproj +25 -87
- package/libusb/msvc/libusb_static_2015.vcxproj +98 -0
- package/libusb/msvc/libusb_static_2017.vcxproj +117 -0
- package/libusb/msvc/libusb_static_wince.vcproj +20 -26
- package/libusb/msvc/libusb_wince.sln +88 -88
- package/libusb/msvc/listdevs_2010.vcxproj +16 -99
- package/libusb/msvc/listdevs_2012.vcxproj +16 -102
- package/libusb/msvc/listdevs_2013.vcxproj +16 -102
- package/libusb/msvc/listdevs_2015.vcxproj +83 -0
- package/libusb/msvc/listdevs_2017.vcxproj +106 -0
- package/libusb/msvc/listdevs_sources +2 -1
- package/libusb/msvc/stress_2010.vcxproj +20 -101
- package/libusb/msvc/stress_2012.vcxproj +20 -104
- package/libusb/msvc/stress_2013.vcxproj +20 -104
- package/libusb/msvc/stress_2015.vcxproj +87 -0
- package/libusb/msvc/stress_2017.vcxproj +110 -0
- package/libusb/msvc/stress_sources +21 -0
- package/libusb/msvc/testlibusb_2010.vcxproj +82 -0
- package/libusb/msvc/testlibusb_2012.vcxproj +83 -0
- package/libusb/msvc/testlibusb_2013.vcxproj +83 -0
- package/libusb/msvc/testlibusb_2015.vcxproj +83 -0
- package/libusb/msvc/testlibusb_2017.vcxproj +106 -0
- package/libusb/msvc/testlibusb_sources +20 -0
- package/libusb/msvc/xusb_2010.vcxproj +17 -98
- package/libusb/msvc/xusb_2012.vcxproj +17 -101
- package/libusb/msvc/xusb_2013.vcxproj +17 -101
- package/libusb/msvc/xusb_2015.vcxproj +83 -0
- package/libusb/msvc/xusb_2017.vcxproj +106 -0
- package/libusb/msvc/xusb_sources +1 -1
- package/libusb/tests/stress.c +2 -2
- package/libusb/tests/testlib.c +0 -4
- package/libusb/travis-autogen.sh +39 -0
- package/libusb.gypi +13 -2
- package/package.json +23 -13
- package/prebuilds/android-arm/node.napi.armv7.node +0 -0
- package/prebuilds/android-arm64/node.napi.armv8.node +0 -0
- package/prebuilds/darwin-x64+arm64/node.napi.node +0 -0
- package/prebuilds/linux-arm/node.napi.armv6.node +0 -0
- package/prebuilds/linux-arm/node.napi.armv7.node +0 -0
- package/prebuilds/linux-arm64/node.napi.armv8.node +0 -0
- package/prebuilds/linux-ia32/node.napi.node +0 -0
- package/prebuilds/linux-x64/node.napi.glibc.node +0 -0
- package/prebuilds/linux-x64/node.napi.musl.node +0 -0
- package/prebuilds/win32-ia32/node.napi.node +0 -0
- package/prebuilds/win32-x64/node.napi.node +0 -0
- package/src/device.cc +7 -7
- package/src/node_usb.cc +43 -1
- package/src/uv_async_queue.h +33 -25
- package/test/usb.coffee +6 -0
- package/tsc/index.ts +1 -1
- package/tsc/usb/bindings.ts +19 -1
- package/tsc/usb/index.ts +67 -19
- package/tsc/usb/interface.ts +2 -2
- package/tsc/webusb/index.ts +187 -75
- package/tsc/webusb/webusb-device.ts +19 -15
- package/.github/workflows/prebuild.yml +0 -48
- package/Readme.md +0 -339
- package/dist/webusb/typed-event-target.d.ts +0 -11
- package/dist/webusb/typed-event-target.js +0 -21
- package/dist/webusb/typed-event-target.js.map +0 -1
- package/docs/assets/css/main.css +0 -2660
- package/docs/assets/images/icons.png +0 -0
- package/docs/assets/images/icons@2x.png +0 -0
- package/docs/assets/images/widgets.png +0 -0
- package/docs/assets/images/widgets@2x.png +0 -0
- package/docs/assets/js/main.js +0 -248
- package/docs/assets/js/search.js +0 -1
- package/docs/classes/usb_bindings.device.html +0 -1338
- package/docs/classes/usb_bindings.libusbexception.html +0 -234
- package/docs/classes/usb_bindings.transfer.html +0 -344
- package/docs/classes/usb_capability.capability.html +0 -297
- package/docs/classes/usb_device.extendeddevice.html +0 -766
- package/docs/classes/usb_endpoint.endpoint.html +0 -472
- package/docs/classes/usb_endpoint.inendpoint.html +0 -766
- package/docs/classes/usb_endpoint.outendpoint.html +0 -582
- package/docs/classes/usb_interface.interface.html +0 -648
- package/docs/classes/webusb.webusb-1.html +0 -615
- package/docs/classes/webusb_mutex.mutex.html +0 -270
- package/docs/classes/webusb_typed_event_target.typedeventtarget.html +0 -443
- package/docs/classes/webusb_webusb_device.webusbdevice.html +0 -904
- package/docs/index.html +0 -500
- package/docs/interfaces/usb.deviceevents.html +0 -242
- package/docs/interfaces/usb_descriptors.bosdescriptor.html +0 -293
- package/docs/interfaces/usb_descriptors.capabilitydescriptor.html +0 -274
- package/docs/interfaces/usb_descriptors.configdescriptor.html +0 -388
- package/docs/interfaces/usb_descriptors.devicedescriptor.html +0 -464
- package/docs/interfaces/usb_descriptors.endpointdescriptor.html +0 -370
- package/docs/interfaces/usb_descriptors.interfacedescriptor.html +0 -407
- package/docs/interfaces/webusb.usboptions.html +0 -226
- package/docs/modules/index.html +0 -304
- package/docs/modules/usb.html +0 -173
- package/docs/modules/usb_bindings.html +0 -2248
- package/docs/modules/usb_capability.html +0 -156
- package/docs/modules/usb_descriptors.html +0 -176
- package/docs/modules/usb_device.html +0 -156
- package/docs/modules/usb_endpoint.html +0 -164
- package/docs/modules/usb_interface.html +0 -156
- package/docs/modules/webusb.html +0 -165
- package/docs/modules/webusb_mutex.html +0 -156
- package/docs/modules/webusb_typed_event_target.html +0 -156
- package/docs/modules/webusb_webusb_device.html +0 -156
- package/docs/modules.html +0 -156
- package/libusb/INSTALL +0 -234
- package/libusb/README +0 -28
- package/libusb/libusb/os/windows_usb.c +0 -5347
- package/libusb/libusb/os/windows_usb.h +0 -971
- package/libusb/msvc/fxload_2010.vcxproj.filters +0 -25
- package/libusb/msvc/fxload_2012.vcxproj.filters +0 -25
- package/libusb/msvc/getopt_2010.vcxproj.filters +0 -26
- package/libusb/msvc/getopt_2012.vcxproj.filters +0 -26
- package/libusb/msvc/hotplugtest_2010.vcxproj.filters +0 -14
- package/libusb/msvc/hotplugtest_2012.vcxproj.filters +0 -14
- package/libusb/msvc/libusb_dll_2010.vcxproj.filters +0 -81
- package/libusb/msvc/libusb_dll_2012.vcxproj.filters +0 -84
- package/libusb/msvc/libusb_static_2010.vcxproj.filters +0 -74
- package/libusb/msvc/libusb_static_2012.vcxproj.filters +0 -74
- package/libusb/msvc/listdevs_2010.vcxproj.filters +0 -14
- package/libusb/msvc/listdevs_2012.vcxproj.filters +0 -14
- package/libusb/msvc/stress_2010.vcxproj.filters +0 -25
- package/libusb/msvc/stress_2012.vcxproj.filters +0 -25
- package/libusb/msvc/xusb_2010.vcxproj.filters +0 -14
- package/libusb/msvc/xusb_2012.vcxproj.filters +0 -14
- package/tsc/webusb/typed-event-target.ts +0 -23
|
@@ -1,615 +0,0 @@
|
|
|
1
|
-
<!doctype html>
|
|
2
|
-
<html class="default no-js">
|
|
3
|
-
<head>
|
|
4
|
-
<meta charset="utf-8">
|
|
5
|
-
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
|
6
|
-
<title>WebUSB | Node USB</title>
|
|
7
|
-
<meta name="description" content="Documentation for Node USB">
|
|
8
|
-
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
9
|
-
<link rel="stylesheet" href="../assets/css/main.css">
|
|
10
|
-
<script async src="../assets/js/search.js" id="search-script"></script>
|
|
11
|
-
</head>
|
|
12
|
-
<body>
|
|
13
|
-
<header>
|
|
14
|
-
<div class="tsd-page-toolbar">
|
|
15
|
-
<div class="container">
|
|
16
|
-
<div class="table-wrap">
|
|
17
|
-
<div class="table-cell" id="tsd-search" data-index="../assets/js/search.json" data-base="..">
|
|
18
|
-
<div class="field">
|
|
19
|
-
<label for="tsd-search-field" class="tsd-widget search no-caption">Search</label>
|
|
20
|
-
<input id="tsd-search-field" type="text" />
|
|
21
|
-
</div>
|
|
22
|
-
<ul class="results">
|
|
23
|
-
<li class="state loading">Preparing search index...</li>
|
|
24
|
-
<li class="state failure">The search index is not available</li>
|
|
25
|
-
</ul>
|
|
26
|
-
<a href="../index.html" class="title">Node USB</a>
|
|
27
|
-
</div>
|
|
28
|
-
<div class="table-cell" id="tsd-widgets">
|
|
29
|
-
<div id="tsd-filter">
|
|
30
|
-
<a href="#" class="tsd-widget options no-caption" data-toggle="options">Options</a>
|
|
31
|
-
<div class="tsd-filter-group">
|
|
32
|
-
<div class="tsd-select" id="tsd-filter-visibility">
|
|
33
|
-
<span class="tsd-select-label">All</span>
|
|
34
|
-
<ul class="tsd-select-list">
|
|
35
|
-
<li data-value="public">Public</li>
|
|
36
|
-
<li data-value="protected">Public/Protected</li>
|
|
37
|
-
<li data-value="private" class="selected">All</li>
|
|
38
|
-
</ul>
|
|
39
|
-
</div>
|
|
40
|
-
<input type="checkbox" id="tsd-filter-inherited" checked />
|
|
41
|
-
<label class="tsd-widget" for="tsd-filter-inherited">Inherited</label>
|
|
42
|
-
</div>
|
|
43
|
-
</div>
|
|
44
|
-
<a href="#" class="tsd-widget menu no-caption" data-toggle="menu">Menu</a>
|
|
45
|
-
</div>
|
|
46
|
-
</div>
|
|
47
|
-
</div>
|
|
48
|
-
</div>
|
|
49
|
-
<div class="tsd-page-title">
|
|
50
|
-
<div class="container">
|
|
51
|
-
<ul class="tsd-breadcrumb">
|
|
52
|
-
<li>
|
|
53
|
-
<a href="../modules.html">Node USB</a>
|
|
54
|
-
</li>
|
|
55
|
-
<li>
|
|
56
|
-
<a href="../modules/webusb.html">webusb</a>
|
|
57
|
-
</li>
|
|
58
|
-
<li>
|
|
59
|
-
<a href="webusb.webusb-1.html">WebUSB</a>
|
|
60
|
-
</li>
|
|
61
|
-
</ul>
|
|
62
|
-
<h1>Class WebUSB</h1>
|
|
63
|
-
</div>
|
|
64
|
-
</div>
|
|
65
|
-
</header>
|
|
66
|
-
<div class="container container-main">
|
|
67
|
-
<div class="row">
|
|
68
|
-
<div class="col-8 col-content">
|
|
69
|
-
<section class="tsd-panel tsd-hierarchy">
|
|
70
|
-
<h3>Hierarchy</h3>
|
|
71
|
-
<ul class="tsd-hierarchy">
|
|
72
|
-
<li>
|
|
73
|
-
<a href="webusb_typed_event_target.typedeventtarget.html" class="tsd-signature-type" data-tsd-kind="Class">TypedEventTarget</a><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">USBEvents</span><span class="tsd-signature-symbol">></span>
|
|
74
|
-
<ul class="tsd-hierarchy">
|
|
75
|
-
<li>
|
|
76
|
-
<span class="target">WebUSB</span>
|
|
77
|
-
</li>
|
|
78
|
-
</ul>
|
|
79
|
-
</li>
|
|
80
|
-
</ul>
|
|
81
|
-
</section>
|
|
82
|
-
<section class="tsd-panel">
|
|
83
|
-
<h3>Implements</h3>
|
|
84
|
-
<ul class="tsd-hierarchy">
|
|
85
|
-
<li><span class="tsd-signature-type">USB</span></li>
|
|
86
|
-
</ul>
|
|
87
|
-
</section>
|
|
88
|
-
<section class="tsd-panel-group tsd-index-group">
|
|
89
|
-
<h2>Index</h2>
|
|
90
|
-
<section class="tsd-panel tsd-index-panel">
|
|
91
|
-
<div class="tsd-index-content">
|
|
92
|
-
<section class="tsd-index-section ">
|
|
93
|
-
<h3>Constructors</h3>
|
|
94
|
-
<ul class="tsd-index-list">
|
|
95
|
-
<li class="tsd-kind-constructor tsd-parent-kind-class tsd-is-overwrite"><a href="webusb.webusb-1.html#constructor" class="tsd-kind-icon">constructor</a></li>
|
|
96
|
-
</ul>
|
|
97
|
-
</section>
|
|
98
|
-
<section class="tsd-index-section ">
|
|
99
|
-
<h3>Accessors</h3>
|
|
100
|
-
<ul class="tsd-index-list">
|
|
101
|
-
<li class="tsd-kind-set-signature tsd-parent-kind-class"><a href="webusb.webusb-1.html#onconnect" class="tsd-kind-icon">onconnect</a></li>
|
|
102
|
-
<li class="tsd-kind-set-signature tsd-parent-kind-class"><a href="webusb.webusb-1.html#ondisconnect" class="tsd-kind-icon">ondisconnect</a></li>
|
|
103
|
-
</ul>
|
|
104
|
-
</section>
|
|
105
|
-
<section class="tsd-index-section ">
|
|
106
|
-
<h3>Methods</h3>
|
|
107
|
-
<ul class="tsd-index-list">
|
|
108
|
-
<li class="tsd-kind-method tsd-parent-kind-class tsd-is-inherited"><a href="webusb.webusb-1.html#addeventlistener" class="tsd-kind-icon">add<wbr>Event<wbr>Listener</a></li>
|
|
109
|
-
<li class="tsd-kind-method tsd-parent-kind-class tsd-is-inherited"><a href="webusb.webusb-1.html#dispatchevent" class="tsd-kind-icon">dispatch<wbr>Event</a></li>
|
|
110
|
-
<li class="tsd-kind-method tsd-parent-kind-class"><a href="webusb.webusb-1.html#getdevices" class="tsd-kind-icon">get<wbr>Devices</a></li>
|
|
111
|
-
<li class="tsd-kind-method tsd-parent-kind-class tsd-is-inherited"><a href="webusb.webusb-1.html#removeeventlistener" class="tsd-kind-icon">remove<wbr>Event<wbr>Listener</a></li>
|
|
112
|
-
<li class="tsd-kind-method tsd-parent-kind-class"><a href="webusb.webusb-1.html#requestdevice" class="tsd-kind-icon">request<wbr>Device</a></li>
|
|
113
|
-
</ul>
|
|
114
|
-
</section>
|
|
115
|
-
</div>
|
|
116
|
-
</section>
|
|
117
|
-
</section>
|
|
118
|
-
<section class="tsd-panel-group tsd-member-group ">
|
|
119
|
-
<h2>Constructors</h2>
|
|
120
|
-
<section class="tsd-panel tsd-member tsd-kind-constructor tsd-parent-kind-class tsd-is-overwrite">
|
|
121
|
-
<a name="constructor" class="tsd-anchor"></a>
|
|
122
|
-
<h3>constructor</h3>
|
|
123
|
-
<ul class="tsd-signatures tsd-kind-constructor tsd-parent-kind-class tsd-is-overwrite">
|
|
124
|
-
<li class="tsd-signature tsd-kind-icon">new <wbr>WebUSB<span class="tsd-signature-symbol">(</span>options<span class="tsd-signature-symbol">?: </span><a href="../interfaces/webusb.usboptions.html" class="tsd-signature-type" data-tsd-kind="Interface">USBOptions</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="webusb.webusb-1.html" class="tsd-signature-type" data-tsd-kind="Class">WebUSB</a></li>
|
|
125
|
-
</ul>
|
|
126
|
-
<ul class="tsd-descriptions">
|
|
127
|
-
<li class="tsd-description">
|
|
128
|
-
<aside class="tsd-sources">
|
|
129
|
-
<p>Overrides <a href="webusb_typed_event_target.typedeventtarget.html">TypedEventTarget</a>.<a href="webusb_typed_event_target.typedeventtarget.html#constructor">constructor</a></p>
|
|
130
|
-
<ul>
|
|
131
|
-
<li>Defined in <a href="https://github.com/tessel/node-usb/blob/639b0a3/tsc/webusb/index.ts#L40">tsc/webusb/index.ts:40</a></li>
|
|
132
|
-
</ul>
|
|
133
|
-
</aside>
|
|
134
|
-
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
135
|
-
<ul class="tsd-parameters">
|
|
136
|
-
<li>
|
|
137
|
-
<h5>options: <a href="../interfaces/webusb.usboptions.html" class="tsd-signature-type" data-tsd-kind="Interface">USBOptions</a><span class="tsd-signature-symbol"> = {}</span></h5>
|
|
138
|
-
</li>
|
|
139
|
-
</ul>
|
|
140
|
-
<h4 class="tsd-returns-title">Returns <a href="webusb.webusb-1.html" class="tsd-signature-type" data-tsd-kind="Class">WebUSB</a></h4>
|
|
141
|
-
</li>
|
|
142
|
-
</ul>
|
|
143
|
-
</section>
|
|
144
|
-
</section>
|
|
145
|
-
<section class="tsd-panel-group tsd-member-group ">
|
|
146
|
-
<h2>Accessors</h2>
|
|
147
|
-
<section class="tsd-panel tsd-member tsd-kind-set-signature tsd-parent-kind-class">
|
|
148
|
-
<a name="onconnect" class="tsd-anchor"></a>
|
|
149
|
-
<h3>onconnect</h3>
|
|
150
|
-
<ul class="tsd-signatures tsd-kind-set-signature tsd-parent-kind-class">
|
|
151
|
-
<li class="tsd-signature tsd-kind-icon"><span class="tsd-signature-symbol">set</span> onconnect<span class="tsd-signature-symbol">(</span>listener<span class="tsd-signature-symbol">: </span><span class="tsd-signature-symbol">(</span>event<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">USBConnectionEvent</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol"> => </span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li>
|
|
152
|
-
</ul>
|
|
153
|
-
<ul class="tsd-descriptions">
|
|
154
|
-
<li class="tsd-description">
|
|
155
|
-
<aside class="tsd-sources">
|
|
156
|
-
<ul>
|
|
157
|
-
<li>Defined in <a href="https://github.com/tessel/node-usb/blob/639b0a3/tsc/webusb/index.ts#L46">tsc/webusb/index.ts:46</a></li>
|
|
158
|
-
</ul>
|
|
159
|
-
</aside>
|
|
160
|
-
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
161
|
-
<ul class="tsd-parameters">
|
|
162
|
-
<li>
|
|
163
|
-
<h5>listener: <span class="tsd-signature-symbol">(</span>event<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">USBConnectionEvent</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol"> => </span><span class="tsd-signature-type">void</span></h5>
|
|
164
|
-
<ul class="tsd-parameters">
|
|
165
|
-
<li class="tsd-parameter-signature">
|
|
166
|
-
<ul class="tsd-signatures tsd-kind-type-literal">
|
|
167
|
-
<li class="tsd-signature tsd-kind-icon"><span class="tsd-signature-symbol">(</span>event<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">USBConnectionEvent</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li>
|
|
168
|
-
</ul>
|
|
169
|
-
<ul class="tsd-descriptions">
|
|
170
|
-
<li class="tsd-description">
|
|
171
|
-
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
172
|
-
<ul class="tsd-parameters">
|
|
173
|
-
<li>
|
|
174
|
-
<h5>event: <span class="tsd-signature-type">USBConnectionEvent</span></h5>
|
|
175
|
-
</li>
|
|
176
|
-
</ul>
|
|
177
|
-
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4>
|
|
178
|
-
</li>
|
|
179
|
-
</ul>
|
|
180
|
-
</li>
|
|
181
|
-
</ul>
|
|
182
|
-
</li>
|
|
183
|
-
</ul>
|
|
184
|
-
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4>
|
|
185
|
-
</li>
|
|
186
|
-
</ul>
|
|
187
|
-
</section>
|
|
188
|
-
<section class="tsd-panel tsd-member tsd-kind-set-signature tsd-parent-kind-class">
|
|
189
|
-
<a name="ondisconnect" class="tsd-anchor"></a>
|
|
190
|
-
<h3>ondisconnect</h3>
|
|
191
|
-
<ul class="tsd-signatures tsd-kind-set-signature tsd-parent-kind-class">
|
|
192
|
-
<li class="tsd-signature tsd-kind-icon"><span class="tsd-signature-symbol">set</span> ondisconnect<span class="tsd-signature-symbol">(</span>listener<span class="tsd-signature-symbol">: </span><span class="tsd-signature-symbol">(</span>event<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">USBConnectionEvent</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol"> => </span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li>
|
|
193
|
-
</ul>
|
|
194
|
-
<ul class="tsd-descriptions">
|
|
195
|
-
<li class="tsd-description">
|
|
196
|
-
<aside class="tsd-sources">
|
|
197
|
-
<ul>
|
|
198
|
-
<li>Defined in <a href="https://github.com/tessel/node-usb/blob/639b0a3/tsc/webusb/index.ts#L50">tsc/webusb/index.ts:50</a></li>
|
|
199
|
-
</ul>
|
|
200
|
-
</aside>
|
|
201
|
-
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
202
|
-
<ul class="tsd-parameters">
|
|
203
|
-
<li>
|
|
204
|
-
<h5>listener: <span class="tsd-signature-symbol">(</span>event<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">USBConnectionEvent</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol"> => </span><span class="tsd-signature-type">void</span></h5>
|
|
205
|
-
<ul class="tsd-parameters">
|
|
206
|
-
<li class="tsd-parameter-signature">
|
|
207
|
-
<ul class="tsd-signatures tsd-kind-type-literal">
|
|
208
|
-
<li class="tsd-signature tsd-kind-icon"><span class="tsd-signature-symbol">(</span>event<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">USBConnectionEvent</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li>
|
|
209
|
-
</ul>
|
|
210
|
-
<ul class="tsd-descriptions">
|
|
211
|
-
<li class="tsd-description">
|
|
212
|
-
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
213
|
-
<ul class="tsd-parameters">
|
|
214
|
-
<li>
|
|
215
|
-
<h5>event: <span class="tsd-signature-type">USBConnectionEvent</span></h5>
|
|
216
|
-
</li>
|
|
217
|
-
</ul>
|
|
218
|
-
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4>
|
|
219
|
-
</li>
|
|
220
|
-
</ul>
|
|
221
|
-
</li>
|
|
222
|
-
</ul>
|
|
223
|
-
</li>
|
|
224
|
-
</ul>
|
|
225
|
-
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4>
|
|
226
|
-
</li>
|
|
227
|
-
</ul>
|
|
228
|
-
</section>
|
|
229
|
-
</section>
|
|
230
|
-
<section class="tsd-panel-group tsd-member-group ">
|
|
231
|
-
<h2>Methods</h2>
|
|
232
|
-
<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-inherited">
|
|
233
|
-
<a name="addeventlistener" class="tsd-anchor"></a>
|
|
234
|
-
<h3>add<wbr>Event<wbr>Listener</h3>
|
|
235
|
-
<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-inherited">
|
|
236
|
-
<li class="tsd-signature tsd-kind-icon">add<wbr>Event<wbr>Listener<span class="tsd-signature-symbol">(</span>type<span class="tsd-signature-symbol">: </span><span class="tsd-signature-symbol">keyof </span><span class="tsd-signature-type">USBEvents</span>, listener<span class="tsd-signature-symbol">: </span><span class="tsd-signature-symbol">(</span>event<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">USBConnectionEvent</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol"> => </span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li>
|
|
237
|
-
<li class="tsd-signature tsd-kind-icon">add<wbr>Event<wbr>Listener<span class="tsd-signature-symbol">(</span>type<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span>, listener<span class="tsd-signature-symbol">: </span><span class="tsd-signature-symbol">(</span>event<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Event</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol"> => </span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li>
|
|
238
|
-
</ul>
|
|
239
|
-
<ul class="tsd-descriptions">
|
|
240
|
-
<li class="tsd-description">
|
|
241
|
-
<aside class="tsd-sources">
|
|
242
|
-
<p>Implementation of USB.addEventListener</p>
|
|
243
|
-
<p>Inherited from <a href="webusb_typed_event_target.typedeventtarget.html">TypedEventTarget</a>.<a href="webusb_typed_event_target.typedeventtarget.html#addeventlistener">addEventListener</a></p>
|
|
244
|
-
<ul>
|
|
245
|
-
<li>Defined in <a href="https://github.com/tessel/node-usb/blob/639b0a3/tsc/webusb/typed-event-target.ts#L6">tsc/webusb/typed-event-target.ts:6</a></li>
|
|
246
|
-
</ul>
|
|
247
|
-
</aside>
|
|
248
|
-
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
249
|
-
<ul class="tsd-parameters">
|
|
250
|
-
<li>
|
|
251
|
-
<h5>type: <span class="tsd-signature-symbol">keyof </span><span class="tsd-signature-type">USBEvents</span></h5>
|
|
252
|
-
</li>
|
|
253
|
-
<li>
|
|
254
|
-
<h5>listener: <span class="tsd-signature-symbol">(</span>event<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">USBConnectionEvent</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol"> => </span><span class="tsd-signature-type">void</span></h5>
|
|
255
|
-
<ul class="tsd-parameters">
|
|
256
|
-
<li class="tsd-parameter-signature">
|
|
257
|
-
<ul class="tsd-signatures tsd-kind-type-literal">
|
|
258
|
-
<li class="tsd-signature tsd-kind-icon"><span class="tsd-signature-symbol">(</span>event<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">USBConnectionEvent</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li>
|
|
259
|
-
</ul>
|
|
260
|
-
<ul class="tsd-descriptions">
|
|
261
|
-
<li class="tsd-description">
|
|
262
|
-
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
263
|
-
<ul class="tsd-parameters">
|
|
264
|
-
<li>
|
|
265
|
-
<h5>event: <span class="tsd-signature-type">USBConnectionEvent</span></h5>
|
|
266
|
-
</li>
|
|
267
|
-
</ul>
|
|
268
|
-
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4>
|
|
269
|
-
</li>
|
|
270
|
-
</ul>
|
|
271
|
-
</li>
|
|
272
|
-
</ul>
|
|
273
|
-
</li>
|
|
274
|
-
</ul>
|
|
275
|
-
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4>
|
|
276
|
-
</li>
|
|
277
|
-
<li class="tsd-description">
|
|
278
|
-
<aside class="tsd-sources">
|
|
279
|
-
<p>Implementation of USB.addEventListener</p>
|
|
280
|
-
<p>Inherited from <a href="webusb_typed_event_target.typedeventtarget.html">TypedEventTarget</a>.<a href="webusb_typed_event_target.typedeventtarget.html#addeventlistener">addEventListener</a></p>
|
|
281
|
-
<ul>
|
|
282
|
-
<li>Defined in <a href="https://github.com/tessel/node-usb/blob/639b0a3/tsc/webusb/typed-event-target.ts#L7">tsc/webusb/typed-event-target.ts:7</a></li>
|
|
283
|
-
</ul>
|
|
284
|
-
</aside>
|
|
285
|
-
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
286
|
-
<ul class="tsd-parameters">
|
|
287
|
-
<li>
|
|
288
|
-
<h5>type: <span class="tsd-signature-type">string</span></h5>
|
|
289
|
-
</li>
|
|
290
|
-
<li>
|
|
291
|
-
<h5>listener: <span class="tsd-signature-symbol">(</span>event<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Event</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol"> => </span><span class="tsd-signature-type">void</span></h5>
|
|
292
|
-
<ul class="tsd-parameters">
|
|
293
|
-
<li class="tsd-parameter-signature">
|
|
294
|
-
<ul class="tsd-signatures tsd-kind-type-literal">
|
|
295
|
-
<li class="tsd-signature tsd-kind-icon"><span class="tsd-signature-symbol">(</span>event<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Event</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li>
|
|
296
|
-
</ul>
|
|
297
|
-
<ul class="tsd-descriptions">
|
|
298
|
-
<li class="tsd-description">
|
|
299
|
-
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
300
|
-
<ul class="tsd-parameters">
|
|
301
|
-
<li>
|
|
302
|
-
<h5>event: <span class="tsd-signature-type">Event</span></h5>
|
|
303
|
-
</li>
|
|
304
|
-
</ul>
|
|
305
|
-
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4>
|
|
306
|
-
</li>
|
|
307
|
-
</ul>
|
|
308
|
-
</li>
|
|
309
|
-
</ul>
|
|
310
|
-
</li>
|
|
311
|
-
</ul>
|
|
312
|
-
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4>
|
|
313
|
-
</li>
|
|
314
|
-
</ul>
|
|
315
|
-
</section>
|
|
316
|
-
<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-inherited">
|
|
317
|
-
<a name="dispatchevent" class="tsd-anchor"></a>
|
|
318
|
-
<h3>dispatch<wbr>Event</h3>
|
|
319
|
-
<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-inherited">
|
|
320
|
-
<li class="tsd-signature tsd-kind-icon">dispatch<wbr>Event<span class="tsd-signature-symbol">(</span>event<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">USBConnectionEvent</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span></li>
|
|
321
|
-
<li class="tsd-signature tsd-kind-icon">dispatch<wbr>Event<span class="tsd-signature-symbol">(</span>event<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Event</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span></li>
|
|
322
|
-
</ul>
|
|
323
|
-
<ul class="tsd-descriptions">
|
|
324
|
-
<li class="tsd-description">
|
|
325
|
-
<aside class="tsd-sources">
|
|
326
|
-
<p>Implementation of USB.dispatchEvent</p>
|
|
327
|
-
<p>Inherited from <a href="webusb_typed_event_target.typedeventtarget.html">TypedEventTarget</a>.<a href="webusb_typed_event_target.typedeventtarget.html#dispatchevent">dispatchEvent</a></p>
|
|
328
|
-
<ul>
|
|
329
|
-
<li>Defined in <a href="https://github.com/tessel/node-usb/blob/639b0a3/tsc/webusb/typed-event-target.ts#L18">tsc/webusb/typed-event-target.ts:18</a></li>
|
|
330
|
-
</ul>
|
|
331
|
-
</aside>
|
|
332
|
-
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
333
|
-
<ul class="tsd-parameters">
|
|
334
|
-
<li>
|
|
335
|
-
<h5>event: <span class="tsd-signature-type">USBConnectionEvent</span></h5>
|
|
336
|
-
</li>
|
|
337
|
-
</ul>
|
|
338
|
-
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">boolean</span></h4>
|
|
339
|
-
</li>
|
|
340
|
-
<li class="tsd-description">
|
|
341
|
-
<aside class="tsd-sources">
|
|
342
|
-
<p>Implementation of USB.dispatchEvent</p>
|
|
343
|
-
<p>Inherited from <a href="webusb_typed_event_target.typedeventtarget.html">TypedEventTarget</a>.<a href="webusb_typed_event_target.typedeventtarget.html#dispatchevent">dispatchEvent</a></p>
|
|
344
|
-
<ul>
|
|
345
|
-
<li>Defined in <a href="https://github.com/tessel/node-usb/blob/639b0a3/tsc/webusb/typed-event-target.ts#L19">tsc/webusb/typed-event-target.ts:19</a></li>
|
|
346
|
-
</ul>
|
|
347
|
-
</aside>
|
|
348
|
-
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
349
|
-
<ul class="tsd-parameters">
|
|
350
|
-
<li>
|
|
351
|
-
<h5>event: <span class="tsd-signature-type">Event</span></h5>
|
|
352
|
-
</li>
|
|
353
|
-
</ul>
|
|
354
|
-
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">boolean</span></h4>
|
|
355
|
-
</li>
|
|
356
|
-
</ul>
|
|
357
|
-
</section>
|
|
358
|
-
<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class">
|
|
359
|
-
<a name="getdevices" class="tsd-anchor"></a>
|
|
360
|
-
<h3>get<wbr>Devices</h3>
|
|
361
|
-
<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class">
|
|
362
|
-
<li class="tsd-signature tsd-kind-icon">get<wbr>Devices<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">USBDevice</span><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">></span></li>
|
|
363
|
-
</ul>
|
|
364
|
-
<ul class="tsd-descriptions">
|
|
365
|
-
<li class="tsd-description">
|
|
366
|
-
<aside class="tsd-sources">
|
|
367
|
-
<p>Implementation of USB.getDevices</p>
|
|
368
|
-
<ul>
|
|
369
|
-
<li>Defined in <a href="https://github.com/tessel/node-usb/blob/639b0a3/tsc/webusb/index.ts#L126">tsc/webusb/index.ts:126</a></li>
|
|
370
|
-
</ul>
|
|
371
|
-
</aside>
|
|
372
|
-
<div class="tsd-comment tsd-typography">
|
|
373
|
-
<div class="lead">
|
|
374
|
-
<p>Gets all allowed Web USB devices which are connected</p>
|
|
375
|
-
</div>
|
|
376
|
-
</div>
|
|
377
|
-
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">USBDevice</span><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">></span></h4>
|
|
378
|
-
<p>Promise containing an array of devices</p>
|
|
379
|
-
</li>
|
|
380
|
-
</ul>
|
|
381
|
-
</section>
|
|
382
|
-
<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-inherited">
|
|
383
|
-
<a name="removeeventlistener" class="tsd-anchor"></a>
|
|
384
|
-
<h3>remove<wbr>Event<wbr>Listener</h3>
|
|
385
|
-
<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-inherited">
|
|
386
|
-
<li class="tsd-signature tsd-kind-icon">remove<wbr>Event<wbr>Listener<span class="tsd-signature-symbol">(</span>type<span class="tsd-signature-symbol">: </span><span class="tsd-signature-symbol">keyof </span><span class="tsd-signature-type">USBEvents</span>, listener<span class="tsd-signature-symbol">: </span><span class="tsd-signature-symbol">(</span>event<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">USBConnectionEvent</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol"> => </span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li>
|
|
387
|
-
<li class="tsd-signature tsd-kind-icon">remove<wbr>Event<wbr>Listener<span class="tsd-signature-symbol">(</span>type<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span>, listener<span class="tsd-signature-symbol">: </span><span class="tsd-signature-symbol">(</span>event<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Event</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol"> => </span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li>
|
|
388
|
-
</ul>
|
|
389
|
-
<ul class="tsd-descriptions">
|
|
390
|
-
<li class="tsd-description">
|
|
391
|
-
<aside class="tsd-sources">
|
|
392
|
-
<p>Implementation of USB.removeEventListener</p>
|
|
393
|
-
<p>Inherited from <a href="webusb_typed_event_target.typedeventtarget.html">TypedEventTarget</a>.<a href="webusb_typed_event_target.typedeventtarget.html#removeeventlistener">removeEventListener</a></p>
|
|
394
|
-
<ul>
|
|
395
|
-
<li>Defined in <a href="https://github.com/tessel/node-usb/blob/639b0a3/tsc/webusb/typed-event-target.ts#L12">tsc/webusb/typed-event-target.ts:12</a></li>
|
|
396
|
-
</ul>
|
|
397
|
-
</aside>
|
|
398
|
-
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
399
|
-
<ul class="tsd-parameters">
|
|
400
|
-
<li>
|
|
401
|
-
<h5>type: <span class="tsd-signature-symbol">keyof </span><span class="tsd-signature-type">USBEvents</span></h5>
|
|
402
|
-
</li>
|
|
403
|
-
<li>
|
|
404
|
-
<h5>listener: <span class="tsd-signature-symbol">(</span>event<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">USBConnectionEvent</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol"> => </span><span class="tsd-signature-type">void</span></h5>
|
|
405
|
-
<ul class="tsd-parameters">
|
|
406
|
-
<li class="tsd-parameter-signature">
|
|
407
|
-
<ul class="tsd-signatures tsd-kind-type-literal">
|
|
408
|
-
<li class="tsd-signature tsd-kind-icon"><span class="tsd-signature-symbol">(</span>event<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">USBConnectionEvent</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li>
|
|
409
|
-
</ul>
|
|
410
|
-
<ul class="tsd-descriptions">
|
|
411
|
-
<li class="tsd-description">
|
|
412
|
-
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
413
|
-
<ul class="tsd-parameters">
|
|
414
|
-
<li>
|
|
415
|
-
<h5>event: <span class="tsd-signature-type">USBConnectionEvent</span></h5>
|
|
416
|
-
</li>
|
|
417
|
-
</ul>
|
|
418
|
-
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4>
|
|
419
|
-
</li>
|
|
420
|
-
</ul>
|
|
421
|
-
</li>
|
|
422
|
-
</ul>
|
|
423
|
-
</li>
|
|
424
|
-
</ul>
|
|
425
|
-
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4>
|
|
426
|
-
</li>
|
|
427
|
-
<li class="tsd-description">
|
|
428
|
-
<aside class="tsd-sources">
|
|
429
|
-
<p>Implementation of USB.removeEventListener</p>
|
|
430
|
-
<p>Inherited from <a href="webusb_typed_event_target.typedeventtarget.html">TypedEventTarget</a>.<a href="webusb_typed_event_target.typedeventtarget.html#removeeventlistener">removeEventListener</a></p>
|
|
431
|
-
<ul>
|
|
432
|
-
<li>Defined in <a href="https://github.com/tessel/node-usb/blob/639b0a3/tsc/webusb/typed-event-target.ts#L13">tsc/webusb/typed-event-target.ts:13</a></li>
|
|
433
|
-
</ul>
|
|
434
|
-
</aside>
|
|
435
|
-
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
436
|
-
<ul class="tsd-parameters">
|
|
437
|
-
<li>
|
|
438
|
-
<h5>type: <span class="tsd-signature-type">string</span></h5>
|
|
439
|
-
</li>
|
|
440
|
-
<li>
|
|
441
|
-
<h5>listener: <span class="tsd-signature-symbol">(</span>event<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Event</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol"> => </span><span class="tsd-signature-type">void</span></h5>
|
|
442
|
-
<ul class="tsd-parameters">
|
|
443
|
-
<li class="tsd-parameter-signature">
|
|
444
|
-
<ul class="tsd-signatures tsd-kind-type-literal">
|
|
445
|
-
<li class="tsd-signature tsd-kind-icon"><span class="tsd-signature-symbol">(</span>event<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Event</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li>
|
|
446
|
-
</ul>
|
|
447
|
-
<ul class="tsd-descriptions">
|
|
448
|
-
<li class="tsd-description">
|
|
449
|
-
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
450
|
-
<ul class="tsd-parameters">
|
|
451
|
-
<li>
|
|
452
|
-
<h5>event: <span class="tsd-signature-type">Event</span></h5>
|
|
453
|
-
</li>
|
|
454
|
-
</ul>
|
|
455
|
-
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4>
|
|
456
|
-
</li>
|
|
457
|
-
</ul>
|
|
458
|
-
</li>
|
|
459
|
-
</ul>
|
|
460
|
-
</li>
|
|
461
|
-
</ul>
|
|
462
|
-
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4>
|
|
463
|
-
</li>
|
|
464
|
-
</ul>
|
|
465
|
-
</section>
|
|
466
|
-
<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class">
|
|
467
|
-
<a name="requestdevice" class="tsd-anchor"></a>
|
|
468
|
-
<h3>request<wbr>Device</h3>
|
|
469
|
-
<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class">
|
|
470
|
-
<li class="tsd-signature tsd-kind-icon">request<wbr>Device<span class="tsd-signature-symbol">(</span>options<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">USBDeviceRequestOptions</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">USBDevice</span><span class="tsd-signature-symbol">></span></li>
|
|
471
|
-
</ul>
|
|
472
|
-
<ul class="tsd-descriptions">
|
|
473
|
-
<li class="tsd-description">
|
|
474
|
-
<aside class="tsd-sources">
|
|
475
|
-
<p>Implementation of USB.requestDevice</p>
|
|
476
|
-
<ul>
|
|
477
|
-
<li>Defined in <a href="https://github.com/tessel/node-usb/blob/639b0a3/tsc/webusb/index.ts#L59">tsc/webusb/index.ts:59</a></li>
|
|
478
|
-
</ul>
|
|
479
|
-
</aside>
|
|
480
|
-
<div class="tsd-comment tsd-typography">
|
|
481
|
-
<div class="lead">
|
|
482
|
-
<p>Requests a single Web USB device</p>
|
|
483
|
-
</div>
|
|
484
|
-
</div>
|
|
485
|
-
<h4 class="tsd-parameters-title">Parameters</h4>
|
|
486
|
-
<ul class="tsd-parameters">
|
|
487
|
-
<li>
|
|
488
|
-
<h5><span class="tsd-flag ts-flagOptional">Optional</span> options: <span class="tsd-signature-type">USBDeviceRequestOptions</span></h5>
|
|
489
|
-
<div class="tsd-comment tsd-typography">
|
|
490
|
-
<p>The options to use when scanning</p>
|
|
491
|
-
</div>
|
|
492
|
-
</li>
|
|
493
|
-
</ul>
|
|
494
|
-
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">USBDevice</span><span class="tsd-signature-symbol">></span></h4>
|
|
495
|
-
<p>Promise containing the selected device</p>
|
|
496
|
-
</li>
|
|
497
|
-
</ul>
|
|
498
|
-
</section>
|
|
499
|
-
</section>
|
|
500
|
-
</div>
|
|
501
|
-
<div class="col-4 col-menu menu-sticky-wrap menu-highlight">
|
|
502
|
-
<nav class="tsd-navigation primary">
|
|
503
|
-
<ul>
|
|
504
|
-
<li class=" ">
|
|
505
|
-
<a href="../modules.html">Exports</a>
|
|
506
|
-
</li>
|
|
507
|
-
<li class=" tsd-kind-module">
|
|
508
|
-
<a href="../modules/index.html">index</a>
|
|
509
|
-
</li>
|
|
510
|
-
<li class=" tsd-kind-module">
|
|
511
|
-
<a href="../modules/usb.html">usb</a>
|
|
512
|
-
</li>
|
|
513
|
-
<li class=" tsd-kind-module">
|
|
514
|
-
<a href="../modules/usb_bindings.html">usb/bindings</a>
|
|
515
|
-
</li>
|
|
516
|
-
<li class=" tsd-kind-module">
|
|
517
|
-
<a href="../modules/usb_capability.html">usb/capability</a>
|
|
518
|
-
</li>
|
|
519
|
-
<li class=" tsd-kind-module">
|
|
520
|
-
<a href="../modules/usb_descriptors.html">usb/descriptors</a>
|
|
521
|
-
</li>
|
|
522
|
-
<li class=" tsd-kind-module">
|
|
523
|
-
<a href="../modules/usb_device.html">usb/device</a>
|
|
524
|
-
</li>
|
|
525
|
-
<li class=" tsd-kind-module">
|
|
526
|
-
<a href="../modules/usb_endpoint.html">usb/endpoint</a>
|
|
527
|
-
</li>
|
|
528
|
-
<li class=" tsd-kind-module">
|
|
529
|
-
<a href="../modules/usb_interface.html">usb/interface</a>
|
|
530
|
-
</li>
|
|
531
|
-
<li class="current tsd-kind-module">
|
|
532
|
-
<a href="../modules/webusb.html">webusb</a>
|
|
533
|
-
</li>
|
|
534
|
-
<li class=" tsd-kind-module">
|
|
535
|
-
<a href="../modules/webusb_mutex.html">webusb/mutex</a>
|
|
536
|
-
</li>
|
|
537
|
-
<li class=" tsd-kind-module">
|
|
538
|
-
<a href="../modules/webusb_typed_event_target.html">webusb/typed-<wbr>event-<wbr>target</a>
|
|
539
|
-
</li>
|
|
540
|
-
<li class=" tsd-kind-module">
|
|
541
|
-
<a href="../modules/webusb_webusb_device.html">webusb/webusb-<wbr>device</a>
|
|
542
|
-
</li>
|
|
543
|
-
</ul>
|
|
544
|
-
</nav>
|
|
545
|
-
<nav class="tsd-navigation secondary menu-sticky">
|
|
546
|
-
<ul class="before-current">
|
|
547
|
-
</ul>
|
|
548
|
-
<ul class="current">
|
|
549
|
-
<li class="current tsd-kind-class tsd-parent-kind-module">
|
|
550
|
-
<a href="webusb.webusb-1.html" class="tsd-kind-icon">WebUSB</a>
|
|
551
|
-
<ul>
|
|
552
|
-
<li class=" tsd-kind-constructor tsd-parent-kind-class tsd-is-overwrite">
|
|
553
|
-
<a href="webusb.webusb-1.html#constructor" class="tsd-kind-icon">constructor</a>
|
|
554
|
-
</li>
|
|
555
|
-
<li class=" tsd-kind-set-signature tsd-parent-kind-class">
|
|
556
|
-
<a href="webusb.webusb-1.html#onconnect" class="tsd-kind-icon">onconnect</a>
|
|
557
|
-
</li>
|
|
558
|
-
<li class=" tsd-kind-set-signature tsd-parent-kind-class">
|
|
559
|
-
<a href="webusb.webusb-1.html#ondisconnect" class="tsd-kind-icon">ondisconnect</a>
|
|
560
|
-
</li>
|
|
561
|
-
<li class=" tsd-kind-method tsd-parent-kind-class tsd-is-inherited">
|
|
562
|
-
<a href="webusb.webusb-1.html#addeventlistener" class="tsd-kind-icon">add<wbr>Event<wbr>Listener</a>
|
|
563
|
-
</li>
|
|
564
|
-
<li class=" tsd-kind-method tsd-parent-kind-class tsd-is-inherited">
|
|
565
|
-
<a href="webusb.webusb-1.html#dispatchevent" class="tsd-kind-icon">dispatch<wbr>Event</a>
|
|
566
|
-
</li>
|
|
567
|
-
<li class=" tsd-kind-method tsd-parent-kind-class">
|
|
568
|
-
<a href="webusb.webusb-1.html#getdevices" class="tsd-kind-icon">get<wbr>Devices</a>
|
|
569
|
-
</li>
|
|
570
|
-
<li class=" tsd-kind-method tsd-parent-kind-class tsd-is-inherited">
|
|
571
|
-
<a href="webusb.webusb-1.html#removeeventlistener" class="tsd-kind-icon">remove<wbr>Event<wbr>Listener</a>
|
|
572
|
-
</li>
|
|
573
|
-
<li class=" tsd-kind-method tsd-parent-kind-class">
|
|
574
|
-
<a href="webusb.webusb-1.html#requestdevice" class="tsd-kind-icon">request<wbr>Device</a>
|
|
575
|
-
</li>
|
|
576
|
-
</ul>
|
|
577
|
-
</li>
|
|
578
|
-
</ul>
|
|
579
|
-
<ul class="after-current">
|
|
580
|
-
<li class=" tsd-kind-interface tsd-parent-kind-module">
|
|
581
|
-
<a href="../interfaces/webusb.usboptions.html" class="tsd-kind-icon">USBOptions</a>
|
|
582
|
-
</li>
|
|
583
|
-
</ul>
|
|
584
|
-
</nav>
|
|
585
|
-
</div>
|
|
586
|
-
</div>
|
|
587
|
-
</div>
|
|
588
|
-
<footer>
|
|
589
|
-
<div class="container">
|
|
590
|
-
<h2>Legend</h2>
|
|
591
|
-
<div class="tsd-legend-group">
|
|
592
|
-
<ul class="tsd-legend">
|
|
593
|
-
<li class="tsd-kind-class"><span class="tsd-kind-icon">Class</span></li>
|
|
594
|
-
<li class="tsd-kind-class tsd-has-type-parameter"><span class="tsd-kind-icon">Class with type parameter</span></li>
|
|
595
|
-
<li class="tsd-kind-constructor tsd-parent-kind-class"><span class="tsd-kind-icon">Constructor</span></li>
|
|
596
|
-
<li class="tsd-kind-method tsd-parent-kind-class"><span class="tsd-kind-icon">Method</span></li>
|
|
597
|
-
</ul>
|
|
598
|
-
<ul class="tsd-legend">
|
|
599
|
-
<li class="tsd-kind-variable"><span class="tsd-kind-icon">Variable</span></li>
|
|
600
|
-
<li class="tsd-kind-function"><span class="tsd-kind-icon">Function</span></li>
|
|
601
|
-
<li class="tsd-kind-function tsd-has-type-parameter"><span class="tsd-kind-icon">Function with type parameter</span></li>
|
|
602
|
-
</ul>
|
|
603
|
-
<ul class="tsd-legend">
|
|
604
|
-
<li class="tsd-kind-interface"><span class="tsd-kind-icon">Interface</span></li>
|
|
605
|
-
</ul>
|
|
606
|
-
<ul class="tsd-legend">
|
|
607
|
-
<li class="tsd-kind-method tsd-parent-kind-class tsd-is-inherited"><span class="tsd-kind-icon">Inherited method</span></li>
|
|
608
|
-
</ul>
|
|
609
|
-
</div>
|
|
610
|
-
</div>
|
|
611
|
-
</footer>
|
|
612
|
-
<div class="overlay"></div>
|
|
613
|
-
<script src="../assets/js/main.js"></script>
|
|
614
|
-
</body>
|
|
615
|
-
</html>
|