Add a test for webidl

This commit is contained in:
Anton Danilkin
2018-08-07 00:42:47 +03:00
parent e70c9015ff
commit 3ad5493d23
3 changed files with 32 additions and 1 deletions

View File

@ -93,6 +93,20 @@ global.GlobalMethod = class GlobalMethod {
}
};
global.Indexing = function () {
return new Proxy({}, {
get(obj, prop) {
return obj.hasOwnProperty(prop) ? obj[prop] : -1;
},
set(obj, prop, value) {
obj[prop] = value;
},
deleteProperty(obj, prop) {
delete obj[prop];
},
});
};
global.PartialInterface = class PartialInterface {
get un() {
return 1;