*/
};
(function(t) {
+/*マジックナンバーは軽量化のため原則コメントで記述するのみ
t.INDEX_SIZE_ERR = 1;
t.DOMSTRING_SIZE_ERR = 2;
t.HIERARCHY_REQUEST_ERR = 3;
t.SYNTAX_ERR = 12;
t.INVALID_MODIFICATION_ERR = 13;
t.NAMESPACE_ERR = 14;
-t.INVALID_ACCESS_ERR = 15;
+t.INVALID_ACCESS_ERR = 15;*/
t.prototype = new Error();
})(DOMException);
if (tp) {
while (!tp) { //先祖をたどっていく
if (tp === n) { //先祖要素が追加ノードならばエラー
- throw (new DOMException(DOMException.HIERARCHY_REQUEST_ERR));
+ throw (new DOMException(/*DOMException.HIERARCHY_REQUEST_ERR*/ 3));
}
tp = tp.parentNode;
}
}
if (this.ownerDocument !== n.ownerDocument) { //所属Documentの生成元が違うならば
- throw (new DOMException(DOMException.WRONG_DOCUMENT_ERR));
+ throw (new DOMException(/*DOMException.WRONG_DOCUMENT_ERR*/ 4));
}
if (np === this) { //入力した要素が子要素ならば
this.removeChild(n);
}
} else {
if (ref.parentNode !== this) { //参照ノードが子要素でない場合
- throw (new DOMException(DOMException.NOT_FOUND_ERR));
+ throw (new DOMException(/*DOMException.NOT_FOUND_ERR*/ 8));
}
this.childNodes.splice(ref._num,1,n,ref); //Arrayのspliceを利用して、リストにnノードを追加
rp = ref.previousSibling;
ele.previousSibling && (ele.previousSibling.nextSibling = ele.nextSibling);
ele.nextSibling && (ele.nextSibling.previousSibling = ele.previousSibling);
} else { //親が違う場合
- throw (new DOMException(DOMException.NOT_FOUND_ERR));
+ throw (new DOMException(/*DOMException.NOT_FOUND_ERR*/ 8));
}
if (ele.ownerDocument !== this.ownerDocument) { //所属ドキュメントが違う場合
throw (new Error());
return s;
} else {
if (arg.ownerElement !== void 0) { //ノードがもはや別の要素で使われている
- throw (new DOMException(DOMException.INUSE_ATTRIBUTE_ERR));
+ throw (new DOMException(/*DOMException.INUSE_ATTRIBUTE_ERR*/ 10));
}
this[this.length] = arg; //新たに、argを項目として追加する
this.length += 1;
/*Node*/ removeNamedItemNS : function(/*string*/ namespaceURI, /*string*/ localName) {
var tgans = this.getNamedItemNS(namespaceURI, localName);
if (!tgans) { //ノードが見当たらない場合、
- throw (new DOMException(DOMException.NOT_FOUND_ERR));
+ throw (new DOMException(/*DOMException.NOT_FOUND_ERR*/ 8));
} else {
var s = this[this._num];
delete (this[this._num]);
*/
/*string*/ CharacterData.prototype.substringData = function(/*long*/ offset, /*long*/ count) {
if (offset < 0 || count < 0 || offset > this.length) { //値が負か、データの長さよりoffsetが長いとき、サイズエラーを起こす
- throw (new DOMException(INDEX_SIZE_ERR));
+ throw (new DOMException(/*INDEX_SIZE_ERR*/ 1));
}
if (offset + count > this.length) { //offsetとcountの和が文字全体の長さを超える場合、offsetから最後までのを取り出す
count = this.length - offset;
};
/*void*/ CharacterData.prototype.replaceData = function( /*long*/ offset, /*long*/ count, /*string*/ arg) {
if (offset < 0 || count < 0 || offset > this.length) { //値が負か、データの長さよりoffsetが長いとき、サイズエラーを起こす
- throw (new DOMException(INDEX_SIZE_ERR));
+ throw (new DOMException(/*INDEX_SIZE_ERR*/ 1));
}
this.deleteData(offset, count);
this.insertData(offset, arg);
};
/*Attr*/ Element.prototype.setAttributeNodeNS = function( /*Attr*/ newAttr){
if (newAttr.ownerDocument !== this.ownerDocument) { //所属ドキュメントが違う場合
- throw (new DOMException(DOMException.WRONG_DOCUMENT_ERR));
+ throw (new DOMException(/*DOMException.WRONG_DOCUMENT_ERR*/ 4));
}
var s = this.attributes.setNamedItemNS(newAttr);
newAttr.ownerElement = this;
s.publicId = importedNode.publicId;
s.systemId = importedNode.systemId;
} else {
- throw (new DOMException(DOMException.NOT_SUPPORTED_ERR));
+ throw (new DOMException(/*DOMException.NOT_SUPPORTED_ERR*/ 9));
}
importedNode = deep = imn = attr = att = fi = n = uri = ch = void 0;
return s;
prefix = null,
localName = null;
if (!qualifiedName) {
- throw (new DOMException(DOMException.INVALID_CHARACTER_ERR));
+ throw (new DOMException(/*DOMException.INVALID_CHARACTER_ERR*/ 5));
}
if (qualifiedName.indexOf(":") !== -1){
var p = qualifiedName.split(":");
this._em = this._ex = this["_%"] = null; //emが単位の場合、getComputedStyleメソッドなどで使う
/*void*/ this.setFloatValue = function(/*short*/ unitType, /*float*/ floatValue) {
if ((/*CSSPrimitiveValue.CSS_UNKNOWN*/ 0 >= unitType) && (unitType >= /*CSSPrimitiveValue.CSS_STRING*/ 19)) { //浮動小数点数単位型をサポートしないCSS単位である場合
- throw new DOMException(DOMException.INVALID_ACCESS_ERR);
+ throw new DOMException(/*DOMException.INVALID_ACCESS_ERR*/ 15);
}
this.primitiveType = unitType;
this._value = floatValue * this._n[unitType-1]; //値はあらかじめ、利用しやすいように変換しておく
this._regd = /[\d\.]+/;
/*float*/ this.getFloatValue = function(/*short*/ unitType) {
if ((/*CSSPrimitiveValue.CSS_UNKNOWN*/ 0 >= unitType) && (unitType >= /*CSSPrimitiveValue.CSS_STRING*/ 19)) { //浮動小数点数単位型をサポートしないCSS単位である場合
- throw new DOMException(DOMException.INVALID_ACCESS_ERR);
+ throw new DOMException(/*DOMException.INVALID_ACCESS_ERR*/ 15);
}
if (this._value || (this._value === 0)) { //すでに、setFloatValueメソッドによって_valueプロパティが設定されていた場合
return (this._value / this._n[unitType-1]);
};
/*void*/ this.setStringValue = function(/*short*/ stringType, /*string*/ stringValue) {
if (CSSPrimitiveValue.CSS_DIMENSION >= stringType && stringType >= CSSPrimitiveValue.CSS_COUNTER) { //文字列型をサポートしないCSS単位である場合
- throw new DOMException(DOMException.INVALID_ACCESS_ERR);
+ throw new DOMException(/*DOMException.INVALID_ACCESS_ERR*/ 15);
}
this._value = stringValue;
};
/*string*/ this.getStringValue = function(/*short*/ stringType) {
if (CSSPrimitiveValue.CSS_DIMENSION >= stringType && stringType >= CSSPrimitiveValue.CSS_COUNTER) { //文字列型をサポートしないCSS単位である場合
- throw new DOMException(DOMException.INVALID_ACCESS_ERR);
+ throw new DOMException(/*DOMException.INVALID_ACCESS_ERR*/ 15);
}
return (this._value);
};
/*Counter*/ this.getCounterValue = function() {
if (this.primitiveType !== CSSPrimitiveValue.CSS_COUNTER) { //Counter型ではないとき
- throw new DOMException(DOMException.INVALID_ACCESS_ERR);
+ throw new DOMException(/*DOMException.INVALID_ACCESS_ERR*/ 15);
}
return (new Counter());
};
/*Rect*/ this.getRectValue = function() {
if (this.primitiveType !== CSSPrimitiveValue.CSS_RECT) { //Rect型ではないとき
- throw new DOMException(DOMException.INVALID_ACCESS_ERR);
+ throw new DOMException(/*DOMException.INVALID_ACCESS_ERR*/ 15);
}
return (new Rect());
};
/*RGBColor*/ this.getRGBColorValue = function() {
if (this.primitiveType !== CSSPrimitiveValue.CSS_RGBCOLOR) { //RGBColor型ではないとき
- throw new DOMException(DOMException.INVALID_ACCESS_ERR);
+ throw new DOMException(/*DOMException.INVALID_ACCESS_ERR*/ 15);
}
var s = new RGBColor();
var rgbColor = this.cssText;
*/
/*Attr*/ Element.prototype.setAttributeNodeNS = function( /*Attr*/ newAttr){
if (newAttr.ownerDocument !== this.ownerDocument) { //所属ドキュメントが違う場合
- throw (new DOMException(DOMException.WRONG_DOCUMENT_ERR));
+ throw (new DOMException(/*DOMException.WRONG_DOCUMENT_ERR*/ 4));
}
var s = this.attributes.setNamedItemNS(newAttr);
newAttr.ownerElement = this;
if (tp) {
while (!tp) { //先祖をたどっていく
if (tp === n) { //先祖要素が追加ノードならばエラー
- throw (new DOMException(DOMException.HIERARCHY_REQUEST_ERR));
+ throw (new DOMException(/*DOMException.HIERARCHY_REQUEST_ERR*/ 3));
}
tp = tp.parentNode;
}
}
if (this.ownerDocument !== n.ownerDocument) { //所属Documentの生成元が違うならば
- throw (new DOMException(DOMException.WRONG_DOCUMENT_ERR));
+ throw (new DOMException(/*DOMException.WRONG_DOCUMENT_ERR*/ 4));
}
if (np === this) { //入力した要素が子要素ならば
this.removeChild(n);
}
} else {
if (ref.parentNode !== this) { //参照ノードが子要素でない場合
- throw (new DOMException(DOMException.NOT_FOUND_ERR));
+ throw (new DOMException(/*DOMException.NOT_FOUND_ERR*/ 8));
}
this.childNodes.splice(ref._num,1,n,ref); //Arrayのspliceを利用して、リストにnノードを追加
rp = ref.previousSibling;
ele.previousSibling && (ele.previousSibling.nextSibling = ele.nextSibling);
ele.nextSibling && (ele.nextSibling.previousSibling = ele.previousSibling);
} else { //親が違う場合
- throw (new DOMException(DOMException.NOT_FOUND_ERR));
+ throw (new DOMException(/*DOMException.NOT_FOUND_ERR*/ 8));
}
if (ele.ownerDocument !== this.ownerDocument) { //所属ドキュメントが違う場合
throw (new Error());
};
/*DOMString*/ this.getItem = function(/*unsigned long*/ index ) {
if (index >= this.numberOfItems || index < 0) {
- throw (new DOMException(DOMException.INDEX_SIZE_ERR));
+ throw (new DOMException(/*DOMException.INDEX_SIZE_ERR*/ 1));
} else {
return (this[index]);
}
};
/*DOMString*/ this.replaceItem = function(/*DOMString*/ newItem, /*unsigned long*/ index ){
if (index >= this.numberOfItems || index < 0) {
- throw (new DOMException(DOMException.INDEX_SIZE_ERR));
+ throw (new DOMException(/*DOMException.INDEX_SIZE_ERR*/ 1));
} else {
this.splice(index, 1, newItem);
}
//raises( DOMException, SVGException );
/*DOMString*/ this.removeItem = function(/*unsigned long*/ index ){
if (index >= this.numberOfItems || index < 0) {
- throw (new DOMException(DOMException.INDEX_SIZE_ERR));
+ throw (new DOMException(/*DOMException.INDEX_SIZE_ERR*/ 1));
} else {
this.splice(index, 1);
--this.numberOfItems;
n = 15;
_s = "pc";
} else {
- throw new DOMException(DOMException.NOT_SUPPORTED_ERR);
+ throw new DOMException(/*DOMException.NOT_SUPPORTED_ERR*/ 9);
}
this.unitType = unitType;
this.value = valueInSpecifiedUnits * n;
n = 9 / 10;
_s = "grad";
} else {
- throw new DOMException(DOMException.NOT_SUPPORTED_ERR);
+ throw new DOMException(/*DOMException.NOT_SUPPORTED_ERR*/ 9);
}
this.unitType = unitType;
this.value = valueInSpecifiedUnits * n;
}
/*SVGPoint*/ t.prototype.getStartPositionOfChar = function (/*unsigned long*/ charnum ) {
if (charnum > this.getNumberOfChars() || charnum < 0) {
- throw (new DOMException(DOMException.INDEX_SIZE_ERR));
+ throw (new DOMException(/*DOMException.INDEX_SIZE_ERR*/ 1));
} else {
var tar = this,
ti = tar.firstChild,
};
/*SVGPoint*/ t.prototype.getEndPositionOfChar = function(/*unsigned long*/ charnum ) {
if (charnum > this.getNumberOfChars() || charnum < 0) {
- throw (new DOMException(DOMException.INDEX_SIZE_ERR));
+ throw (new DOMException(/*DOMException.INDEX_SIZE_ERR*/ 1));
} else {
var s = this.getStartPositionOfChar(charnum);
//アドバンス値(すなわちフォントの大きさ)をCTMの行列式を用いて、算出する
}
} catch (e) {
tar.endElementAt(1);
- throw new DOMException(DOMException.INVALID_STATE_ERR);
+ throw new DOMException(/*DOMException.INVALID_STATE_ERR*/ 11);
}
if ((ac || (ac === 0)) && isFinite(ac)) {
/*endの値がすでにある場合は、二重指定を避ける*/
if (this._starting || (this._starting === 0)) {
return (this._starting);
} else {
- throw new DOMException(DOMException.INVALID_STATE_ERR);
+ throw new DOMException(/*DOMException.INVALID_STATE_ERR*/ 11);
}
};
/*getCurrentTimeメソッド
};
/*float*/ SVGAnimationElement.prototype.getSimpleDuration = function(){
if (!this._dur && !this._finish && (this._dur === "indefinite")) {
- throw new DOMException(DOMException.NOT_SUPPORTED_ERR);
+ throw new DOMException(/*DOMException.NOT_SUPPORTED_ERR*/ 9);
} else {
return (this._getOffset(this._dur));
}