Open
Description
Can I ask what is metadata exactly? I haven't found anywhere any good description, only methods JsDoc.
According to Metadata Proposal you offer to add to any JS Object unreachable property [[Metadata]]. But anyone could read and write to it with specialized methods? Like 'defineMetadata', 'getOwnMetadata'? So it is more like getter/setter from OOP without direct access to property.
So I can make something like this to copy the behavior?
//structure will look like:
const obj = {};
obj['Metadata'] = {
customProperty1: {
property: 'someValue'
}
}
// Methods would look like this:
Object.prototype.defineMetadata = function(metadataKey, metadataValue, target, key) {
this['metadata'][metadataKey] = {key: metadataValue};
}
Metadata
Metadata
Assignees
Labels
No labels