htmlUtil_wev8.js
5.36 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
/*
Copyright (c) 2004-2005, The Dojo Foundation
All Rights Reserved.
Licensed under the Academic Free License version 2.1 or above OR the
modified BSD license. For more information on Dojo licensing, see:
http://dojotoolkit.org/community/licensing.shtml
*/
dojo.provide("dojo.xml.htmlUtil");
dojo.require("dojo.html");
dojo.require("dojo.style");
dojo.require("dojo.dom");
dj_deprecated("dojo.xml.htmlUtil is deprecated, use dojo.html instead");
dojo.xml.htmlUtil = new function(){
this.styleSheet = dojo.style.styleSheet;
this._clobberSelection = function(){return dojo.html.clearSelection.apply(dojo.html, arguments);}
this.disableSelect = function(){return dojo.html.disableSelection.apply(dojo.html, arguments);}
this.enableSelect = function(){return dojo.html.enableSelection.apply(dojo.html, arguments);}
this.getInnerWidth = function(){return dojo.style.getInnerWidth.apply(dojo.style, arguments);}
this.getOuterWidth = function(node){
dj_unimplemented("dojo.xml.htmlUtil.getOuterWidth");
}
this.getInnerHeight = function(){return dojo.style.getInnerHeight.apply(dojo.style, arguments);}
this.getOuterHeight = function(node){
dj_unimplemented("dojo.xml.htmlUtil.getOuterHeight");
}
this.getTotalOffset = function(){return dojo.style.getTotalOffset.apply(dojo.style, arguments);}
this.totalOffsetLeft = function(){return dojo.style.totalOffsetLeft.apply(dojo.style, arguments);}
this.getAbsoluteX = this.totalOffsetLeft;
this.totalOffsetTop = function(){return dojo.style.totalOffsetTop.apply(dojo.style, arguments);}
this.getAbsoluteY = this.totalOffsetTop;
this.getEventTarget = function(){return dojo.html.getEventTarget.apply(dojo.html, arguments);}
this.getScrollTop = function() {return dojo.html.getScrollTop.apply(dojo.html, arguments);}
this.getScrollLeft = function() {return dojo.html.getScrollLeft.apply(dojo.html, arguments);}
this.evtTgt = this.getEventTarget;
this.getParentOfType = function(){return dojo.html.getParentOfType.apply(dojo.html, arguments);}
this.getAttribute = function(){return dojo.html.getAttribute.apply(dojo.html, arguments);}
this.getAttr = function (node, attr) { // for backwards compat (may disappear!!!)
dj_deprecated("dojo.xml.htmlUtil.getAttr is deprecated, use dojo.xml.htmlUtil.getAttribute instead");
return dojo.xml.htmlUtil.getAttribute(node, attr);
}
this.hasAttribute = function(){return dojo.html.hasAttribute.apply(dojo.html, arguments);}
this.hasAttr = function (node, attr) { // for backwards compat (may disappear!!!)
dj_deprecated("dojo.xml.htmlUtil.hasAttr is deprecated, use dojo.xml.htmlUtil.hasAttribute instead");
return dojo.xml.htmlUtil.hasAttribute(node, attr);
}
this.getClass = function(){return dojo.html.getClass.apply(dojo.html, arguments)}
this.hasClass = function(){return dojo.html.hasClass.apply(dojo.html, arguments)}
this.prependClass = function(){return dojo.html.prependClass.apply(dojo.html, arguments)}
this.addClass = function(){return dojo.html.addClass.apply(dojo.html, arguments)}
this.setClass = function(){return dojo.html.setClass.apply(dojo.html, arguments)}
this.removeClass = function(){return dojo.html.removeClass.apply(dojo.html, arguments)}
// Enum type for getElementsByClass classMatchType arg:
this.classMatchType = {
ContainsAll : 0, // all of the classes are part of the node's class (default)
ContainsAny : 1, // any of the classes are part of the node's class
IsOnly : 2 // only all of the classes are part of the node's class
}
this.getElementsByClass = function() {return dojo.html.getElementsByClass.apply(dojo.html, arguments)}
this.getElementsByClassName = this.getElementsByClass;
this.setOpacity = function() {return dojo.style.setOpacity.apply(dojo.style, arguments)}
this.getOpacity = function() {return dojo.style.getOpacity.apply(dojo.style, arguments)}
this.clearOpacity = function() {return dojo.style.clearOpacity.apply(dojo.style, arguments)}
this.gravity = function(){return dojo.html.gravity.apply(dojo.html, arguments)}
this.gravity.NORTH = 1;
this.gravity.SOUTH = 1 << 1;
this.gravity.EAST = 1 << 2;
this.gravity.WEST = 1 << 3;
this.overElement = function(){return dojo.html.overElement.apply(dojo.html, arguments)}
this.insertCssRule = function(){return dojo.style.insertCssRule.apply(dojo.style, arguments)}
this.insertCSSRule = function(selector, declaration, index){
dj_deprecated("dojo.xml.htmlUtil.insertCSSRule is deprecated, use dojo.xml.htmlUtil.insertCssRule instead");
return dojo.xml.htmlUtil.insertCssRule(selector, declaration, index);
}
this.removeCssRule = function(){return dojo.style.removeCssRule.apply(dojo.style, arguments)}
this.removeCSSRule = function(index){
dj_deprecated("dojo.xml.htmlUtil.removeCSSRule is deprecated, use dojo.xml.htmlUtil.removeCssRule instead");
return dojo.xml.htmlUtil.removeCssRule(index);
}
this.insertCssFile = function(){return dojo.style.insertCssFile.apply(dojo.style, arguments)}
this.insertCSSFile = function(URI, doc, checkDuplicates){
dj_deprecated("dojo.xml.htmlUtil.insertCSSFile is deprecated, use dojo.xml.htmlUtil.insertCssFile instead");
return dojo.xml.htmlUtil.insertCssFile(URI, doc, checkDuplicates);
}
this.getBackgroundColor = function() {return dojo.style.getBackgroundColor.apply(dojo.style, arguments)}
this.getUniqueId = function() { return dojo.dom.getUniqueId(); }
this.getStyle = function() {return dojo.style.getStyle.apply(dojo.style, arguments)}
}