main
Last change
on this file was d24f17c, checked in by Aleksandar Panovski <apano77@…>, 15 months ago |
Initial commit
|
-
Property mode
set to
100644
|
File size:
345 bytes
|
Line | |
---|
1 | const Element = require('./Element');
|
---|
2 |
|
---|
3 | /**
|
---|
4 | */
|
---|
5 | class NullElement extends Element {
|
---|
6 | constructor(content, meta, attributes) {
|
---|
7 | super(content || null, meta, attributes);
|
---|
8 | this.element = 'null';
|
---|
9 | }
|
---|
10 |
|
---|
11 | primitive() {
|
---|
12 | return 'null';
|
---|
13 | }
|
---|
14 |
|
---|
15 | set() {
|
---|
16 | return new Error('Cannot set the value of null');
|
---|
17 | }
|
---|
18 | }
|
---|
19 |
|
---|
20 | module.exports = NullElement;
|
---|
Note:
See
TracBrowser
for help on using the repository browser.