mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2024-06-25 23:03:15 +00:00
Add getAttribute to fakeDom
This commit is contained in:
parent
d3ca636a5b
commit
2eb645e5e5
|
@ -49,6 +49,13 @@ Object.defineProperty(TW_Element.prototype, "nodeType", {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
TW_Element.prototype.getAttribute = function(name) {
|
||||||
|
if(this.isRaw) {
|
||||||
|
throw "Cannot getAttribute on a raw TW_Element";
|
||||||
|
}
|
||||||
|
return this.attributes[name];
|
||||||
|
};
|
||||||
|
|
||||||
TW_Element.prototype.setAttribute = function(name,value) {
|
TW_Element.prototype.setAttribute = function(name,value) {
|
||||||
if(this.isRaw) {
|
if(this.isRaw) {
|
||||||
throw "Cannot setAttribute on a raw TW_Element";
|
throw "Cannot setAttribute on a raw TW_Element";
|
||||||
|
|
Loading…
Reference in New Issue
Block a user