File tree Expand file tree Collapse file tree 1 file changed +11
-6
lines changed Expand file tree Collapse file tree 1 file changed +11
-6
lines changed Original file line number Diff line number Diff line change 25
25
* behaves like an XmlElement by inheriting its attributes and functions.
26
26
*/
27
27
28
- function XmlElement ( tag ) {
28
+ function XmlElement ( tag , parserIn ) {
29
29
// Capture the parser object off of the XmlDocument delegate
30
- var parser = delegates [ delegates . length - 1 ] . parser ;
30
+ var delegate = delegates [ delegates . length - 1 ] ;
31
+ var parser = parserIn ;
32
+
33
+ if ( delegate ) {
34
+ parser = delegate . parser ;
35
+ }
31
36
32
37
this . name = tag . name ;
33
38
this . attr = tag . attributes ;
37
42
this . lastChild = null ;
38
43
39
44
// Assign parse information
40
- this . line = parser . line ;
41
- this . column = parser . column ;
42
- this . position = parser . position ;
43
- this . startTagPosition = parser . startTagPosition ;
45
+ this . line = parser ? .line ;
46
+ this . column = parser ? .column ;
47
+ this . position = parser ? .position ;
48
+ this . startTagPosition = parser ? .startTagPosition ;
44
49
}
45
50
46
51
// Private methods
You can’t perform that action at this time.
0 commit comments