Method
load
(
&mut self,
ctx: &Ctx<'js>,
name: &str,
_attr: Option<ImportAttributes<'js>>,
)
Source from the content-addressed store, hash-verified
| 143 | |
| 144 | impl Loader for EmbeddedLoader { |
| 145 | fn load<'js>( |
| 146 | &mut self, |
| 147 | ctx: &Ctx<'js>, |
| 148 | name: &str, |
| 149 | _attr: Option<ImportAttributes<'js>>, |
| 150 | ) -> Result<Module<'js>> { |
| 151 | let (module, url) = Self::load_module(name, ctx)?; |
| 152 | if let Some(url) = url { |
| 153 | let meta: Object = module.meta()?; |
| 154 | meta.prop("url", url)?; |
| 155 | } |
| 156 | |
| 157 | Ok(module) |
| 158 | } |
| 159 | } |
| 160 | |
| 161 | #[cfg(test)] |
Tested by
no test coverage detected