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 = CanvasGradient , typescript_type = "CanvasGradient")] 7 #[derive(Debug, Clone, PartialEq, Eq)] 8 #[doc = "The `CanvasGradient` class."] 9 #[doc = ""] 10 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/CanvasGradient)"] 11 #[doc = ""] 12 #[doc = "*This API requires the following crate features to be activated: `CanvasGradient`*"] 13 pub type CanvasGradient; 14 # [wasm_bindgen (catch , method , structural , js_class = "CanvasGradient" , js_name = addColorStop)] 15 #[doc = "The `addColorStop()` method."] 16 #[doc = ""] 17 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/CanvasGradient/addColorStop)"] 18 #[doc = ""] 19 #[doc = "*This API requires the following crate features to be activated: `CanvasGradient`*"] add_color_stop(this: &CanvasGradient, offset: f32, color: &str) -> Result<(), JsValue>20 pub fn add_color_stop(this: &CanvasGradient, offset: f32, color: &str) -> Result<(), JsValue>; 21 } 22