Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
getAttribute(attr) {
// TODO
return new ImmutableAccessor(this.node)
}
getAttribute(key) {
return new ImmutableAccessor(this.value[key])
}
getAttribute(key) {
if (key === '_key') {
return new ImmutableAccessor(this.key)
}
if (key === '_id') {
return new ImmutableAccessor(this.value._id)
}
return this.value[key]
}
getAttribute(attr) {
if (attr === '_type') {
return new ImmutableAccessor('textspan')
}
if (attr === 'content') {
return new ImmutableAccessor(this.content)
}
if (attr === 'marks') {
return new ImmutableAccessor(this.marks)
}
throw new Error(`Unknown key "${attr}"`)
}
getAttribute(key) {
if (key == '_id') {
return new ImmutableAccessor(FAKE_ID)
}
if (key == FAKE_KEY) {
return value
}
return null
},
setAttributeAccessor(key, accessor) {
getAttribute(attr) {
if (attr === '_type') {
return new ImmutableAccessor('textspan')
}
if (attr === 'content') {
return new ImmutableAccessor(this.content)
}
if (attr === 'marks') {
return new ImmutableAccessor(this.marks)
}
throw new Error(`Unknown key "${attr}"`)
}
getAttribute(key) {
if (key === '_key') {
return new ImmutableAccessor(this.key)
}
if (key === '_id') {
return new ImmutableAccessor(this.value._id)
}
return this.value[key]
}
getAttribute(attr) {
if (attr === '_type') {
return new ImmutableAccessor('textspan')
}
if (attr === 'content') {
return new ImmutableAccessor(this.content)
}
if (attr === 'marks') {
return new ImmutableAccessor(this.marks)
}
throw new Error(`Unknown key "${attr}"`)
}