mirror of
https://github.com/servo/servo.git
synced 2025-08-03 20:50:07 +01:00
frozen array in XRInputSourcesChangeEvent, update to_frozen_array
doc (#34100)
* frozen array in XRInputSourcesChangeEvent, update o_frozen_array doc Signed-off-by: L Ashwin B <lashwinib@gmail.com> * simplified changes Signed-off-by: L Ashwin B <lashwinib@gmail.com> * added tests Signed-off-by: L Ashwin B <lashwinib@gmail.com> --------- Signed-off-by: L Ashwin B <lashwinib@gmail.com>
This commit is contained in:
parent
f47cc927a0
commit
900d13fc2f
4 changed files with 18 additions and 13 deletions
|
@ -116,7 +116,7 @@ impl Clone for DOMJSClass {
|
|||
}
|
||||
unsafe impl Sync for DOMJSClass {}
|
||||
|
||||
/// Returns a JSVal representing a frozen array of ports
|
||||
/// Returns a JSVal representing the frozen JavaScript array
|
||||
pub fn to_frozen_array<T: ToJSValConvertible>(convertibles: &[T], cx: SafeJSContext) -> JSVal {
|
||||
rooted!(in(*cx) let mut ports = UndefinedValue());
|
||||
unsafe { convertibles.to_jsval(*cx, ports.handle_mut()) };
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue