Created
May 14, 2010 04:25
-
-
Save tmpvar/400812 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
core.Entity = function(document, name) { | |
core.Node.call(this, document); | |
this._name = name; | |
this._nodeName = name; | |
this._tagName = name; | |
this._publicId = null; | |
this._systemId = null; | |
this._notationName = null; | |
this._nodeType = this.ENTITY_NODE; | |
this._readonly = true; | |
}; | |
core.Entity.prototype = { | |
get nodeValue() { return null; }, | |
set nodeValue() { | |
// readonly | |
if (this.readonly === true) { | |
// TODO: is this needed? | |
// throw new DOMException(NO_MODIFICATION_ALLOWED_ERR); | |
} | |
/* do nothing */ | |
}, | |
get name() { return this._name }, | |
get publicId() { return this._publicId; }, | |
get systemId() { return this._systemId; }, | |
set publicId(publicId) { this._publicId = publicId; }, | |
set systemId(systemId) { this._systemId = systemId; }, | |
set notationName(notationName) { this._notationName = notationName; }, | |
get notationName() { return this._notationName; }, | |
get nodeType() { return this.ENTITY_NODE; }, | |
get attributes() { return null; }, | |
}; | |
core.Entity.prototype.__proto__ = core.Node.prototype; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment