mirror of
https://github.com/denoland/deno.git
synced 2024-10-31 09:14:20 -04:00
27 lines
641 B
JavaScript
27 lines
641 B
JavaScript
|
// Copyright 2018-2021 the Deno authors. All rights reserved. MIT license.
|
||
|
"use strict";
|
||
|
|
||
|
((window) => {
|
||
|
const webidl = window.__bootstrap.webidl;
|
||
|
webidl.converters["AlgorithmIdentifier"] = (V, opts) => {
|
||
|
// Union for (object or DOMString)
|
||
|
if (typeof V == "object") {
|
||
|
return webidl.converters["object"](V, opts);
|
||
|
}
|
||
|
|
||
|
return webidl.converters["DOMString"](V, opts);
|
||
|
};
|
||
|
|
||
|
const algorithmDictionary = [
|
||
|
{
|
||
|
key: "name",
|
||
|
converter: webidl.converters["DOMString"],
|
||
|
},
|
||
|
];
|
||
|
|
||
|
webidl.converters["Algorithm"] = webidl.createDictionaryConverter(
|
||
|
"Algorithm",
|
||
|
algorithmDictionary,
|
||
|
);
|
||
|
})(this);
|