diff --git a/CHANGELOG.md b/CHANGELOG.md index 37034050cca..55e4c765929 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,9 +12,10 @@ * `TypedArray::new_from_slice(&[T])` constructor that allows to create a JS-owned `TypedArray` from a Rust slice. [#4555](https://github.com/wasm-bindgen/wasm-bindgen/pull/4555) - * Added `Function::call4` and `Function::bind4` through `Function::call9` `Function::bind9` methods for calling and binding JavaScript functions with 4-9 arguments. [#4572](https://github.com/wasm-bindgen/wasm-bindgen/pull/4572) +* Added isPointInFill and isPointInStroke methods for the SVGGeometryElement idl. + [#4509](https://github.com/wasm-bindgen/wasm-bindgen/pull/4509) ### Changed diff --git a/crates/web-sys/src/features/gen_SvgGeometryElement.rs b/crates/web-sys/src/features/gen_SvgGeometryElement.rs index b31cba8f7de..6b96d1d8ef2 100644 --- a/crates/web-sys/src/features/gen_SvgGeometryElement.rs +++ b/crates/web-sys/src/features/gen_SvgGeometryElement.rs @@ -38,4 +38,34 @@ extern "C" { #[doc = ""] #[doc = "*This API requires the following crate features to be activated: `SvgGeometryElement`*"] pub fn get_total_length(this: &SvgGeometryElement) -> f32; + # [wasm_bindgen (method , structural , js_class = "SVGGeometryElement" , js_name = isPointInFill)] + #[doc = "The `isPointInFill()` method."] + #[doc = ""] + #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/SVGGeometryElement/isPointInFill)"] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `SvgGeometryElement`*"] + pub fn is_point_in_fill(this: &SvgGeometryElement) -> bool; + #[cfg(feature = "DomPointInit")] + # [wasm_bindgen (method , structural , js_class = "SVGGeometryElement" , js_name = isPointInFill)] + #[doc = "The `isPointInFill()` method."] + #[doc = ""] + #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/SVGGeometryElement/isPointInFill)"] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DomPointInit`, `SvgGeometryElement`*"] + pub fn is_point_in_fill_with_point(this: &SvgGeometryElement, point: &DomPointInit) -> bool; + # [wasm_bindgen (method , structural , js_class = "SVGGeometryElement" , js_name = isPointInStroke)] + #[doc = "The `isPointInStroke()` method."] + #[doc = ""] + #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/SVGGeometryElement/isPointInStroke)"] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `SvgGeometryElement`*"] + pub fn is_point_in_stroke(this: &SvgGeometryElement) -> bool; + #[cfg(feature = "DomPointInit")] + # [wasm_bindgen (method , structural , js_class = "SVGGeometryElement" , js_name = isPointInStroke)] + #[doc = "The `isPointInStroke()` method."] + #[doc = ""] + #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/SVGGeometryElement/isPointInStroke)"] + #[doc = ""] + #[doc = "*This API requires the following crate features to be activated: `DomPointInit`, `SvgGeometryElement`*"] + pub fn is_point_in_stroke_with_point(this: &SvgGeometryElement, point: &DomPointInit) -> bool; } diff --git a/crates/web-sys/webidls/enabled/SVGGeometryElement.webidl b/crates/web-sys/webidls/enabled/SVGGeometryElement.webidl index 28029794c67..305feb31a73 100644 --- a/crates/web-sys/webidls/enabled/SVGGeometryElement.webidl +++ b/crates/web-sys/webidls/enabled/SVGGeometryElement.webidl @@ -17,4 +17,7 @@ interface SVGGeometryElement : SVGGraphicsElement { float getTotalLength(); [NewObject, Throws] SVGPoint getPointAtLength(float distance); + + boolean isPointInFill(optional DOMPointInit point); + boolean isPointInStroke(optional DOMPointInit point); };