1 #![allow(unused_imports)]
2 use super::*;
3 use wasm_bindgen::prelude::*;
4 #[wasm_bindgen]
5 extern "C" {
6     # [wasm_bindgen (extends = :: js_sys :: Object , js_name = PointerEventInit)]
7     #[derive(Debug, Clone, PartialEq, Eq)]
8     #[doc = "The `PointerEventInit` dictionary."]
9     #[doc = ""]
10     #[doc = "*This API requires the following crate features to be activated: `PointerEventInit`*"]
11     pub type PointerEventInit;
12 }
13 impl PointerEventInit {
14     #[doc = "Construct a new `PointerEventInit`."]
15     #[doc = ""]
16     #[doc = "*This API requires the following crate features to be activated: `PointerEventInit`*"]
new() -> Self17     pub fn new() -> Self {
18         #[allow(unused_mut)]
19         let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new());
20         ret
21     }
22     #[doc = "Change the `bubbles` field of this object."]
23     #[doc = ""]
24     #[doc = "*This API requires the following crate features to be activated: `PointerEventInit`*"]
bubbles(&mut self, val: bool) -> &mut Self25     pub fn bubbles(&mut self, val: bool) -> &mut Self {
26         use wasm_bindgen::JsValue;
27         let r = ::js_sys::Reflect::set(
28             self.as_ref(),
29             &JsValue::from("bubbles"),
30             &JsValue::from(val),
31         );
32         debug_assert!(
33             r.is_ok(),
34             "setting properties should never fail on our dictionary objects"
35         );
36         let _ = r;
37         self
38     }
39     #[doc = "Change the `cancelable` field of this object."]
40     #[doc = ""]
41     #[doc = "*This API requires the following crate features to be activated: `PointerEventInit`*"]
cancelable(&mut self, val: bool) -> &mut Self42     pub fn cancelable(&mut self, val: bool) -> &mut Self {
43         use wasm_bindgen::JsValue;
44         let r = ::js_sys::Reflect::set(
45             self.as_ref(),
46             &JsValue::from("cancelable"),
47             &JsValue::from(val),
48         );
49         debug_assert!(
50             r.is_ok(),
51             "setting properties should never fail on our dictionary objects"
52         );
53         let _ = r;
54         self
55     }
56     #[doc = "Change the `composed` field of this object."]
57     #[doc = ""]
58     #[doc = "*This API requires the following crate features to be activated: `PointerEventInit`*"]
composed(&mut self, val: bool) -> &mut Self59     pub fn composed(&mut self, val: bool) -> &mut Self {
60         use wasm_bindgen::JsValue;
61         let r = ::js_sys::Reflect::set(
62             self.as_ref(),
63             &JsValue::from("composed"),
64             &JsValue::from(val),
65         );
66         debug_assert!(
67             r.is_ok(),
68             "setting properties should never fail on our dictionary objects"
69         );
70         let _ = r;
71         self
72     }
73     #[doc = "Change the `detail` field of this object."]
74     #[doc = ""]
75     #[doc = "*This API requires the following crate features to be activated: `PointerEventInit`*"]
detail(&mut self, val: i32) -> &mut Self76     pub fn detail(&mut self, val: i32) -> &mut Self {
77         use wasm_bindgen::JsValue;
78         let r =
79             ::js_sys::Reflect::set(self.as_ref(), &JsValue::from("detail"), &JsValue::from(val));
80         debug_assert!(
81             r.is_ok(),
82             "setting properties should never fail on our dictionary objects"
83         );
84         let _ = r;
85         self
86     }
87     #[cfg(feature = "Window")]
88     #[doc = "Change the `view` field of this object."]
89     #[doc = ""]
90     #[doc = "*This API requires the following crate features to be activated: `PointerEventInit`, `Window`*"]
view(&mut self, val: Option<&Window>) -> &mut Self91     pub fn view(&mut self, val: Option<&Window>) -> &mut Self {
92         use wasm_bindgen::JsValue;
93         let r = ::js_sys::Reflect::set(self.as_ref(), &JsValue::from("view"), &JsValue::from(val));
94         debug_assert!(
95             r.is_ok(),
96             "setting properties should never fail on our dictionary objects"
97         );
98         let _ = r;
99         self
100     }
101     #[doc = "Change the `altKey` field of this object."]
102     #[doc = ""]
103     #[doc = "*This API requires the following crate features to be activated: `PointerEventInit`*"]
alt_key(&mut self, val: bool) -> &mut Self104     pub fn alt_key(&mut self, val: bool) -> &mut Self {
105         use wasm_bindgen::JsValue;
106         let r =
107             ::js_sys::Reflect::set(self.as_ref(), &JsValue::from("altKey"), &JsValue::from(val));
108         debug_assert!(
109             r.is_ok(),
110             "setting properties should never fail on our dictionary objects"
111         );
112         let _ = r;
113         self
114     }
115     #[doc = "Change the `ctrlKey` field of this object."]
116     #[doc = ""]
117     #[doc = "*This API requires the following crate features to be activated: `PointerEventInit`*"]
ctrl_key(&mut self, val: bool) -> &mut Self118     pub fn ctrl_key(&mut self, val: bool) -> &mut Self {
119         use wasm_bindgen::JsValue;
120         let r = ::js_sys::Reflect::set(
121             self.as_ref(),
122             &JsValue::from("ctrlKey"),
123             &JsValue::from(val),
124         );
125         debug_assert!(
126             r.is_ok(),
127             "setting properties should never fail on our dictionary objects"
128         );
129         let _ = r;
130         self
131     }
132     #[doc = "Change the `metaKey` field of this object."]
133     #[doc = ""]
134     #[doc = "*This API requires the following crate features to be activated: `PointerEventInit`*"]
meta_key(&mut self, val: bool) -> &mut Self135     pub fn meta_key(&mut self, val: bool) -> &mut Self {
136         use wasm_bindgen::JsValue;
137         let r = ::js_sys::Reflect::set(
138             self.as_ref(),
139             &JsValue::from("metaKey"),
140             &JsValue::from(val),
141         );
142         debug_assert!(
143             r.is_ok(),
144             "setting properties should never fail on our dictionary objects"
145         );
146         let _ = r;
147         self
148     }
149     #[doc = "Change the `modifierAltGraph` field of this object."]
150     #[doc = ""]
151     #[doc = "*This API requires the following crate features to be activated: `PointerEventInit`*"]
modifier_alt_graph(&mut self, val: bool) -> &mut Self152     pub fn modifier_alt_graph(&mut self, val: bool) -> &mut Self {
153         use wasm_bindgen::JsValue;
154         let r = ::js_sys::Reflect::set(
155             self.as_ref(),
156             &JsValue::from("modifierAltGraph"),
157             &JsValue::from(val),
158         );
159         debug_assert!(
160             r.is_ok(),
161             "setting properties should never fail on our dictionary objects"
162         );
163         let _ = r;
164         self
165     }
166     #[doc = "Change the `modifierCapsLock` field of this object."]
167     #[doc = ""]
168     #[doc = "*This API requires the following crate features to be activated: `PointerEventInit`*"]
modifier_caps_lock(&mut self, val: bool) -> &mut Self169     pub fn modifier_caps_lock(&mut self, val: bool) -> &mut Self {
170         use wasm_bindgen::JsValue;
171         let r = ::js_sys::Reflect::set(
172             self.as_ref(),
173             &JsValue::from("modifierCapsLock"),
174             &JsValue::from(val),
175         );
176         debug_assert!(
177             r.is_ok(),
178             "setting properties should never fail on our dictionary objects"
179         );
180         let _ = r;
181         self
182     }
183     #[doc = "Change the `modifierFn` field of this object."]
184     #[doc = ""]
185     #[doc = "*This API requires the following crate features to be activated: `PointerEventInit`*"]
modifier_fn(&mut self, val: bool) -> &mut Self186     pub fn modifier_fn(&mut self, val: bool) -> &mut Self {
187         use wasm_bindgen::JsValue;
188         let r = ::js_sys::Reflect::set(
189             self.as_ref(),
190             &JsValue::from("modifierFn"),
191             &JsValue::from(val),
192         );
193         debug_assert!(
194             r.is_ok(),
195             "setting properties should never fail on our dictionary objects"
196         );
197         let _ = r;
198         self
199     }
200     #[doc = "Change the `modifierFnLock` field of this object."]
201     #[doc = ""]
202     #[doc = "*This API requires the following crate features to be activated: `PointerEventInit`*"]
modifier_fn_lock(&mut self, val: bool) -> &mut Self203     pub fn modifier_fn_lock(&mut self, val: bool) -> &mut Self {
204         use wasm_bindgen::JsValue;
205         let r = ::js_sys::Reflect::set(
206             self.as_ref(),
207             &JsValue::from("modifierFnLock"),
208             &JsValue::from(val),
209         );
210         debug_assert!(
211             r.is_ok(),
212             "setting properties should never fail on our dictionary objects"
213         );
214         let _ = r;
215         self
216     }
217     #[doc = "Change the `modifierNumLock` field of this object."]
218     #[doc = ""]
219     #[doc = "*This API requires the following crate features to be activated: `PointerEventInit`*"]
modifier_num_lock(&mut self, val: bool) -> &mut Self220     pub fn modifier_num_lock(&mut self, val: bool) -> &mut Self {
221         use wasm_bindgen::JsValue;
222         let r = ::js_sys::Reflect::set(
223             self.as_ref(),
224             &JsValue::from("modifierNumLock"),
225             &JsValue::from(val),
226         );
227         debug_assert!(
228             r.is_ok(),
229             "setting properties should never fail on our dictionary objects"
230         );
231         let _ = r;
232         self
233     }
234     #[doc = "Change the `modifierOS` field of this object."]
235     #[doc = ""]
236     #[doc = "*This API requires the following crate features to be activated: `PointerEventInit`*"]
modifier_os(&mut self, val: bool) -> &mut Self237     pub fn modifier_os(&mut self, val: bool) -> &mut Self {
238         use wasm_bindgen::JsValue;
239         let r = ::js_sys::Reflect::set(
240             self.as_ref(),
241             &JsValue::from("modifierOS"),
242             &JsValue::from(val),
243         );
244         debug_assert!(
245             r.is_ok(),
246             "setting properties should never fail on our dictionary objects"
247         );
248         let _ = r;
249         self
250     }
251     #[doc = "Change the `modifierScrollLock` field of this object."]
252     #[doc = ""]
253     #[doc = "*This API requires the following crate features to be activated: `PointerEventInit`*"]
modifier_scroll_lock(&mut self, val: bool) -> &mut Self254     pub fn modifier_scroll_lock(&mut self, val: bool) -> &mut Self {
255         use wasm_bindgen::JsValue;
256         let r = ::js_sys::Reflect::set(
257             self.as_ref(),
258             &JsValue::from("modifierScrollLock"),
259             &JsValue::from(val),
260         );
261         debug_assert!(
262             r.is_ok(),
263             "setting properties should never fail on our dictionary objects"
264         );
265         let _ = r;
266         self
267     }
268     #[doc = "Change the `modifierSymbol` field of this object."]
269     #[doc = ""]
270     #[doc = "*This API requires the following crate features to be activated: `PointerEventInit`*"]
modifier_symbol(&mut self, val: bool) -> &mut Self271     pub fn modifier_symbol(&mut self, val: bool) -> &mut Self {
272         use wasm_bindgen::JsValue;
273         let r = ::js_sys::Reflect::set(
274             self.as_ref(),
275             &JsValue::from("modifierSymbol"),
276             &JsValue::from(val),
277         );
278         debug_assert!(
279             r.is_ok(),
280             "setting properties should never fail on our dictionary objects"
281         );
282         let _ = r;
283         self
284     }
285     #[doc = "Change the `modifierSymbolLock` field of this object."]
286     #[doc = ""]
287     #[doc = "*This API requires the following crate features to be activated: `PointerEventInit`*"]
modifier_symbol_lock(&mut self, val: bool) -> &mut Self288     pub fn modifier_symbol_lock(&mut self, val: bool) -> &mut Self {
289         use wasm_bindgen::JsValue;
290         let r = ::js_sys::Reflect::set(
291             self.as_ref(),
292             &JsValue::from("modifierSymbolLock"),
293             &JsValue::from(val),
294         );
295         debug_assert!(
296             r.is_ok(),
297             "setting properties should never fail on our dictionary objects"
298         );
299         let _ = r;
300         self
301     }
302     #[doc = "Change the `shiftKey` field of this object."]
303     #[doc = ""]
304     #[doc = "*This API requires the following crate features to be activated: `PointerEventInit`*"]
shift_key(&mut self, val: bool) -> &mut Self305     pub fn shift_key(&mut self, val: bool) -> &mut Self {
306         use wasm_bindgen::JsValue;
307         let r = ::js_sys::Reflect::set(
308             self.as_ref(),
309             &JsValue::from("shiftKey"),
310             &JsValue::from(val),
311         );
312         debug_assert!(
313             r.is_ok(),
314             "setting properties should never fail on our dictionary objects"
315         );
316         let _ = r;
317         self
318     }
319     #[doc = "Change the `button` field of this object."]
320     #[doc = ""]
321     #[doc = "*This API requires the following crate features to be activated: `PointerEventInit`*"]
button(&mut self, val: i16) -> &mut Self322     pub fn button(&mut self, val: i16) -> &mut Self {
323         use wasm_bindgen::JsValue;
324         let r =
325             ::js_sys::Reflect::set(self.as_ref(), &JsValue::from("button"), &JsValue::from(val));
326         debug_assert!(
327             r.is_ok(),
328             "setting properties should never fail on our dictionary objects"
329         );
330         let _ = r;
331         self
332     }
333     #[doc = "Change the `buttons` field of this object."]
334     #[doc = ""]
335     #[doc = "*This API requires the following crate features to be activated: `PointerEventInit`*"]
buttons(&mut self, val: u16) -> &mut Self336     pub fn buttons(&mut self, val: u16) -> &mut Self {
337         use wasm_bindgen::JsValue;
338         let r = ::js_sys::Reflect::set(
339             self.as_ref(),
340             &JsValue::from("buttons"),
341             &JsValue::from(val),
342         );
343         debug_assert!(
344             r.is_ok(),
345             "setting properties should never fail on our dictionary objects"
346         );
347         let _ = r;
348         self
349     }
350     #[doc = "Change the `clientX` field of this object."]
351     #[doc = ""]
352     #[doc = "*This API requires the following crate features to be activated: `PointerEventInit`*"]
client_x(&mut self, val: i32) -> &mut Self353     pub fn client_x(&mut self, val: i32) -> &mut Self {
354         use wasm_bindgen::JsValue;
355         let r = ::js_sys::Reflect::set(
356             self.as_ref(),
357             &JsValue::from("clientX"),
358             &JsValue::from(val),
359         );
360         debug_assert!(
361             r.is_ok(),
362             "setting properties should never fail on our dictionary objects"
363         );
364         let _ = r;
365         self
366     }
367     #[doc = "Change the `clientY` field of this object."]
368     #[doc = ""]
369     #[doc = "*This API requires the following crate features to be activated: `PointerEventInit`*"]
client_y(&mut self, val: i32) -> &mut Self370     pub fn client_y(&mut self, val: i32) -> &mut Self {
371         use wasm_bindgen::JsValue;
372         let r = ::js_sys::Reflect::set(
373             self.as_ref(),
374             &JsValue::from("clientY"),
375             &JsValue::from(val),
376         );
377         debug_assert!(
378             r.is_ok(),
379             "setting properties should never fail on our dictionary objects"
380         );
381         let _ = r;
382         self
383     }
384     #[doc = "Change the `movementX` field of this object."]
385     #[doc = ""]
386     #[doc = "*This API requires the following crate features to be activated: `PointerEventInit`*"]
movement_x(&mut self, val: i32) -> &mut Self387     pub fn movement_x(&mut self, val: i32) -> &mut Self {
388         use wasm_bindgen::JsValue;
389         let r = ::js_sys::Reflect::set(
390             self.as_ref(),
391             &JsValue::from("movementX"),
392             &JsValue::from(val),
393         );
394         debug_assert!(
395             r.is_ok(),
396             "setting properties should never fail on our dictionary objects"
397         );
398         let _ = r;
399         self
400     }
401     #[doc = "Change the `movementY` field of this object."]
402     #[doc = ""]
403     #[doc = "*This API requires the following crate features to be activated: `PointerEventInit`*"]
movement_y(&mut self, val: i32) -> &mut Self404     pub fn movement_y(&mut self, val: i32) -> &mut Self {
405         use wasm_bindgen::JsValue;
406         let r = ::js_sys::Reflect::set(
407             self.as_ref(),
408             &JsValue::from("movementY"),
409             &JsValue::from(val),
410         );
411         debug_assert!(
412             r.is_ok(),
413             "setting properties should never fail on our dictionary objects"
414         );
415         let _ = r;
416         self
417     }
418     #[cfg(feature = "EventTarget")]
419     #[doc = "Change the `relatedTarget` field of this object."]
420     #[doc = ""]
421     #[doc = "*This API requires the following crate features to be activated: `EventTarget`, `PointerEventInit`*"]
related_target(&mut self, val: Option<&EventTarget>) -> &mut Self422     pub fn related_target(&mut self, val: Option<&EventTarget>) -> &mut Self {
423         use wasm_bindgen::JsValue;
424         let r = ::js_sys::Reflect::set(
425             self.as_ref(),
426             &JsValue::from("relatedTarget"),
427             &JsValue::from(val),
428         );
429         debug_assert!(
430             r.is_ok(),
431             "setting properties should never fail on our dictionary objects"
432         );
433         let _ = r;
434         self
435     }
436     #[doc = "Change the `screenX` field of this object."]
437     #[doc = ""]
438     #[doc = "*This API requires the following crate features to be activated: `PointerEventInit`*"]
screen_x(&mut self, val: i32) -> &mut Self439     pub fn screen_x(&mut self, val: i32) -> &mut Self {
440         use wasm_bindgen::JsValue;
441         let r = ::js_sys::Reflect::set(
442             self.as_ref(),
443             &JsValue::from("screenX"),
444             &JsValue::from(val),
445         );
446         debug_assert!(
447             r.is_ok(),
448             "setting properties should never fail on our dictionary objects"
449         );
450         let _ = r;
451         self
452     }
453     #[doc = "Change the `screenY` field of this object."]
454     #[doc = ""]
455     #[doc = "*This API requires the following crate features to be activated: `PointerEventInit`*"]
screen_y(&mut self, val: i32) -> &mut Self456     pub fn screen_y(&mut self, val: i32) -> &mut Self {
457         use wasm_bindgen::JsValue;
458         let r = ::js_sys::Reflect::set(
459             self.as_ref(),
460             &JsValue::from("screenY"),
461             &JsValue::from(val),
462         );
463         debug_assert!(
464             r.is_ok(),
465             "setting properties should never fail on our dictionary objects"
466         );
467         let _ = r;
468         self
469     }
470     #[doc = "Change the `coalescedEvents` field of this object."]
471     #[doc = ""]
472     #[doc = "*This API requires the following crate features to be activated: `PointerEventInit`*"]
coalesced_events(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self473     pub fn coalesced_events(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self {
474         use wasm_bindgen::JsValue;
475         let r = ::js_sys::Reflect::set(
476             self.as_ref(),
477             &JsValue::from("coalescedEvents"),
478             &JsValue::from(val),
479         );
480         debug_assert!(
481             r.is_ok(),
482             "setting properties should never fail on our dictionary objects"
483         );
484         let _ = r;
485         self
486     }
487     #[doc = "Change the `height` field of this object."]
488     #[doc = ""]
489     #[doc = "*This API requires the following crate features to be activated: `PointerEventInit`*"]
height(&mut self, val: i32) -> &mut Self490     pub fn height(&mut self, val: i32) -> &mut Self {
491         use wasm_bindgen::JsValue;
492         let r =
493             ::js_sys::Reflect::set(self.as_ref(), &JsValue::from("height"), &JsValue::from(val));
494         debug_assert!(
495             r.is_ok(),
496             "setting properties should never fail on our dictionary objects"
497         );
498         let _ = r;
499         self
500     }
501     #[doc = "Change the `isPrimary` field of this object."]
502     #[doc = ""]
503     #[doc = "*This API requires the following crate features to be activated: `PointerEventInit`*"]
is_primary(&mut self, val: bool) -> &mut Self504     pub fn is_primary(&mut self, val: bool) -> &mut Self {
505         use wasm_bindgen::JsValue;
506         let r = ::js_sys::Reflect::set(
507             self.as_ref(),
508             &JsValue::from("isPrimary"),
509             &JsValue::from(val),
510         );
511         debug_assert!(
512             r.is_ok(),
513             "setting properties should never fail on our dictionary objects"
514         );
515         let _ = r;
516         self
517     }
518     #[doc = "Change the `pointerId` field of this object."]
519     #[doc = ""]
520     #[doc = "*This API requires the following crate features to be activated: `PointerEventInit`*"]
pointer_id(&mut self, val: i32) -> &mut Self521     pub fn pointer_id(&mut self, val: i32) -> &mut Self {
522         use wasm_bindgen::JsValue;
523         let r = ::js_sys::Reflect::set(
524             self.as_ref(),
525             &JsValue::from("pointerId"),
526             &JsValue::from(val),
527         );
528         debug_assert!(
529             r.is_ok(),
530             "setting properties should never fail on our dictionary objects"
531         );
532         let _ = r;
533         self
534     }
535     #[doc = "Change the `pointerType` field of this object."]
536     #[doc = ""]
537     #[doc = "*This API requires the following crate features to be activated: `PointerEventInit`*"]
pointer_type(&mut self, val: &str) -> &mut Self538     pub fn pointer_type(&mut self, val: &str) -> &mut Self {
539         use wasm_bindgen::JsValue;
540         let r = ::js_sys::Reflect::set(
541             self.as_ref(),
542             &JsValue::from("pointerType"),
543             &JsValue::from(val),
544         );
545         debug_assert!(
546             r.is_ok(),
547             "setting properties should never fail on our dictionary objects"
548         );
549         let _ = r;
550         self
551     }
552     #[doc = "Change the `pressure` field of this object."]
553     #[doc = ""]
554     #[doc = "*This API requires the following crate features to be activated: `PointerEventInit`*"]
pressure(&mut self, val: f32) -> &mut Self555     pub fn pressure(&mut self, val: f32) -> &mut Self {
556         use wasm_bindgen::JsValue;
557         let r = ::js_sys::Reflect::set(
558             self.as_ref(),
559             &JsValue::from("pressure"),
560             &JsValue::from(val),
561         );
562         debug_assert!(
563             r.is_ok(),
564             "setting properties should never fail on our dictionary objects"
565         );
566         let _ = r;
567         self
568     }
569     #[doc = "Change the `tangentialPressure` field of this object."]
570     #[doc = ""]
571     #[doc = "*This API requires the following crate features to be activated: `PointerEventInit`*"]
tangential_pressure(&mut self, val: f32) -> &mut Self572     pub fn tangential_pressure(&mut self, val: f32) -> &mut Self {
573         use wasm_bindgen::JsValue;
574         let r = ::js_sys::Reflect::set(
575             self.as_ref(),
576             &JsValue::from("tangentialPressure"),
577             &JsValue::from(val),
578         );
579         debug_assert!(
580             r.is_ok(),
581             "setting properties should never fail on our dictionary objects"
582         );
583         let _ = r;
584         self
585     }
586     #[doc = "Change the `tiltX` field of this object."]
587     #[doc = ""]
588     #[doc = "*This API requires the following crate features to be activated: `PointerEventInit`*"]
tilt_x(&mut self, val: i32) -> &mut Self589     pub fn tilt_x(&mut self, val: i32) -> &mut Self {
590         use wasm_bindgen::JsValue;
591         let r = ::js_sys::Reflect::set(self.as_ref(), &JsValue::from("tiltX"), &JsValue::from(val));
592         debug_assert!(
593             r.is_ok(),
594             "setting properties should never fail on our dictionary objects"
595         );
596         let _ = r;
597         self
598     }
599     #[doc = "Change the `tiltY` field of this object."]
600     #[doc = ""]
601     #[doc = "*This API requires the following crate features to be activated: `PointerEventInit`*"]
tilt_y(&mut self, val: i32) -> &mut Self602     pub fn tilt_y(&mut self, val: i32) -> &mut Self {
603         use wasm_bindgen::JsValue;
604         let r = ::js_sys::Reflect::set(self.as_ref(), &JsValue::from("tiltY"), &JsValue::from(val));
605         debug_assert!(
606             r.is_ok(),
607             "setting properties should never fail on our dictionary objects"
608         );
609         let _ = r;
610         self
611     }
612     #[doc = "Change the `twist` field of this object."]
613     #[doc = ""]
614     #[doc = "*This API requires the following crate features to be activated: `PointerEventInit`*"]
twist(&mut self, val: i32) -> &mut Self615     pub fn twist(&mut self, val: i32) -> &mut Self {
616         use wasm_bindgen::JsValue;
617         let r = ::js_sys::Reflect::set(self.as_ref(), &JsValue::from("twist"), &JsValue::from(val));
618         debug_assert!(
619             r.is_ok(),
620             "setting properties should never fail on our dictionary objects"
621         );
622         let _ = r;
623         self
624     }
625     #[doc = "Change the `width` field of this object."]
626     #[doc = ""]
627     #[doc = "*This API requires the following crate features to be activated: `PointerEventInit`*"]
width(&mut self, val: i32) -> &mut Self628     pub fn width(&mut self, val: i32) -> &mut Self {
629         use wasm_bindgen::JsValue;
630         let r = ::js_sys::Reflect::set(self.as_ref(), &JsValue::from("width"), &JsValue::from(val));
631         debug_assert!(
632             r.is_ok(),
633             "setting properties should never fail on our dictionary objects"
634         );
635         let _ = r;
636         self
637     }
638 }
639 impl Default for PointerEventInit {
default() -> Self640     fn default() -> Self {
641         Self::new()
642     }
643 }
644