Implement a polyfill attribute for imports

Allow using imported APIs under alternative names, such as prefixed
names, for web APIs when the exact API differs across browsers.
This commit is contained in:
Alex Crichton
2018-09-28 13:17:37 -07:00
parent 11bcaf42d5
commit 3c14f7a6eb
11 changed files with 172 additions and 2 deletions

View File

@ -87,6 +87,7 @@ pub struct ImportStatic {
pub struct ImportType {
pub name: String,
pub instanceof_shim: String,
pub polyfills: Vec<String>,
}
#[derive(Deserialize, Serialize)]