jtulach@678
|
1 |
/*
|
jtulach@678
|
2 |
* Envjs core-env.1.2.13
|
jtulach@678
|
3 |
* Pure JavaScript Browser Environment
|
jtulach@678
|
4 |
* By John Resig <http://ejohn.org/> and the Envjs Team
|
jtulach@678
|
5 |
* Copyright 2008-2010 John Resig, under the MIT License
|
jtulach@678
|
6 |
*/
|
jtulach@678
|
7 |
|
jtulach@678
|
8 |
load("nashorn:mozilla_compat.js");
|
jtulach@678
|
9 |
|
jtulach@678
|
10 |
var Envjs = function(){
|
jtulach@678
|
11 |
var i,
|
jtulach@678
|
12 |
name,
|
jtulach@678
|
13 |
override = function(){
|
jtulach@678
|
14 |
for(i=0;i<arguments.length;i++){
|
jtulach@678
|
15 |
for ( name in arguments[i] ) {
|
jtulach@678
|
16 |
var g = arguments[i].__lookupGetter__(name),
|
jtulach@678
|
17 |
s = arguments[i].__lookupSetter__(name);
|
jtulach@678
|
18 |
if ( g || s ) {
|
jtulach@678
|
19 |
if ( g ) { Envjs.__defineGetter__(name, g); }
|
jtulach@678
|
20 |
if ( s ) { Envjs.__defineSetter__(name, s); }
|
jtulach@678
|
21 |
} else {
|
jtulach@678
|
22 |
Envjs[name] = arguments[i][name];
|
jtulach@678
|
23 |
}
|
jtulach@678
|
24 |
}
|
jtulach@678
|
25 |
}
|
jtulach@678
|
26 |
};
|
jtulach@678
|
27 |
if(arguments.length === 1 && typeof(arguments[0]) == 'string'){
|
jtulach@678
|
28 |
window.location = arguments[0];
|
jtulach@678
|
29 |
}else if (arguments.length === 1 && typeof(arguments[0]) == "object"){
|
jtulach@678
|
30 |
override(arguments[0]);
|
jtulach@678
|
31 |
}else if(arguments.length === 2 && typeof(arguments[0]) == 'string'){
|
jtulach@678
|
32 |
override(arguments[1]);
|
jtulach@678
|
33 |
window.location = arguments[0];
|
jtulach@678
|
34 |
}
|
jtulach@678
|
35 |
return;
|
jtulach@678
|
36 |
},
|
jtulach@678
|
37 |
__this__ = this;
|
jtulach@678
|
38 |
|
jtulach@678
|
39 |
//eg "Mozilla"
|
jtulach@678
|
40 |
Envjs.appCodeName = "Envjs";
|
jtulach@678
|
41 |
|
jtulach@678
|
42 |
//eg "Gecko/20070309 Firefox/2.0.0.3"
|
jtulach@678
|
43 |
Envjs.appName = "Resig/20070309 PilotFish/1.2.13";
|
jtulach@678
|
44 |
|
jtulach@678
|
45 |
Envjs.version = "1.6";//?
|
jtulach@678
|
46 |
Envjs.revision = '';
|
jtulach@678
|
47 |
/*
|
jtulach@678
|
48 |
* Envjs core-env.1.2.13
|
jtulach@678
|
49 |
* Pure JavaScript Browser Environment
|
jtulach@678
|
50 |
* By John Resig <http://ejohn.org/> and the Envjs Team
|
jtulach@678
|
51 |
* Copyright 2008-2010 John Resig, under the MIT License
|
jtulach@678
|
52 |
*/
|
jtulach@678
|
53 |
|
jtulach@678
|
54 |
//CLOSURE_START
|
jtulach@678
|
55 |
(function(){
|
jtulach@678
|
56 |
|
jtulach@678
|
57 |
|
jtulach@678
|
58 |
|
jtulach@678
|
59 |
|
jtulach@678
|
60 |
|
jtulach@678
|
61 |
/**
|
jtulach@678
|
62 |
* @author john resig
|
jtulach@678
|
63 |
*/
|
jtulach@678
|
64 |
// Helper method for extending one object with another.
|
jtulach@678
|
65 |
function __extend__(a,b) {
|
jtulach@678
|
66 |
for ( var i in b ) {
|
jtulach@678
|
67 |
var g = b.__lookupGetter__(i), s = b.__lookupSetter__(i);
|
jtulach@678
|
68 |
if ( g || s ) {
|
jtulach@678
|
69 |
if ( g ) { a.__defineGetter__(i, g); }
|
jtulach@678
|
70 |
if ( s ) { a.__defineSetter__(i, s); }
|
jtulach@678
|
71 |
} else {
|
jtulach@678
|
72 |
a[i] = b[i];
|
jtulach@678
|
73 |
}
|
jtulach@678
|
74 |
} return a;
|
jtulach@678
|
75 |
}
|
jtulach@678
|
76 |
|
jtulach@678
|
77 |
/**
|
jtulach@678
|
78 |
* Writes message to system out
|
jtulach@678
|
79 |
* @param {String} message
|
jtulach@678
|
80 |
*/
|
jtulach@678
|
81 |
Envjs.log = function(message){};
|
jtulach@678
|
82 |
|
jtulach@678
|
83 |
/**
|
jtulach@678
|
84 |
* Constants providing enumerated levels for logging in modules
|
jtulach@678
|
85 |
*/
|
jtulach@678
|
86 |
Envjs.DEBUG = 1;
|
jtulach@678
|
87 |
Envjs.INFO = 2;
|
jtulach@678
|
88 |
Envjs.WARN = 3;
|
jtulach@678
|
89 |
Envjs.ERROR = 3;
|
jtulach@678
|
90 |
Envjs.NONE = 3;
|
jtulach@678
|
91 |
|
jtulach@678
|
92 |
/**
|
jtulach@678
|
93 |
* Writes error info out to console
|
jtulach@678
|
94 |
* @param {Error} e
|
jtulach@678
|
95 |
*/
|
jtulach@678
|
96 |
Envjs.lineSource = function(e){};
|
jtulach@678
|
97 |
|
jtulach@678
|
98 |
|
jtulach@678
|
99 |
/**
|
jtulach@678
|
100 |
* TODO: used in ./event/eventtarget.js
|
jtulach@678
|
101 |
* @param {Object} event
|
jtulach@678
|
102 |
*/
|
jtulach@678
|
103 |
Envjs.defaultEventBehaviors = {};
|
jtulach@678
|
104 |
|
jtulach@678
|
105 |
|
jtulach@678
|
106 |
/**
|
jtulach@678
|
107 |
* describes which script src values will trigger Envjs to load
|
jtulach@678
|
108 |
* the script like a browser would
|
jtulach@678
|
109 |
*/
|
jtulach@678
|
110 |
Envjs.scriptTypes = {
|
jtulach@678
|
111 |
"text/javascript" :false,
|
jtulach@678
|
112 |
"text/envjs" :true
|
jtulach@678
|
113 |
};
|
jtulach@678
|
114 |
|
jtulach@678
|
115 |
/**
|
jtulach@678
|
116 |
* will be called when loading a script throws an error
|
jtulach@678
|
117 |
* @param {Object} script
|
jtulach@678
|
118 |
* @param {Object} e
|
jtulach@678
|
119 |
*/
|
jtulach@678
|
120 |
Envjs.onScriptLoadError = function(script, e){
|
jtulach@678
|
121 |
console.log('error loading script %s %s', script, e);
|
jtulach@678
|
122 |
};
|
jtulach@678
|
123 |
|
jtulach@678
|
124 |
|
jtulach@678
|
125 |
/**
|
jtulach@678
|
126 |
* load and execute script tag text content
|
jtulach@678
|
127 |
* @param {Object} script
|
jtulach@678
|
128 |
*/
|
jtulach@678
|
129 |
Envjs.loadInlineScript = function(script){
|
jtulach@678
|
130 |
var tmpFile;
|
jtulach@678
|
131 |
tmpFile = Envjs.writeToTempFile(script.text, 'js') ;
|
jtulach@678
|
132 |
load(tmpFile);
|
jtulach@678
|
133 |
};
|
jtulach@678
|
134 |
|
jtulach@678
|
135 |
/**
|
jtulach@678
|
136 |
* Should evaluate script in some context
|
jtulach@678
|
137 |
* @param {Object} context
|
jtulach@678
|
138 |
* @param {Object} source
|
jtulach@678
|
139 |
* @param {Object} name
|
jtulach@678
|
140 |
*/
|
jtulach@678
|
141 |
Envjs.eval = function(context, source, name){};
|
jtulach@678
|
142 |
|
jtulach@678
|
143 |
|
jtulach@678
|
144 |
/**
|
jtulach@678
|
145 |
* Executes a script tag
|
jtulach@678
|
146 |
* @param {Object} script
|
jtulach@678
|
147 |
* @param {Object} parser
|
jtulach@678
|
148 |
*/
|
jtulach@678
|
149 |
Envjs.loadLocalScript = function(script){
|
jtulach@678
|
150 |
//console.log("loading script %s", script);
|
jtulach@678
|
151 |
var types,
|
jtulach@678
|
152 |
src,
|
jtulach@678
|
153 |
i,
|
jtulach@678
|
154 |
base,
|
jtulach@678
|
155 |
filename,
|
jtulach@678
|
156 |
xhr;
|
jtulach@678
|
157 |
|
jtulach@678
|
158 |
if(script.type){
|
jtulach@678
|
159 |
types = script.type.split(";");
|
jtulach@678
|
160 |
for(i=0;i<types.length;i++){
|
jtulach@678
|
161 |
if(Envjs.scriptTypes[types[i]]){
|
jtulach@678
|
162 |
//ok this script type is allowed
|
jtulach@678
|
163 |
break;
|
jtulach@678
|
164 |
}
|
jtulach@678
|
165 |
if(i+1 == types.length){
|
jtulach@678
|
166 |
//console.log('wont load script type %s', script.type);
|
jtulach@678
|
167 |
return false;
|
jtulach@678
|
168 |
}
|
jtulach@678
|
169 |
}
|
jtulach@678
|
170 |
}
|
jtulach@678
|
171 |
|
jtulach@678
|
172 |
try{
|
jtulach@678
|
173 |
//console.log('handling inline scripts');
|
jtulach@678
|
174 |
if(!script.src.length){
|
jtulach@678
|
175 |
Envjs.loadInlineScript(script);
|
jtulach@678
|
176 |
return true;
|
jtulach@678
|
177 |
}
|
jtulach@678
|
178 |
}catch(e){
|
jtulach@678
|
179 |
//Envjs.error("Error loading script.", e);
|
jtulach@678
|
180 |
Envjs.onScriptLoadError(script, e);
|
jtulach@678
|
181 |
return false;
|
jtulach@678
|
182 |
}
|
jtulach@678
|
183 |
|
jtulach@678
|
184 |
|
jtulach@678
|
185 |
//console.log("loading allowed external script %s", script.src);
|
jtulach@678
|
186 |
|
jtulach@678
|
187 |
//lets you register a function to execute
|
jtulach@678
|
188 |
//before the script is loaded
|
jtulach@678
|
189 |
if(Envjs.beforeScriptLoad){
|
jtulach@678
|
190 |
for(src in Envjs.beforeScriptLoad){
|
jtulach@678
|
191 |
if(script.src.match(src)){
|
jtulach@678
|
192 |
Envjs.beforeScriptLoad[src](script);
|
jtulach@678
|
193 |
}
|
jtulach@678
|
194 |
}
|
jtulach@678
|
195 |
}
|
jtulach@678
|
196 |
base = "" + script.ownerDocument.location;
|
jtulach@678
|
197 |
//filename = Envjs.uri(script.src.match(/([^\?#]*)/)[1], base );
|
jtulach@678
|
198 |
//console.log('loading script from base %s', base);
|
jtulach@678
|
199 |
filename = Envjs.uri(script.src, base);
|
jtulach@678
|
200 |
try {
|
jtulach@678
|
201 |
xhr = new XMLHttpRequest();
|
jtulach@678
|
202 |
xhr.open("GET", filename, false/*syncronous*/);
|
jtulach@678
|
203 |
//console.log("loading external script %s", filename);
|
jtulach@678
|
204 |
xhr.onreadystatechange = function(){
|
jtulach@678
|
205 |
//console.log("readyState %s", xhr.readyState);
|
jtulach@678
|
206 |
if(xhr.readyState === 4){
|
jtulach@678
|
207 |
Envjs.eval(
|
jtulach@678
|
208 |
script.ownerDocument.ownerWindow,
|
jtulach@678
|
209 |
xhr.responseText,
|
jtulach@678
|
210 |
filename
|
jtulach@678
|
211 |
);
|
jtulach@678
|
212 |
}
|
jtulach@678
|
213 |
};
|
jtulach@678
|
214 |
xhr.send(null, false);
|
jtulach@678
|
215 |
} catch(e) {
|
jtulach@678
|
216 |
console.log("could not load script %s \n %s", filename, e );
|
jtulach@678
|
217 |
Envjs.onScriptLoadError(script, e);
|
jtulach@678
|
218 |
return false;
|
jtulach@678
|
219 |
}
|
jtulach@678
|
220 |
//lets you register a function to execute
|
jtulach@678
|
221 |
//after the script is loaded
|
jtulach@678
|
222 |
if(Envjs.afterScriptLoad){
|
jtulach@678
|
223 |
for(src in Envjs.afterScriptLoad){
|
jtulach@678
|
224 |
if(script.src.match(src)){
|
jtulach@678
|
225 |
Envjs.afterScriptLoad[src](script);
|
jtulach@678
|
226 |
}
|
jtulach@678
|
227 |
}
|
jtulach@678
|
228 |
}
|
jtulach@678
|
229 |
return true;
|
jtulach@678
|
230 |
};
|
jtulach@678
|
231 |
|
jtulach@678
|
232 |
|
jtulach@678
|
233 |
/**
|
jtulach@678
|
234 |
* An 'image' was requested by the document.
|
jtulach@678
|
235 |
*
|
jtulach@678
|
236 |
* - During inital parse of a <link>
|
jtulach@678
|
237 |
* - Via an innerHTML parse of a <link>
|
jtulach@678
|
238 |
* - A modificiation of the 'src' attribute of an Image/HTMLImageElement
|
jtulach@678
|
239 |
*
|
jtulach@678
|
240 |
* NOTE: this is optional API. If this doesn't exist then the default
|
jtulach@678
|
241 |
* 'loaded' event occurs.
|
jtulach@678
|
242 |
*
|
jtulach@678
|
243 |
* @param node {Object} the <img> node
|
jtulach@678
|
244 |
* @param node the src value
|
jtulach@678
|
245 |
* @return 'true' to indicate the 'load' succeed, false otherwise
|
jtulach@678
|
246 |
*/
|
jtulach@678
|
247 |
Envjs.loadImage = function(node, src) {
|
jtulach@678
|
248 |
return true;
|
jtulach@678
|
249 |
};
|
jtulach@678
|
250 |
|
jtulach@678
|
251 |
|
jtulach@678
|
252 |
/**
|
jtulach@678
|
253 |
* A 'link' was requested by the document. Typically this occurs when:
|
jtulach@678
|
254 |
* - During inital parse of a <link>
|
jtulach@678
|
255 |
* - Via an innerHTML parse of a <link>
|
jtulach@678
|
256 |
* - A modificiation of the 'href' attribute on a <link> node in the tree
|
jtulach@678
|
257 |
*
|
jtulach@678
|
258 |
* @param node {Object} is the link node in question
|
jtulach@678
|
259 |
* @param href {String} is the href.
|
jtulach@678
|
260 |
*
|
jtulach@678
|
261 |
* Return 'true' to indicate that the 'load' was successful, or false
|
jtulach@678
|
262 |
* otherwise. The appropriate event is then triggered.
|
jtulach@678
|
263 |
*
|
jtulach@678
|
264 |
* NOTE: this is optional API. If this doesn't exist then the default
|
jtulach@678
|
265 |
* 'loaded' event occurs
|
jtulach@678
|
266 |
*/
|
jtulach@678
|
267 |
Envjs.loadLink = function(node, href) {
|
jtulach@678
|
268 |
return true;
|
jtulach@678
|
269 |
};
|
jtulach@678
|
270 |
|
jtulach@678
|
271 |
(function(){
|
jtulach@678
|
272 |
|
jtulach@678
|
273 |
|
jtulach@678
|
274 |
/*
|
jtulach@678
|
275 |
* cookie handling
|
jtulach@678
|
276 |
* Private internal helper class used to save/retreive cookies
|
jtulach@678
|
277 |
*/
|
jtulach@678
|
278 |
|
jtulach@678
|
279 |
/**
|
jtulach@678
|
280 |
* Specifies the location of the cookie file
|
jtulach@678
|
281 |
*/
|
jtulach@678
|
282 |
Envjs.cookieFile = function(){
|
jtulach@678
|
283 |
return 'file://'+Envjs.homedir+'/.cookies';
|
jtulach@678
|
284 |
};
|
jtulach@678
|
285 |
|
jtulach@678
|
286 |
/**
|
jtulach@678
|
287 |
* saves cookies to a local file
|
jtulach@678
|
288 |
* @param {Object} htmldoc
|
jtulach@678
|
289 |
*/
|
jtulach@678
|
290 |
Envjs.saveCookies = function(){
|
jtulach@678
|
291 |
var cookiejson = JSON.stringify(Envjs.cookies.peristent,null,'\t');
|
jtulach@678
|
292 |
//console.log('persisting cookies %s', cookiejson);
|
jtulach@678
|
293 |
Envjs.writeToFile(cookiejson, Envjs.cookieFile());
|
jtulach@678
|
294 |
};
|
jtulach@678
|
295 |
|
jtulach@678
|
296 |
/**
|
jtulach@678
|
297 |
* loads cookies from a local file
|
jtulach@678
|
298 |
* @param {Object} htmldoc
|
jtulach@678
|
299 |
*/
|
jtulach@678
|
300 |
Envjs.loadCookies = function(){
|
jtulach@678
|
301 |
var cookiejson,
|
jtulach@678
|
302 |
js;
|
jtulach@678
|
303 |
try{
|
jtulach@678
|
304 |
cookiejson = Envjs.readFromFile(Envjs.cookieFile())
|
jtulach@678
|
305 |
js = JSON.parse(cookiejson, null, '\t');
|
jtulach@678
|
306 |
}catch(e){
|
jtulach@678
|
307 |
//console.log('failed to load cookies %s', e);
|
jtulach@678
|
308 |
js = {};
|
jtulach@678
|
309 |
}
|
jtulach@678
|
310 |
return js;
|
jtulach@678
|
311 |
};
|
jtulach@678
|
312 |
|
jtulach@678
|
313 |
Envjs.cookies = {
|
jtulach@678
|
314 |
persistent:{
|
jtulach@678
|
315 |
//domain - key on domain name {
|
jtulach@678
|
316 |
//path - key on path {
|
jtulach@678
|
317 |
//name - key on name {
|
jtulach@678
|
318 |
//value : cookie value
|
jtulach@678
|
319 |
//other cookie properties
|
jtulach@678
|
320 |
//}
|
jtulach@678
|
321 |
//}
|
jtulach@678
|
322 |
//}
|
jtulach@678
|
323 |
//expire - provides a timestamp for expiring the cookie
|
jtulach@678
|
324 |
//cookie - the cookie!
|
jtulach@678
|
325 |
},
|
jtulach@678
|
326 |
temporary:{//transient is a reserved word :(
|
jtulach@678
|
327 |
//like above
|
jtulach@678
|
328 |
}
|
jtulach@678
|
329 |
};
|
jtulach@678
|
330 |
|
jtulach@678
|
331 |
var __cookies__;
|
jtulach@678
|
332 |
|
jtulach@678
|
333 |
//HTMLDocument cookie
|
jtulach@678
|
334 |
Envjs.setCookie = function(url, cookie){
|
jtulach@678
|
335 |
var i,
|
jtulach@678
|
336 |
index,
|
jtulach@678
|
337 |
name,
|
jtulach@678
|
338 |
value,
|
jtulach@678
|
339 |
properties = {},
|
jtulach@678
|
340 |
attr,
|
jtulach@678
|
341 |
attrs;
|
jtulach@678
|
342 |
url = Envjs.urlsplit(url);
|
jtulach@678
|
343 |
if(cookie)
|
jtulach@678
|
344 |
attrs = cookie.split(";");
|
jtulach@678
|
345 |
else
|
jtulach@678
|
346 |
return;
|
jtulach@678
|
347 |
|
jtulach@678
|
348 |
//for now the strategy is to simply create a json object
|
jtulach@678
|
349 |
//and post it to a file in the .cookies.js file. I hate parsing
|
jtulach@678
|
350 |
//dates so I decided not to implement support for 'expires'
|
jtulach@678
|
351 |
//(which is deprecated) and instead focus on the easier 'max-age'
|
jtulach@678
|
352 |
//(which succeeds 'expires')
|
jtulach@678
|
353 |
cookie = {};//keyword properties of the cookie
|
jtulach@678
|
354 |
cookie['domain'] = url.hostname;
|
jtulach@678
|
355 |
cookie['path'] = url.path||'/';
|
jtulach@678
|
356 |
for(i=0;i<attrs.length;i++){
|
jtulach@678
|
357 |
index = attrs[i].indexOf("=");
|
jtulach@678
|
358 |
if(index > -1){
|
jtulach@678
|
359 |
name = __trim__(attrs[i].slice(0,index));
|
jtulach@678
|
360 |
value = __trim__(attrs[i].slice(index+1));
|
jtulach@678
|
361 |
if(name=='max-age'){
|
jtulach@678
|
362 |
//we'll have to when to check these
|
jtulach@678
|
363 |
//and garbage collect expired cookies
|
jtulach@678
|
364 |
cookie[name] = parseInt(value, 10);
|
jtulach@678
|
365 |
} else if( name == 'domain' ){
|
jtulach@678
|
366 |
if(__domainValid__(url, value)){
|
jtulach@678
|
367 |
cookie['domain'] = value;
|
jtulach@678
|
368 |
}
|
jtulach@678
|
369 |
} else if( name == 'path' ){
|
jtulach@678
|
370 |
//not sure of any special logic for path
|
jtulach@678
|
371 |
cookie['path'] = value;
|
jtulach@678
|
372 |
} else {
|
jtulach@678
|
373 |
//its not a cookie keyword so store it in our array of properties
|
jtulach@678
|
374 |
//and we'll serialize individually in a moment
|
jtulach@678
|
375 |
properties[name] = value;
|
jtulach@678
|
376 |
}
|
jtulach@678
|
377 |
}else{
|
jtulach@678
|
378 |
if( attrs[i] == 'secure' ){
|
jtulach@678
|
379 |
cookie[attrs[i]] = true;
|
jtulach@678
|
380 |
}
|
jtulach@678
|
381 |
}
|
jtulach@678
|
382 |
}
|
jtulach@678
|
383 |
if(!('max-age' in cookie)){
|
jtulach@678
|
384 |
//it's a transient cookie so it only lasts as long as
|
jtulach@678
|
385 |
//the window.location remains the same (ie in-memory cookie)
|
jtulach@678
|
386 |
__mergeCookie__(Envjs.cookies.temporary, cookie, properties);
|
jtulach@678
|
387 |
}else{
|
jtulach@678
|
388 |
//the cookie is persistent
|
jtulach@678
|
389 |
__mergeCookie__(Envjs.cookies.persistent, cookie, properties);
|
jtulach@678
|
390 |
Envjs.saveCookies();
|
jtulach@678
|
391 |
}
|
jtulach@678
|
392 |
};
|
jtulach@678
|
393 |
|
jtulach@678
|
394 |
function __domainValid__(url, value){
|
jtulach@678
|
395 |
var i,
|
jtulach@678
|
396 |
domainParts = url.hostname.split('.').reverse(),
|
jtulach@678
|
397 |
newDomainParts = value.split('.').reverse();
|
jtulach@678
|
398 |
if(newDomainParts.length > 1){
|
jtulach@678
|
399 |
for(i=0;i<newDomainParts.length;i++){
|
jtulach@678
|
400 |
if(!(newDomainParts[i] == domainParts[i])){
|
jtulach@678
|
401 |
return false;
|
jtulach@678
|
402 |
}
|
jtulach@678
|
403 |
}
|
jtulach@678
|
404 |
return true;
|
jtulach@678
|
405 |
}
|
jtulach@678
|
406 |
return false;
|
jtulach@678
|
407 |
};
|
jtulach@678
|
408 |
|
jtulach@678
|
409 |
Envjs.getCookies = function(url){
|
jtulach@678
|
410 |
//The cookies that are returned must belong to the same domain
|
jtulach@678
|
411 |
//and be at or below the current window.location.path. Also
|
jtulach@678
|
412 |
//we must check to see if the cookie was set to 'secure' in which
|
jtulach@678
|
413 |
//case we must check our current location.protocol to make sure it's
|
jtulach@678
|
414 |
//https:
|
jtulach@678
|
415 |
var persisted;
|
jtulach@678
|
416 |
url = Envjs.urlsplit(url);
|
jtulach@678
|
417 |
if(!__cookies__){
|
jtulach@678
|
418 |
try{
|
jtulach@678
|
419 |
__cookies__ = true;
|
jtulach@678
|
420 |
try{
|
jtulach@678
|
421 |
persisted = Envjs.loadCookies();
|
jtulach@678
|
422 |
}catch(e){
|
jtulach@678
|
423 |
//fail gracefully
|
jtulach@678
|
424 |
//console.log('%s', e);
|
jtulach@678
|
425 |
}
|
jtulach@678
|
426 |
if(persisted){
|
jtulach@678
|
427 |
__extend__(Envjs.cookies.persistent, persisted);
|
jtulach@678
|
428 |
}
|
jtulach@678
|
429 |
//console.log('set cookies for doc %s', doc.baseURI);
|
jtulach@678
|
430 |
}catch(e){
|
jtulach@678
|
431 |
console.log('cookies not loaded %s', e)
|
jtulach@678
|
432 |
};
|
jtulach@678
|
433 |
}
|
jtulach@678
|
434 |
var temporary = __cookieString__(Envjs.cookies.temporary, url),
|
jtulach@678
|
435 |
persistent = __cookieString__(Envjs.cookies.persistent, url);
|
jtulach@678
|
436 |
//console.log('temporary cookies: %s', temporary);
|
jtulach@678
|
437 |
//console.log('persistent cookies: %s', persistent);
|
jtulach@678
|
438 |
return temporary + persistent;
|
jtulach@678
|
439 |
};
|
jtulach@678
|
440 |
|
jtulach@678
|
441 |
function __cookieString__(cookies, url) {
|
jtulach@678
|
442 |
var cookieString = "",
|
jtulach@678
|
443 |
domain,
|
jtulach@678
|
444 |
path,
|
jtulach@678
|
445 |
name,
|
jtulach@678
|
446 |
i=0;
|
jtulach@678
|
447 |
for (domain in cookies) {
|
jtulach@678
|
448 |
// check if the cookie is in the current domain (if domain is set)
|
jtulach@678
|
449 |
// console.log('cookie domain %s', domain);
|
jtulach@678
|
450 |
if (domain == "" || domain == url.hostname) {
|
jtulach@678
|
451 |
for (path in cookies[domain]) {
|
jtulach@678
|
452 |
// console.log('cookie domain path %s', path);
|
jtulach@678
|
453 |
// make sure path is at or below the window location path
|
jtulach@678
|
454 |
if (path == "/" || url.path.indexOf(path) > -1) {
|
jtulach@678
|
455 |
for (name in cookies[domain][path]) {
|
jtulach@678
|
456 |
// console.log('cookie domain path name %s', name);
|
jtulach@678
|
457 |
cookieString +=
|
jtulach@678
|
458 |
((i++ > 0)?'; ':'') +
|
jtulach@678
|
459 |
name + "=" +
|
jtulach@678
|
460 |
cookies[domain][path][name].value;
|
jtulach@678
|
461 |
}
|
jtulach@678
|
462 |
}
|
jtulach@678
|
463 |
}
|
jtulach@678
|
464 |
}
|
jtulach@678
|
465 |
}
|
jtulach@678
|
466 |
return cookieString;
|
jtulach@678
|
467 |
};
|
jtulach@678
|
468 |
|
jtulach@678
|
469 |
function __mergeCookie__(target, cookie, properties){
|
jtulach@678
|
470 |
var name, now;
|
jtulach@678
|
471 |
if(!target[cookie.domain]){
|
jtulach@678
|
472 |
target[cookie.domain] = {};
|
jtulach@678
|
473 |
}
|
jtulach@678
|
474 |
if(!target[cookie.domain][cookie.path]){
|
jtulach@678
|
475 |
target[cookie.domain][cookie.path] = {};
|
jtulach@678
|
476 |
}
|
jtulach@678
|
477 |
for(name in properties){
|
jtulach@678
|
478 |
now = new Date().getTime();
|
jtulach@678
|
479 |
target[cookie.domain][cookie.path][name] = {
|
jtulach@678
|
480 |
"value":properties[name],
|
jtulach@678
|
481 |
"secure":cookie.secure,
|
jtulach@678
|
482 |
"max-age":cookie['max-age'],
|
jtulach@678
|
483 |
"date-created":now,
|
jtulach@678
|
484 |
"expiration":(cookie['max-age']===0) ?
|
jtulach@678
|
485 |
0 :
|
jtulach@678
|
486 |
now + cookie['max-age']
|
jtulach@678
|
487 |
};
|
jtulach@678
|
488 |
//console.log('cookie is %o',target[cookie.domain][cookie.path][name]);
|
jtulach@678
|
489 |
}
|
jtulach@678
|
490 |
};
|
jtulach@678
|
491 |
|
jtulach@678
|
492 |
})();//end cookies
|
jtulach@678
|
493 |
/*
|
jtulach@678
|
494 |
http://www.JSON.org/json2.js
|
jtulach@678
|
495 |
2008-07-15
|
jtulach@678
|
496 |
|
jtulach@678
|
497 |
Public Domain.
|
jtulach@678
|
498 |
|
jtulach@678
|
499 |
NO WARRANTY EXPRESSED OR IMPLIED. USE AT YOUR OWN RISK.
|
jtulach@678
|
500 |
|
jtulach@678
|
501 |
See http://www.JSON.org/js.html
|
jtulach@678
|
502 |
|
jtulach@678
|
503 |
|
jtulach@678
|
504 |
This code should be minified before deployment.
|
jtulach@678
|
505 |
See http://javascript.crockford.com/jsmin.html
|
jtulach@678
|
506 |
|
jtulach@678
|
507 |
USE YOUR OWN COPY. IT IS EXTREMELY UNWISE TO LOAD CODE FROM SERVERS YOU DO
|
jtulach@678
|
508 |
NOT CONTROL.
|
jtulach@678
|
509 |
*/
|
jtulach@678
|
510 |
try{ JSON; }catch(e){
|
jtulach@678
|
511 |
JSON = function () {
|
jtulach@678
|
512 |
|
jtulach@678
|
513 |
function f(n) {
|
jtulach@678
|
514 |
// Format integers to have at least two digits.
|
jtulach@678
|
515 |
return n < 10 ? '0' + n : n;
|
jtulach@678
|
516 |
}
|
jtulach@678
|
517 |
|
jtulach@678
|
518 |
Date.prototype.toJSON = function (key) {
|
jtulach@678
|
519 |
|
jtulach@678
|
520 |
return this.getUTCFullYear() + '-' +
|
jtulach@678
|
521 |
f(this.getUTCMonth() + 1) + '-' +
|
jtulach@678
|
522 |
f(this.getUTCDate()) + 'T' +
|
jtulach@678
|
523 |
f(this.getUTCHours()) + ':' +
|
jtulach@678
|
524 |
f(this.getUTCMinutes()) + ':' +
|
jtulach@678
|
525 |
f(this.getUTCSeconds()) + 'Z';
|
jtulach@678
|
526 |
};
|
jtulach@678
|
527 |
|
jtulach@678
|
528 |
String.prototype.toJSON = function (key) {
|
jtulach@678
|
529 |
return String(this);
|
jtulach@678
|
530 |
};
|
jtulach@678
|
531 |
Number.prototype.toJSON =
|
jtulach@678
|
532 |
Boolean.prototype.toJSON = function (key) {
|
jtulach@678
|
533 |
return this.valueOf();
|
jtulach@678
|
534 |
};
|
jtulach@678
|
535 |
|
jtulach@678
|
536 |
var cx = /[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,
|
jtulach@678
|
537 |
escapeable = /[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,
|
jtulach@678
|
538 |
gap,
|
jtulach@678
|
539 |
indent,
|
jtulach@678
|
540 |
meta = { // table of character substitutions
|
jtulach@678
|
541 |
'\b': '\\b',
|
jtulach@678
|
542 |
'\t': '\\t',
|
jtulach@678
|
543 |
'\n': '\\n',
|
jtulach@678
|
544 |
'\f': '\\f',
|
jtulach@678
|
545 |
'\r': '\\r',
|
jtulach@678
|
546 |
'"' : '\\"',
|
jtulach@678
|
547 |
'\\': '\\\\'
|
jtulach@678
|
548 |
},
|
jtulach@678
|
549 |
rep;
|
jtulach@678
|
550 |
|
jtulach@678
|
551 |
|
jtulach@678
|
552 |
function quote(string) {
|
jtulach@678
|
553 |
|
jtulach@678
|
554 |
escapeable.lastIndex = 0;
|
jtulach@678
|
555 |
return escapeable.test(string) ?
|
jtulach@678
|
556 |
'"' + string.replace(escapeable, function (a) {
|
jtulach@678
|
557 |
var c = meta[a];
|
jtulach@678
|
558 |
if (typeof c === 'string') {
|
jtulach@678
|
559 |
return c;
|
jtulach@678
|
560 |
}
|
jtulach@678
|
561 |
return '\\u' + ('0000' +
|
jtulach@678
|
562 |
(+(a.charCodeAt(0))).toString(16)).slice(-4);
|
jtulach@678
|
563 |
}) + '"' :
|
jtulach@678
|
564 |
'"' + string + '"';
|
jtulach@678
|
565 |
}
|
jtulach@678
|
566 |
|
jtulach@678
|
567 |
|
jtulach@678
|
568 |
function str(key, holder) {
|
jtulach@678
|
569 |
|
jtulach@678
|
570 |
var i, // The loop counter.
|
jtulach@678
|
571 |
k, // The member key.
|
jtulach@678
|
572 |
v, // The member value.
|
jtulach@678
|
573 |
length,
|
jtulach@678
|
574 |
mind = gap,
|
jtulach@678
|
575 |
partial,
|
jtulach@678
|
576 |
value = holder[key];
|
jtulach@678
|
577 |
|
jtulach@678
|
578 |
if (value && typeof value === 'object' &&
|
jtulach@678
|
579 |
typeof value.toJSON === 'function') {
|
jtulach@678
|
580 |
value = value.toJSON(key);
|
jtulach@678
|
581 |
}
|
jtulach@678
|
582 |
if (typeof rep === 'function') {
|
jtulach@678
|
583 |
value = rep.call(holder, key, value);
|
jtulach@678
|
584 |
}
|
jtulach@678
|
585 |
|
jtulach@678
|
586 |
switch (typeof value) {
|
jtulach@678
|
587 |
case 'string':
|
jtulach@678
|
588 |
return quote(value);
|
jtulach@678
|
589 |
|
jtulach@678
|
590 |
case 'number':
|
jtulach@678
|
591 |
return isFinite(value) ? String(value) : 'null';
|
jtulach@678
|
592 |
|
jtulach@678
|
593 |
case 'boolean':
|
jtulach@678
|
594 |
case 'null':
|
jtulach@678
|
595 |
|
jtulach@678
|
596 |
return String(value);
|
jtulach@678
|
597 |
|
jtulach@678
|
598 |
case 'object':
|
jtulach@678
|
599 |
|
jtulach@678
|
600 |
if (!value) {
|
jtulach@678
|
601 |
return 'null';
|
jtulach@678
|
602 |
}
|
jtulach@678
|
603 |
gap += indent;
|
jtulach@678
|
604 |
partial = [];
|
jtulach@678
|
605 |
|
jtulach@678
|
606 |
if (typeof value.length === 'number' &&
|
jtulach@678
|
607 |
!(value.propertyIsEnumerable('length'))) {
|
jtulach@678
|
608 |
|
jtulach@678
|
609 |
length = value.length;
|
jtulach@678
|
610 |
for (i = 0; i < length; i += 1) {
|
jtulach@678
|
611 |
partial[i] = str(i, value) || 'null';
|
jtulach@678
|
612 |
}
|
jtulach@678
|
613 |
|
jtulach@678
|
614 |
v = partial.length === 0 ? '[]' :
|
jtulach@678
|
615 |
gap ? '[\n' + gap +
|
jtulach@678
|
616 |
partial.join(',\n' + gap) + '\n' +
|
jtulach@678
|
617 |
mind + ']' :
|
jtulach@678
|
618 |
'[' + partial.join(',') + ']';
|
jtulach@678
|
619 |
gap = mind;
|
jtulach@678
|
620 |
return v;
|
jtulach@678
|
621 |
}
|
jtulach@678
|
622 |
|
jtulach@678
|
623 |
if (rep && typeof rep === 'object') {
|
jtulach@678
|
624 |
length = rep.length;
|
jtulach@678
|
625 |
for (i = 0; i < length; i += 1) {
|
jtulach@678
|
626 |
k = rep[i];
|
jtulach@678
|
627 |
if (typeof k === 'string') {
|
jtulach@678
|
628 |
v = str(k, value);
|
jtulach@678
|
629 |
if (v) {
|
jtulach@678
|
630 |
partial.push(quote(k) + (gap ? ': ' : ':') + v);
|
jtulach@678
|
631 |
}
|
jtulach@678
|
632 |
}
|
jtulach@678
|
633 |
}
|
jtulach@678
|
634 |
} else {
|
jtulach@678
|
635 |
|
jtulach@678
|
636 |
for (k in value) {
|
jtulach@678
|
637 |
if (Object.hasOwnProperty.call(value, k)) {
|
jtulach@678
|
638 |
v = str(k, value);
|
jtulach@678
|
639 |
if (v) {
|
jtulach@678
|
640 |
partial.push(quote(k) + (gap ? ': ' : ':') + v);
|
jtulach@678
|
641 |
}
|
jtulach@678
|
642 |
}
|
jtulach@678
|
643 |
}
|
jtulach@678
|
644 |
}
|
jtulach@678
|
645 |
|
jtulach@678
|
646 |
v = partial.length === 0 ? '{}' :
|
jtulach@678
|
647 |
gap ? '{\n' + gap + partial.join(',\n' + gap) + '\n' +
|
jtulach@678
|
648 |
mind + '}' : '{' + partial.join(',') + '}';
|
jtulach@678
|
649 |
gap = mind;
|
jtulach@678
|
650 |
return v;
|
jtulach@678
|
651 |
}
|
jtulach@678
|
652 |
}
|
jtulach@678
|
653 |
|
jtulach@678
|
654 |
return {
|
jtulach@678
|
655 |
stringify: function (value, replacer, space) {
|
jtulach@678
|
656 |
|
jtulach@678
|
657 |
var i;
|
jtulach@678
|
658 |
gap = '';
|
jtulach@678
|
659 |
indent = '';
|
jtulach@678
|
660 |
|
jtulach@678
|
661 |
if (typeof space === 'number') {
|
jtulach@678
|
662 |
for (i = 0; i < space; i += 1) {
|
jtulach@678
|
663 |
indent += ' ';
|
jtulach@678
|
664 |
}
|
jtulach@678
|
665 |
|
jtulach@678
|
666 |
} else if (typeof space === 'string') {
|
jtulach@678
|
667 |
indent = space;
|
jtulach@678
|
668 |
}
|
jtulach@678
|
669 |
|
jtulach@678
|
670 |
rep = replacer;
|
jtulach@678
|
671 |
if (replacer && typeof replacer !== 'function' &&
|
jtulach@678
|
672 |
(typeof replacer !== 'object' ||
|
jtulach@678
|
673 |
typeof replacer.length !== 'number')) {
|
jtulach@678
|
674 |
throw new Error('JSON.stringify');
|
jtulach@678
|
675 |
}
|
jtulach@678
|
676 |
|
jtulach@678
|
677 |
return str('', {'': value});
|
jtulach@678
|
678 |
},
|
jtulach@678
|
679 |
|
jtulach@678
|
680 |
|
jtulach@678
|
681 |
parse: function (text, reviver) {
|
jtulach@678
|
682 |
var j;
|
jtulach@678
|
683 |
function walk(holder, key) {
|
jtulach@678
|
684 |
var k, v, value = holder[key];
|
jtulach@678
|
685 |
if (value && typeof value === 'object') {
|
jtulach@678
|
686 |
for (k in value) {
|
jtulach@678
|
687 |
if (Object.hasOwnProperty.call(value, k)) {
|
jtulach@678
|
688 |
v = walk(value, k);
|
jtulach@678
|
689 |
if (v !== undefined) {
|
jtulach@678
|
690 |
value[k] = v;
|
jtulach@678
|
691 |
} else {
|
jtulach@678
|
692 |
delete value[k];
|
jtulach@678
|
693 |
}
|
jtulach@678
|
694 |
}
|
jtulach@678
|
695 |
}
|
jtulach@678
|
696 |
}
|
jtulach@678
|
697 |
return reviver.call(holder, key, value);
|
jtulach@678
|
698 |
}
|
jtulach@678
|
699 |
|
jtulach@678
|
700 |
cx.lastIndex = 0;
|
jtulach@678
|
701 |
if (cx.test(text)) {
|
jtulach@678
|
702 |
text = text.replace(cx, function (a) {
|
jtulach@678
|
703 |
return '\\u' + ('0000' +
|
jtulach@678
|
704 |
(+(a.charCodeAt(0))).toString(16)).slice(-4);
|
jtulach@678
|
705 |
});
|
jtulach@678
|
706 |
}
|
jtulach@678
|
707 |
|
jtulach@678
|
708 |
|
jtulach@678
|
709 |
if (/^[\],:{}\s]*$/.
|
jtulach@678
|
710 |
test(text.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g, '@').
|
jtulach@678
|
711 |
replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g, ']').
|
jtulach@678
|
712 |
replace(/(?:^|:|,)(?:\s*\[)+/g, ''))) {
|
jtulach@678
|
713 |
|
jtulach@678
|
714 |
j = eval('(' + text + ')');
|
jtulach@678
|
715 |
|
jtulach@678
|
716 |
return typeof reviver === 'function' ?
|
jtulach@678
|
717 |
walk({'': j}, '') : j;
|
jtulach@678
|
718 |
}
|
jtulach@678
|
719 |
|
jtulach@678
|
720 |
throw new SyntaxError('JSON.parse');
|
jtulach@678
|
721 |
}
|
jtulach@678
|
722 |
};
|
jtulach@678
|
723 |
}();
|
jtulach@678
|
724 |
|
jtulach@678
|
725 |
}
|
jtulach@678
|
726 |
|
jtulach@678
|
727 |
/**
|
jtulach@678
|
728 |
* synchronizes thread modifications
|
jtulach@678
|
729 |
* @param {Function} fn
|
jtulach@678
|
730 |
*/
|
jtulach@678
|
731 |
Envjs.sync = function(fn){};
|
jtulach@678
|
732 |
|
jtulach@678
|
733 |
/**
|
jtulach@678
|
734 |
* sleep thread for specified duration
|
jtulach@678
|
735 |
* @param {Object} millseconds
|
jtulach@678
|
736 |
*/
|
jtulach@678
|
737 |
Envjs.sleep = function(millseconds){};
|
jtulach@678
|
738 |
|
jtulach@678
|
739 |
/**
|
jtulach@678
|
740 |
* Interval to wait on event loop when nothing is happening
|
jtulach@678
|
741 |
*/
|
jtulach@678
|
742 |
Envjs.WAIT_INTERVAL = 20;//milliseconds
|
jtulach@678
|
743 |
|
jtulach@678
|
744 |
/*
|
jtulach@678
|
745 |
* Copyright (c) 2010 Nick Galbreath
|
jtulach@678
|
746 |
* http://code.google.com/p/stringencoders/source/browse/#svn/trunk/javascript
|
jtulach@678
|
747 |
*
|
jtulach@678
|
748 |
* Permission is hereby granted, free of charge, to any person
|
jtulach@678
|
749 |
* obtaining a copy of this software and associated documentation
|
jtulach@678
|
750 |
* files (the "Software"), to deal in the Software without
|
jtulach@678
|
751 |
* restriction, including without limitation the rights to use,
|
jtulach@678
|
752 |
* copy, modify, merge, publish, distribute, sublicense, and/or sell
|
jtulach@678
|
753 |
* copies of the Software, and to permit persons to whom the
|
jtulach@678
|
754 |
* Software is furnished to do so, subject to the following
|
jtulach@678
|
755 |
* conditions:
|
jtulach@678
|
756 |
*
|
jtulach@678
|
757 |
* The above copyright notice and this permission notice shall be
|
jtulach@678
|
758 |
* included in all copies or substantial portions of the Software.
|
jtulach@678
|
759 |
*
|
jtulach@678
|
760 |
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
jtulach@678
|
761 |
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
|
jtulach@678
|
762 |
* OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
jtulach@678
|
763 |
* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
|
jtulach@678
|
764 |
* HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
jtulach@678
|
765 |
* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
jtulach@678
|
766 |
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
jtulach@678
|
767 |
* OTHER DEALINGS IN THE SOFTWARE.
|
jtulach@678
|
768 |
*/
|
jtulach@678
|
769 |
|
jtulach@678
|
770 |
/*
|
jtulach@678
|
771 |
* url processing in the spirit of python's urlparse module
|
jtulach@678
|
772 |
* see `pydoc urlparse` or
|
jtulach@678
|
773 |
* http://docs.python.org/library/urlparse.html
|
jtulach@678
|
774 |
*
|
jtulach@678
|
775 |
* urlsplit: break apart a URL into components
|
jtulach@678
|
776 |
* urlunsplit: reconsistute a URL from componets
|
jtulach@678
|
777 |
* urljoin: join an absolute and another URL
|
jtulach@678
|
778 |
* urldefrag: remove the fragment from a URL
|
jtulach@678
|
779 |
*
|
jtulach@678
|
780 |
* Take a look at the tests in urlparse-test.html
|
jtulach@678
|
781 |
*
|
jtulach@678
|
782 |
* On URL Normalization:
|
jtulach@678
|
783 |
*
|
jtulach@678
|
784 |
* urlsplit only does minor normalization the components Only scheme
|
jtulach@678
|
785 |
* and hostname are lowercased urljoin does a bit more, normalizing
|
jtulach@678
|
786 |
* paths with "." and "..".
|
jtulach@678
|
787 |
|
jtulach@678
|
788 |
* urlnormalize adds additional normalization
|
jtulach@678
|
789 |
*
|
jtulach@678
|
790 |
* * removes default port numbers
|
jtulach@678
|
791 |
* http://abc.com:80/ -> http://abc.com/, etc
|
jtulach@678
|
792 |
* * normalizes path
|
jtulach@678
|
793 |
* http://abc.com -> http://abc.com/
|
jtulach@678
|
794 |
* and other "." and ".." cleanups
|
jtulach@678
|
795 |
* * if file, remove query and fragment
|
jtulach@678
|
796 |
*
|
jtulach@678
|
797 |
* It does not do:
|
jtulach@678
|
798 |
* * normalizes escaped hex values
|
jtulach@678
|
799 |
* http://abc.com/%7efoo -> http://abc.com/%7Efoo
|
jtulach@678
|
800 |
* * normalize '+' <--> '%20'
|
jtulach@678
|
801 |
*
|
jtulach@678
|
802 |
* Differences with Python
|
jtulach@678
|
803 |
*
|
jtulach@678
|
804 |
* The javascript urlsplit returns a normal object with the following
|
jtulach@678
|
805 |
* properties: scheme, netloc, hostname, port, path, query, fragment.
|
jtulach@678
|
806 |
* All properties are read-write.
|
jtulach@678
|
807 |
*
|
jtulach@678
|
808 |
* In python, the resulting object is not a dict, but a specialized,
|
jtulach@678
|
809 |
* read-only, and has alternative tuple interface (e.g. obj[0] ==
|
jtulach@678
|
810 |
* obj.scheme). It's not clear why such a simple function requires
|
jtulach@678
|
811 |
* a unique datastructure.
|
jtulach@678
|
812 |
*
|
jtulach@678
|
813 |
* urlunsplit in javascript takes an duck-typed object,
|
jtulach@678
|
814 |
* { scheme: 'http', netloc: 'abc.com', ...}
|
jtulach@678
|
815 |
* while in * python it takes a list-like object.
|
jtulach@678
|
816 |
* ['http', 'abc.com'... ]
|
jtulach@678
|
817 |
*
|
jtulach@678
|
818 |
* For all functions, the javascript version use
|
jtulach@678
|
819 |
* hostname+port if netloc is missing. In python
|
jtulach@678
|
820 |
* hostname+port were always ignored.
|
jtulach@678
|
821 |
*
|
jtulach@678
|
822 |
* Similar functionality in different languages:
|
jtulach@678
|
823 |
*
|
jtulach@678
|
824 |
* http://php.net/manual/en/function.parse-url.php
|
jtulach@678
|
825 |
* returns assocative array but cannot handle relative URL
|
jtulach@678
|
826 |
*
|
jtulach@678
|
827 |
* TODO: test allowfragments more
|
jtulach@678
|
828 |
* TODO: test netloc missing, but hostname present
|
jtulach@678
|
829 |
*/
|
jtulach@678
|
830 |
|
jtulach@678
|
831 |
var urlparse = {};
|
jtulach@678
|
832 |
|
jtulach@678
|
833 |
// Unlike to be useful standalone
|
jtulach@678
|
834 |
//
|
jtulach@678
|
835 |
// NORMALIZE PATH with "../" and "./"
|
jtulach@678
|
836 |
// http://en.wikipedia.org/wiki/URL_normalization
|
jtulach@678
|
837 |
// http://tools.ietf.org/html/rfc3986#section-5.2.3
|
jtulach@678
|
838 |
//
|
jtulach@678
|
839 |
urlparse.normalizepath = function(path)
|
jtulach@678
|
840 |
{
|
jtulach@678
|
841 |
if (!path || path === '/') {
|
jtulach@678
|
842 |
return '/';
|
jtulach@678
|
843 |
}
|
jtulach@678
|
844 |
|
jtulach@678
|
845 |
var parts = path.split('/');
|
jtulach@678
|
846 |
|
jtulach@678
|
847 |
var newparts = [];
|
jtulach@678
|
848 |
// make sure path always starts with '/'
|
jtulach@678
|
849 |
if (parts[0]) {
|
jtulach@678
|
850 |
newparts.push('');
|
jtulach@678
|
851 |
}
|
jtulach@678
|
852 |
|
jtulach@678
|
853 |
for (var i = 0; i < parts.length; ++i) {
|
jtulach@678
|
854 |
if (parts[i] === '..') {
|
jtulach@678
|
855 |
if (newparts.length > 1) {
|
jtulach@678
|
856 |
newparts.pop();
|
jtulach@678
|
857 |
} else {
|
jtulach@678
|
858 |
newparts.push(parts[i]);
|
jtulach@678
|
859 |
}
|
jtulach@678
|
860 |
} else if (parts[i] != '.') {
|
jtulach@678
|
861 |
newparts.push(parts[i]);
|
jtulach@678
|
862 |
}
|
jtulach@678
|
863 |
}
|
jtulach@678
|
864 |
|
jtulach@678
|
865 |
path = newparts.join('/');
|
jtulach@678
|
866 |
if (!path) {
|
jtulach@678
|
867 |
path = '/';
|
jtulach@678
|
868 |
}
|
jtulach@678
|
869 |
return path;
|
jtulach@678
|
870 |
};
|
jtulach@678
|
871 |
|
jtulach@678
|
872 |
//
|
jtulach@678
|
873 |
// Does many of the normalizations that the stock
|
jtulach@678
|
874 |
// python urlsplit/urlunsplit/urljoin neglects
|
jtulach@678
|
875 |
//
|
jtulach@678
|
876 |
// Doesn't do hex-escape normalization on path or query
|
jtulach@678
|
877 |
// %7e -> %7E
|
jtulach@678
|
878 |
// Nor, '+' <--> %20 translation
|
jtulach@678
|
879 |
//
|
jtulach@678
|
880 |
urlparse.urlnormalize = function(url)
|
jtulach@678
|
881 |
{
|
jtulach@678
|
882 |
var parts = urlparse.urlsplit(url);
|
jtulach@678
|
883 |
switch (parts.scheme) {
|
jtulach@678
|
884 |
case 'file':
|
jtulach@678
|
885 |
// files can't have query strings
|
jtulach@678
|
886 |
// and we don't bother with fragments
|
jtulach@678
|
887 |
parts.query = '';
|
jtulach@678
|
888 |
parts.fragment = '';
|
jtulach@678
|
889 |
break;
|
jtulach@678
|
890 |
case 'http':
|
jtulach@678
|
891 |
case 'https':
|
jtulach@678
|
892 |
// remove default port
|
jtulach@678
|
893 |
if ((parts.scheme === 'http' && parts.port == 80) ||
|
jtulach@678
|
894 |
(parts.scheme === 'https' && parts.port == 443)) {
|
jtulach@678
|
895 |
parts.port = null;
|
jtulach@678
|
896 |
// hostname is already lower case
|
jtulach@678
|
897 |
parts.netloc = parts.hostname;
|
jtulach@678
|
898 |
}
|
jtulach@678
|
899 |
break;
|
jtulach@678
|
900 |
default:
|
jtulach@678
|
901 |
// if we don't have specific normalizations for this
|
jtulach@678
|
902 |
// scheme, return the original url unmolested
|
jtulach@678
|
903 |
return url;
|
jtulach@678
|
904 |
}
|
jtulach@678
|
905 |
|
jtulach@678
|
906 |
// for [file|http|https]. Not sure about other schemes
|
jtulach@678
|
907 |
parts.path = urlparse.normalizepath(parts.path);
|
jtulach@678
|
908 |
|
jtulach@678
|
909 |
return urlparse.urlunsplit(parts);
|
jtulach@678
|
910 |
};
|
jtulach@678
|
911 |
|
jtulach@678
|
912 |
urlparse.urldefrag = function(url)
|
jtulach@678
|
913 |
{
|
jtulach@678
|
914 |
var idx = url.indexOf('#');
|
jtulach@678
|
915 |
if (idx == -1) {
|
jtulach@678
|
916 |
return [ url, '' ];
|
jtulach@678
|
917 |
} else {
|
jtulach@678
|
918 |
return [ url.substr(0,idx), url.substr(idx+1) ];
|
jtulach@678
|
919 |
}
|
jtulach@678
|
920 |
};
|
jtulach@678
|
921 |
|
jtulach@678
|
922 |
urlparse.urlsplit = function(url, default_scheme, allow_fragments)
|
jtulach@678
|
923 |
{
|
jtulach@678
|
924 |
var leftover;
|
jtulach@678
|
925 |
|
jtulach@678
|
926 |
if (typeof allow_fragments === 'undefined') {
|
jtulach@678
|
927 |
allow_fragments = true;
|
jtulach@678
|
928 |
}
|
jtulach@678
|
929 |
|
jtulach@678
|
930 |
// scheme (optional), host, port
|
jtulach@678
|
931 |
var fullurl = /^([A-Za-z]+)?(:?\/\/)([0-9.\-A-Za-z]*)(?::(\d+))?(.*)$/;
|
jtulach@678
|
932 |
// path, query, fragment
|
jtulach@678
|
933 |
var parse_leftovers = /([^?#]*)?(?:\?([^#]*))?(?:#(.*))?$/;
|
jtulach@678
|
934 |
|
jtulach@678
|
935 |
var o = {};
|
jtulach@678
|
936 |
|
jtulach@678
|
937 |
var parts = url.match(fullurl);
|
jtulach@678
|
938 |
if (parts) {
|
jtulach@678
|
939 |
o.scheme = parts[1] || default_scheme || '';
|
jtulach@678
|
940 |
o.hostname = parts[3].toLowerCase() || '';
|
jtulach@678
|
941 |
o.port = parseInt(parts[4],10) || '';
|
jtulach@678
|
942 |
// Probably should grab the netloc from regexp
|
jtulach@678
|
943 |
// and then parse again for hostname/port
|
jtulach@678
|
944 |
|
jtulach@678
|
945 |
o.netloc = parts[3];
|
jtulach@678
|
946 |
if (parts[4]) {
|
jtulach@678
|
947 |
o.netloc += ':' + parts[4];
|
jtulach@678
|
948 |
}
|
jtulach@678
|
949 |
|
jtulach@678
|
950 |
leftover = parts[5];
|
jtulach@678
|
951 |
} else {
|
jtulach@678
|
952 |
o.scheme = default_scheme || '';
|
jtulach@678
|
953 |
o.netloc = '';
|
jtulach@678
|
954 |
o.hostname = '';
|
jtulach@678
|
955 |
leftover = url;
|
jtulach@678
|
956 |
}
|
jtulach@678
|
957 |
o.scheme = o.scheme.toLowerCase();
|
jtulach@678
|
958 |
|
jtulach@678
|
959 |
parts = leftover.match(parse_leftovers);
|
jtulach@678
|
960 |
|
jtulach@678
|
961 |
o.path = parts[1] || '';
|
jtulach@678
|
962 |
o.query = parts[2] || '';
|
jtulach@678
|
963 |
|
jtulach@678
|
964 |
if (allow_fragments) {
|
jtulach@678
|
965 |
o.fragment = parts[3] || '';
|
jtulach@678
|
966 |
} else {
|
jtulach@678
|
967 |
o.fragment = '';
|
jtulach@678
|
968 |
}
|
jtulach@678
|
969 |
|
jtulach@678
|
970 |
return o;
|
jtulach@678
|
971 |
};
|
jtulach@678
|
972 |
|
jtulach@678
|
973 |
urlparse.urlunsplit = function(o) {
|
jtulach@678
|
974 |
var s = '';
|
jtulach@678
|
975 |
if (o.scheme) {
|
jtulach@678
|
976 |
s += o.scheme + '://';
|
jtulach@678
|
977 |
}
|
jtulach@678
|
978 |
|
jtulach@678
|
979 |
if (o.netloc) {
|
jtulach@678
|
980 |
if (s == '') {
|
jtulach@678
|
981 |
s += '//';
|
jtulach@678
|
982 |
}
|
jtulach@678
|
983 |
s += o.netloc;
|
jtulach@678
|
984 |
} else if (o.hostname) {
|
jtulach@678
|
985 |
// extension. Python only uses netloc
|
jtulach@678
|
986 |
if (s == '') {
|
jtulach@678
|
987 |
s += '//';
|
jtulach@678
|
988 |
}
|
jtulach@678
|
989 |
s += o.hostname;
|
jtulach@678
|
990 |
if (o.port) {
|
jtulach@678
|
991 |
s += ':' + o.port;
|
jtulach@678
|
992 |
}
|
jtulach@678
|
993 |
}
|
jtulach@678
|
994 |
|
jtulach@678
|
995 |
if (o.path) {
|
jtulach@678
|
996 |
s += o.path;
|
jtulach@678
|
997 |
}
|
jtulach@678
|
998 |
|
jtulach@678
|
999 |
if (o.query) {
|
jtulach@678
|
1000 |
s += '?' + o.query;
|
jtulach@678
|
1001 |
}
|
jtulach@678
|
1002 |
if (o.fragment) {
|
jtulach@678
|
1003 |
s += '#' + o.fragment;
|
jtulach@678
|
1004 |
}
|
jtulach@678
|
1005 |
return s;
|
jtulach@678
|
1006 |
};
|
jtulach@678
|
1007 |
|
jtulach@678
|
1008 |
urlparse.urljoin = function(base, url, allow_fragments)
|
jtulach@678
|
1009 |
{
|
jtulach@678
|
1010 |
if (typeof allow_fragments === 'undefined') {
|
jtulach@678
|
1011 |
allow_fragments = true;
|
jtulach@678
|
1012 |
}
|
jtulach@678
|
1013 |
|
jtulach@678
|
1014 |
var url_parts = urlparse.urlsplit(url);
|
jtulach@678
|
1015 |
|
jtulach@678
|
1016 |
// if url parts has a scheme (i.e. absolute)
|
jtulach@678
|
1017 |
// then nothing to do
|
jtulach@678
|
1018 |
if (url_parts.scheme) {
|
jtulach@678
|
1019 |
if (! allow_fragments) {
|
jtulach@678
|
1020 |
return url;
|
jtulach@678
|
1021 |
} else {
|
jtulach@678
|
1022 |
return urlparse.urldefrag(url)[0];
|
jtulach@678
|
1023 |
}
|
jtulach@678
|
1024 |
}
|
jtulach@678
|
1025 |
var base_parts = urlparse.urlsplit(base);
|
jtulach@678
|
1026 |
|
jtulach@678
|
1027 |
// copy base, only if not present
|
jtulach@678
|
1028 |
if (!base_parts.scheme) {
|
jtulach@678
|
1029 |
base_parts.scheme = url_parts.scheme;
|
jtulach@678
|
1030 |
}
|
jtulach@678
|
1031 |
|
jtulach@678
|
1032 |
// copy netloc, only if not present
|
jtulach@678
|
1033 |
if (!base_parts.netloc || !base_parts.hostname) {
|
jtulach@678
|
1034 |
base_parts.netloc = url_parts.netloc;
|
jtulach@678
|
1035 |
base_parts.hostname = url_parts.hostname;
|
jtulach@678
|
1036 |
base_parts.port = url_parts.port;
|
jtulach@678
|
1037 |
}
|
jtulach@678
|
1038 |
|
jtulach@678
|
1039 |
// paths
|
jtulach@678
|
1040 |
if (url_parts.path.length > 0) {
|
jtulach@678
|
1041 |
if (url_parts.path.charAt(0) == '/') {
|
jtulach@678
|
1042 |
base_parts.path = url_parts.path;
|
jtulach@678
|
1043 |
} else {
|
jtulach@678
|
1044 |
// relative path.. get rid of "current filename" and
|
jtulach@678
|
1045 |
// replace. Same as var parts =
|
jtulach@678
|
1046 |
// base_parts.path.split('/'); parts[parts.length-1] =
|
jtulach@678
|
1047 |
// url_parts.path; base_parts.path = parts.join('/');
|
jtulach@678
|
1048 |
var idx = base_parts.path.lastIndexOf('/');
|
jtulach@678
|
1049 |
if (idx == -1) {
|
jtulach@678
|
1050 |
base_parts.path = url_parts.path;
|
jtulach@678
|
1051 |
} else {
|
jtulach@678
|
1052 |
base_parts.path = base_parts.path.substr(0,idx) + '/' +
|
jtulach@678
|
1053 |
url_parts.path;
|
jtulach@678
|
1054 |
}
|
jtulach@678
|
1055 |
}
|
jtulach@678
|
1056 |
}
|
jtulach@678
|
1057 |
|
jtulach@678
|
1058 |
// clean up path
|
jtulach@678
|
1059 |
base_parts.path = urlparse.normalizepath(base_parts.path);
|
jtulach@678
|
1060 |
|
jtulach@678
|
1061 |
// copy query string
|
jtulach@678
|
1062 |
base_parts.query = url_parts.query;
|
jtulach@678
|
1063 |
|
jtulach@678
|
1064 |
// copy fragments
|
jtulach@678
|
1065 |
if (allow_fragments) {
|
jtulach@678
|
1066 |
base_parts.fragment = url_parts.fragment;
|
jtulach@678
|
1067 |
} else {
|
jtulach@678
|
1068 |
base_parts.fragment = '';
|
jtulach@678
|
1069 |
}
|
jtulach@678
|
1070 |
|
jtulach@678
|
1071 |
return urlparse.urlunsplit(base_parts);
|
jtulach@678
|
1072 |
};
|
jtulach@678
|
1073 |
|
jtulach@678
|
1074 |
/**
|
jtulach@678
|
1075 |
* getcwd - named after posix call of same name (see 'man 2 getcwd')
|
jtulach@678
|
1076 |
*
|
jtulach@678
|
1077 |
*/
|
jtulach@678
|
1078 |
Envjs.getcwd = function() {
|
jtulach@678
|
1079 |
return '.';
|
jtulach@678
|
1080 |
};
|
jtulach@678
|
1081 |
|
jtulach@678
|
1082 |
/**
|
jtulach@678
|
1083 |
* resolves location relative to doc location
|
jtulach@678
|
1084 |
*
|
jtulach@678
|
1085 |
* @param {Object} path Relative or absolute URL
|
jtulach@678
|
1086 |
* @param {Object} base (semi-optional) The base url used in resolving "path" above
|
jtulach@678
|
1087 |
*/
|
jtulach@678
|
1088 |
Envjs.uri = function(path, base) {
|
jtulach@678
|
1089 |
//console.log('constructing uri from path %s and base %s', path, base);
|
jtulach@678
|
1090 |
|
jtulach@678
|
1091 |
// Semi-common trick is to make an iframe with src='javascript:false'
|
jtulach@678
|
1092 |
// (or some equivalent). By returning '', the load is skipped
|
jtulach@678
|
1093 |
if (path.indexOf('javascript') === 0) {
|
jtulach@678
|
1094 |
return '';
|
jtulach@678
|
1095 |
}
|
jtulach@678
|
1096 |
|
jtulach@678
|
1097 |
// if path is absolute, then just normalize and return
|
jtulach@678
|
1098 |
if (path.match('^[a-zA-Z]+://')) {
|
jtulach@678
|
1099 |
return urlparse.urlnormalize(path);
|
jtulach@678
|
1100 |
}
|
jtulach@678
|
1101 |
|
jtulach@678
|
1102 |
// interesting special case, a few very large websites use
|
jtulach@678
|
1103 |
// '//foo/bar/' to mean 'http://foo/bar'
|
jtulach@678
|
1104 |
if (path.match('^//')) {
|
jtulach@678
|
1105 |
path = 'http:' + path;
|
jtulach@678
|
1106 |
}
|
jtulach@678
|
1107 |
|
jtulach@678
|
1108 |
// if base not passed in, try to get it from document
|
jtulach@678
|
1109 |
// Ideally I would like the caller to pass in document.baseURI to
|
jtulach@678
|
1110 |
// make this more self-sufficient and testable
|
jtulach@678
|
1111 |
if (!base && document) {
|
jtulach@678
|
1112 |
base = document.baseURI;
|
jtulach@678
|
1113 |
}
|
jtulach@678
|
1114 |
|
jtulach@678
|
1115 |
// about:blank doesn't count
|
jtulach@678
|
1116 |
if (base === 'about:blank'){
|
jtulach@678
|
1117 |
base = '';
|
jtulach@678
|
1118 |
}
|
jtulach@678
|
1119 |
|
jtulach@678
|
1120 |
// if base is still empty, then we are in QA mode loading local
|
jtulach@678
|
1121 |
// files. Get current working directory
|
jtulach@678
|
1122 |
if (!base) {
|
jtulach@678
|
1123 |
base = 'file://' + Envjs.getcwd() + '/';
|
jtulach@678
|
1124 |
}
|
jtulach@678
|
1125 |
// handles all cases if path is abosulte or relative to base
|
jtulach@678
|
1126 |
// 3rd arg is "false" --> remove fragments
|
jtulach@678
|
1127 |
var newurl = urlparse.urlnormalize(urlparse.urljoin(base, path, false));
|
jtulach@678
|
1128 |
|
jtulach@678
|
1129 |
return newurl;
|
jtulach@678
|
1130 |
};
|
jtulach@678
|
1131 |
|
jtulach@678
|
1132 |
|
jtulach@678
|
1133 |
|
jtulach@678
|
1134 |
/**
|
jtulach@678
|
1135 |
* Used in the XMLHttpRquest implementation to run a
|
jtulach@678
|
1136 |
* request in a seperate thread
|
jtulach@678
|
1137 |
* @param {Object} fn
|
jtulach@678
|
1138 |
*/
|
jtulach@678
|
1139 |
Envjs.runAsync = function(fn){};
|
jtulach@678
|
1140 |
|
jtulach@678
|
1141 |
|
jtulach@678
|
1142 |
/**
|
jtulach@678
|
1143 |
* Used to write to a local file
|
jtulach@678
|
1144 |
* @param {Object} text
|
jtulach@678
|
1145 |
* @param {Object} url
|
jtulach@678
|
1146 |
*/
|
jtulach@678
|
1147 |
Envjs.writeToFile = function(text, url){};
|
jtulach@678
|
1148 |
|
jtulach@678
|
1149 |
|
jtulach@678
|
1150 |
/**
|
jtulach@678
|
1151 |
* Used to write to a local file
|
jtulach@678
|
1152 |
* @param {Object} text
|
jtulach@678
|
1153 |
* @param {Object} suffix
|
jtulach@678
|
1154 |
*/
|
jtulach@678
|
1155 |
Envjs.writeToTempFile = function(text, suffix){};
|
jtulach@678
|
1156 |
|
jtulach@678
|
1157 |
/**
|
jtulach@678
|
1158 |
* Used to read the contents of a local file
|
jtulach@678
|
1159 |
* @param {Object} url
|
jtulach@678
|
1160 |
*/
|
jtulach@678
|
1161 |
Envjs.readFromFile = function(url){};
|
jtulach@678
|
1162 |
|
jtulach@678
|
1163 |
/**
|
jtulach@678
|
1164 |
* Used to delete a local file
|
jtulach@678
|
1165 |
* @param {Object} url
|
jtulach@678
|
1166 |
*/
|
jtulach@678
|
1167 |
Envjs.deleteFile = function(url){};
|
jtulach@678
|
1168 |
|
jtulach@678
|
1169 |
/**
|
jtulach@678
|
1170 |
* establishes connection and calls responsehandler
|
jtulach@678
|
1171 |
* @param {Object} xhr
|
jtulach@678
|
1172 |
* @param {Object} responseHandler
|
jtulach@678
|
1173 |
* @param {Object} data
|
jtulach@678
|
1174 |
*/
|
jtulach@678
|
1175 |
Envjs.connection = function(xhr, responseHandler, data){};
|
jtulach@678
|
1176 |
|
jtulach@678
|
1177 |
|
jtulach@678
|
1178 |
__extend__(Envjs, urlparse);
|
jtulach@678
|
1179 |
|
jtulach@678
|
1180 |
/**
|
jtulach@678
|
1181 |
* Makes an object window-like by proxying object accessors
|
jtulach@678
|
1182 |
* @param {Object} scope
|
jtulach@678
|
1183 |
* @param {Object} parent
|
jtulach@678
|
1184 |
*/
|
jtulach@678
|
1185 |
Envjs.proxy = function(scope, parent, aliasList){};
|
jtulach@678
|
1186 |
|
jtulach@678
|
1187 |
Envjs.javaEnabled = false;
|
jtulach@678
|
1188 |
|
jtulach@678
|
1189 |
Envjs.homedir = '';
|
jtulach@678
|
1190 |
Envjs.tmpdir = '';
|
jtulach@678
|
1191 |
Envjs.os_name = '';
|
jtulach@678
|
1192 |
Envjs.os_arch = '';
|
jtulach@678
|
1193 |
Envjs.os_version = '';
|
jtulach@678
|
1194 |
Envjs.lang = '';
|
jtulach@678
|
1195 |
Envjs.platform = '';
|
jtulach@678
|
1196 |
|
jtulach@678
|
1197 |
/**
|
jtulach@678
|
1198 |
*
|
jtulach@678
|
1199 |
* @param {Object} frameElement
|
jtulach@678
|
1200 |
* @param {Object} url
|
jtulach@678
|
1201 |
*/
|
jtulach@678
|
1202 |
Envjs.loadFrame = function(frame, url){
|
jtulach@678
|
1203 |
try {
|
jtulach@678
|
1204 |
if(frame.contentWindow){
|
jtulach@678
|
1205 |
//mark for garbage collection
|
jtulach@678
|
1206 |
frame.contentWindow = null;
|
jtulach@678
|
1207 |
}
|
jtulach@678
|
1208 |
|
jtulach@678
|
1209 |
//create a new scope for the window proxy
|
jtulach@678
|
1210 |
//platforms will need to override this function
|
jtulach@678
|
1211 |
//to make sure the scope is global-like
|
jtulach@678
|
1212 |
frame.contentWindow = (function(){return this;})();
|
jtulach@678
|
1213 |
new Window(frame.contentWindow, window);
|
jtulach@678
|
1214 |
|
jtulach@678
|
1215 |
//I dont think frames load asynchronously in firefox
|
jtulach@678
|
1216 |
//and I think the tests have verified this but for
|
jtulach@678
|
1217 |
//some reason I'm less than confident... Are there cases?
|
jtulach@678
|
1218 |
frame.contentDocument = frame.contentWindow.document;
|
jtulach@678
|
1219 |
frame.contentDocument.async = false;
|
jtulach@678
|
1220 |
if(url){
|
jtulach@678
|
1221 |
//console.log('envjs.loadFrame async %s', frame.contentDocument.async);
|
jtulach@678
|
1222 |
frame.contentWindow.location = url;
|
jtulach@678
|
1223 |
}
|
jtulach@678
|
1224 |
} catch(e) {
|
jtulach@678
|
1225 |
console.log("failed to load frame content: from %s %s", url, e);
|
jtulach@678
|
1226 |
}
|
jtulach@678
|
1227 |
};
|
jtulach@678
|
1228 |
|
jtulach@678
|
1229 |
|
jtulach@678
|
1230 |
// The following are in rhino/window.js
|
jtulach@678
|
1231 |
// TODO: Envjs.unloadFrame
|
jtulach@678
|
1232 |
// TODO: Envjs.proxy
|
jtulach@678
|
1233 |
|
jtulach@678
|
1234 |
/**
|
jtulach@678
|
1235 |
* @author john resig & the envjs team
|
jtulach@678
|
1236 |
* @uri http://www.envjs.com/
|
jtulach@678
|
1237 |
* @copyright 2008-2010
|
jtulach@678
|
1238 |
* @license MIT
|
jtulach@678
|
1239 |
*/
|
jtulach@678
|
1240 |
//CLOSURE_END
|
jtulach@678
|
1241 |
}());
|
jtulach@678
|
1242 |
/*
|
jtulach@678
|
1243 |
* Envjs rhino-env.1.2.13
|
jtulach@678
|
1244 |
* Pure JavaScript Browser Environment
|
jtulach@678
|
1245 |
* By John Resig <http://ejohn.org/> and the Envjs Team
|
jtulach@678
|
1246 |
* Copyright 2008-2010 John Resig, under the MIT License
|
jtulach@678
|
1247 |
*/
|
jtulach@678
|
1248 |
|
jtulach@678
|
1249 |
var __context__ = Packages.jdk.nashorn.internal.runtime.Context.getContext();
|
jtulach@678
|
1250 |
|
jtulach@678
|
1251 |
Envjs.platform = "Nashorn";
|
jtulach@678
|
1252 |
Envjs.revision = "0.1";
|
jtulach@678
|
1253 |
|
jtulach@678
|
1254 |
/*
|
jtulach@678
|
1255 |
* Envjs rhino-env.1.2.13
|
jtulach@678
|
1256 |
* Pure JavaScript Browser Environment
|
jtulach@678
|
1257 |
* By John Resig <http://ejohn.org/> and the Envjs Team
|
jtulach@678
|
1258 |
* Copyright 2008-2010 John Resig, under the MIT License
|
jtulach@678
|
1259 |
*/
|
jtulach@678
|
1260 |
|
jtulach@678
|
1261 |
//CLOSURE_START
|
jtulach@678
|
1262 |
(function(){
|
jtulach@678
|
1263 |
|
jtulach@678
|
1264 |
|
jtulach@678
|
1265 |
|
jtulach@678
|
1266 |
|
jtulach@678
|
1267 |
|
jtulach@678
|
1268 |
/**
|
jtulach@678
|
1269 |
* @author john resig
|
jtulach@678
|
1270 |
*/
|
jtulach@678
|
1271 |
// Helper method for extending one object with another.
|
jtulach@678
|
1272 |
function __extend__(a,b) {
|
jtulach@678
|
1273 |
for ( var i in b ) {
|
jtulach@678
|
1274 |
var g = b.__lookupGetter__(i), s = b.__lookupSetter__(i);
|
jtulach@678
|
1275 |
if ( g || s ) {
|
jtulach@678
|
1276 |
if ( g ) { a.__defineGetter__(i, g); }
|
jtulach@678
|
1277 |
if ( s ) { a.__defineSetter__(i, s); }
|
jtulach@678
|
1278 |
} else {
|
jtulach@678
|
1279 |
a[i] = b[i];
|
jtulach@678
|
1280 |
}
|
jtulach@678
|
1281 |
} return a;
|
jtulach@678
|
1282 |
}
|
jtulach@678
|
1283 |
|
jtulach@678
|
1284 |
/**
|
jtulach@678
|
1285 |
* Writes message to system out.
|
jtulach@678
|
1286 |
*
|
jtulach@678
|
1287 |
* Some sites redefine 'print' as in 'window.print', so instead of
|
jtulach@678
|
1288 |
* printing to stdout, you are popping open a new window, which might
|
jtulach@678
|
1289 |
* call print, etc, etc,etc This can cause infinite loops and can
|
jtulach@678
|
1290 |
* exhausing all memory.
|
jtulach@678
|
1291 |
*
|
jtulach@678
|
1292 |
* By defining this upfront now, Envjs.log will always call the native 'print'
|
jtulach@678
|
1293 |
* function
|
jtulach@678
|
1294 |
*
|
jtulach@678
|
1295 |
* @param {Object} message
|
jtulach@678
|
1296 |
*/
|
jtulach@678
|
1297 |
Envjs.log = print;
|
jtulach@678
|
1298 |
|
jtulach@678
|
1299 |
Envjs.lineSource = function(e){
|
jtulach@678
|
1300 |
return e&&e.rhinoException?e.rhinoException.lineSource():"(line ?)";
|
jtulach@678
|
1301 |
};
|
jtulach@678
|
1302 |
/**
|
jtulach@678
|
1303 |
* load and execute script tag text content
|
jtulach@678
|
1304 |
* @param {Object} script
|
jtulach@678
|
1305 |
*/
|
jtulach@678
|
1306 |
Envjs.loadInlineScript = function(script){
|
jtulach@678
|
1307 |
if(script.ownerDocument.ownerWindow){
|
jtulach@678
|
1308 |
Envjs.eval(
|
jtulach@678
|
1309 |
script.ownerDocument.ownerWindow,
|
jtulach@678
|
1310 |
script.text,
|
jtulach@678
|
1311 |
'eval('+script.text.substring(0,16)+'...):'+new Date().getTime()
|
jtulach@678
|
1312 |
);
|
jtulach@678
|
1313 |
}else{
|
jtulach@678
|
1314 |
Envjs.eval(
|
jtulach@678
|
1315 |
__this__,
|
jtulach@678
|
1316 |
script.text,
|
jtulach@678
|
1317 |
'eval('+script.text.substring(0,16)+'...):'+new Date().getTime()
|
jtulach@678
|
1318 |
);
|
jtulach@678
|
1319 |
}
|
jtulach@678
|
1320 |
//console.log('evaluated at scope %s \n%s',
|
jtulach@678
|
1321 |
// script.ownerDocument.ownerWindow.guid, script.text);
|
jtulach@678
|
1322 |
};
|
jtulach@678
|
1323 |
|
jtulach@678
|
1324 |
|
jtulach@678
|
1325 |
Envjs.eval = function(context, source, name){
|
jtulach@678
|
1326 |
__context__.eval(context, source, null, name, false);
|
jtulach@678
|
1327 |
};
|
jtulach@678
|
1328 |
|
jtulach@678
|
1329 |
|
jtulach@678
|
1330 |
/**
|
jtulach@678
|
1331 |
* Rhino provides a very succinct 'sync'
|
jtulach@678
|
1332 |
* @param {Function} fn
|
jtulach@678
|
1333 |
*/
|
jtulach@678
|
1334 |
Envjs.sync = function(fn){
|
jtulach@678
|
1335 |
//console.log('Threadless platform, sync is safe');
|
jtulach@678
|
1336 |
return fn;
|
jtulach@678
|
1337 |
};
|
jtulach@678
|
1338 |
Envjs.spawn = function(fn){
|
jtulach@678
|
1339 |
//console.log('Threadless platform, spawn shares main thread.');
|
jtulach@678
|
1340 |
return fn();
|
jtulach@678
|
1341 |
};
|
jtulach@678
|
1342 |
|
jtulach@678
|
1343 |
/**
|
jtulach@678
|
1344 |
* sleep thread for specified duration
|
jtulach@678
|
1345 |
* @param {Object} millseconds
|
jtulach@678
|
1346 |
*/
|
jtulach@678
|
1347 |
Envjs.sleep = function(millseconds){
|
jtulach@678
|
1348 |
try{
|
jtulach@678
|
1349 |
java.lang.Thread.sleep(millseconds);
|
jtulach@678
|
1350 |
}catch(e){
|
jtulach@678
|
1351 |
console.log('Threadless platform, cannot sleep.');
|
jtulach@678
|
1352 |
}
|
jtulach@678
|
1353 |
};
|
jtulach@678
|
1354 |
|
jtulach@678
|
1355 |
/**
|
jtulach@678
|
1356 |
* provides callback hook for when the system exits
|
jtulach@678
|
1357 |
*/
|
jtulach@678
|
1358 |
Envjs.onExit = function(callback){
|
jtulach@678
|
1359 |
// TODO add exit listener
|
jtulach@678
|
1360 |
};
|
jtulach@678
|
1361 |
|
jtulach@678
|
1362 |
/**
|
jtulach@678
|
1363 |
* Get 'Current Working Directory'
|
jtulach@678
|
1364 |
*/
|
jtulach@678
|
1365 |
Envjs.getcwd = function() {
|
jtulach@678
|
1366 |
return java.lang.System.getProperty('user.dir');
|
jtulach@678
|
1367 |
}
|
jtulach@678
|
1368 |
|
jtulach@678
|
1369 |
/**
|
jtulach@678
|
1370 |
*
|
jtulach@678
|
1371 |
* @param {Object} fn
|
jtulach@678
|
1372 |
* @param {Object} onInterupt
|
jtulach@678
|
1373 |
*/
|
jtulach@678
|
1374 |
Envjs.runAsync = function(fn, onInterupt){
|
jtulach@678
|
1375 |
////Envjs.debug("running async");
|
jtulach@678
|
1376 |
var running = true,
|
jtulach@678
|
1377 |
run;
|
jtulach@678
|
1378 |
|
jtulach@678
|
1379 |
try{
|
jtulach@678
|
1380 |
run = Envjs.sync(function(){
|
jtulach@678
|
1381 |
fn();
|
jtulach@678
|
1382 |
Envjs.wait();
|
jtulach@678
|
1383 |
});
|
jtulach@678
|
1384 |
Envjs.spawn(run);
|
jtulach@678
|
1385 |
}catch(e){
|
jtulach@678
|
1386 |
console.log("error while running async operation", e);
|
jtulach@678
|
1387 |
try{if(onInterrupt)onInterrupt(e)}catch(ee){};
|
jtulach@678
|
1388 |
}
|
jtulach@678
|
1389 |
};
|
jtulach@678
|
1390 |
|
jtulach@678
|
1391 |
/**
|
jtulach@678
|
1392 |
* Used to write to a local file
|
jtulach@678
|
1393 |
* @param {Object} text
|
jtulach@678
|
1394 |
* @param {Object} url
|
jtulach@678
|
1395 |
*/
|
jtulach@678
|
1396 |
Envjs.writeToFile = function(text, url){
|
jtulach@678
|
1397 |
//Envjs.debug("writing text to url : " + url);
|
jtulach@678
|
1398 |
var out = new java.io.FileWriter(
|
jtulach@678
|
1399 |
new java.io.File(
|
jtulach@678
|
1400 |
new java.net.URI(url.toString())));
|
jtulach@678
|
1401 |
out.write( text, 0, text.length );
|
jtulach@678
|
1402 |
out.flush();
|
jtulach@678
|
1403 |
out.close();
|
jtulach@678
|
1404 |
};
|
jtulach@678
|
1405 |
|
jtulach@678
|
1406 |
/**
|
jtulach@678
|
1407 |
* Used to write to a local file
|
jtulach@678
|
1408 |
* @param {Object} text
|
jtulach@678
|
1409 |
* @param {Object} suffix
|
jtulach@678
|
1410 |
*/
|
jtulach@678
|
1411 |
Envjs.writeToTempFile = function(text, suffix){
|
jtulach@678
|
1412 |
//Envjs.debug("writing text to temp url : " + suffix);
|
jtulach@678
|
1413 |
// Create temp file.
|
jtulach@678
|
1414 |
var temp = java.io.File.createTempFile("envjs-tmp", suffix);
|
jtulach@678
|
1415 |
|
jtulach@678
|
1416 |
// Delete temp file when program exits.
|
jtulach@678
|
1417 |
temp.deleteOnExit();
|
jtulach@678
|
1418 |
|
jtulach@678
|
1419 |
// Write to temp file
|
jtulach@678
|
1420 |
var out = new java.io.FileWriter(temp);
|
jtulach@678
|
1421 |
out.write(text, 0, text.length);
|
jtulach@678
|
1422 |
out.close();
|
jtulach@678
|
1423 |
return temp.getAbsolutePath().toString()+'';
|
jtulach@678
|
1424 |
};
|
jtulach@678
|
1425 |
|
jtulach@678
|
1426 |
|
jtulach@678
|
1427 |
/**
|
jtulach@678
|
1428 |
* Used to read the contents of a local file
|
jtulach@678
|
1429 |
* @param {Object} url
|
jtulach@678
|
1430 |
*/
|
jtulach@678
|
1431 |
Envjs.readFromFile = function( url ){
|
jtulach@678
|
1432 |
var fileReader = new java.io.FileReader(
|
jtulach@678
|
1433 |
new java.io.File(
|
jtulach@678
|
1434 |
new java.net.URI( url )));
|
jtulach@678
|
1435 |
|
jtulach@678
|
1436 |
var stringwriter = new java.io.StringWriter(),
|
jtulach@678
|
1437 |
buffer = java.lang.reflect.Array.newInstance(java.lang.Character.TYPE, 1024),
|
jtulach@678
|
1438 |
length;
|
jtulach@678
|
1439 |
|
jtulach@678
|
1440 |
while ((length = fileReader.read(buffer, 0, 1024)) != -1) {
|
jtulach@678
|
1441 |
stringwriter.write(buffer, 0, length);
|
jtulach@678
|
1442 |
}
|
jtulach@678
|
1443 |
|
jtulach@678
|
1444 |
stringwriter.close();
|
jtulach@678
|
1445 |
return stringwriter.toString()+"";
|
jtulach@678
|
1446 |
};
|
jtulach@678
|
1447 |
|
jtulach@678
|
1448 |
|
jtulach@678
|
1449 |
/**
|
jtulach@678
|
1450 |
* Used to delete a local file
|
jtulach@678
|
1451 |
* @param {Object} url
|
jtulach@678
|
1452 |
*/
|
jtulach@678
|
1453 |
Envjs.deleteFile = function(url){
|
jtulach@678
|
1454 |
var file = new java.io.File( new java.net.URI( url ) );
|
jtulach@678
|
1455 |
file["delete"]();
|
jtulach@678
|
1456 |
};
|
jtulach@678
|
1457 |
|
jtulach@678
|
1458 |
/**
|
jtulach@678
|
1459 |
* establishes connection and calls responsehandler
|
jtulach@678
|
1460 |
* @param {Object} xhr
|
jtulach@678
|
1461 |
* @param {Object} responseHandler
|
jtulach@678
|
1462 |
* @param {Object} data
|
jtulach@678
|
1463 |
*/
|
jtulach@678
|
1464 |
Envjs.connection = function(xhr, responseHandler, data){
|
jtulach@678
|
1465 |
var url = new java.net.URL(xhr.url),
|
jtulach@678
|
1466 |
connection,
|
jtulach@678
|
1467 |
header,
|
jtulach@678
|
1468 |
outstream,
|
jtulach@678
|
1469 |
buffer,
|
jtulach@678
|
1470 |
length,
|
jtulach@678
|
1471 |
binary = false,
|
jtulach@678
|
1472 |
name, value,
|
jtulach@678
|
1473 |
contentEncoding,
|
jtulach@678
|
1474 |
instream,
|
jtulach@678
|
1475 |
responseXML,
|
jtulach@678
|
1476 |
i;
|
jtulach@678
|
1477 |
if ( /^file\:/.test(url) ) {
|
jtulach@678
|
1478 |
try{
|
jtulach@678
|
1479 |
if ( "PUT" == xhr.method || "POST" == xhr.method ) {
|
jtulach@678
|
1480 |
data = data || "" ;
|
jtulach@678
|
1481 |
Envjs.writeToFile(data, url);
|
jtulach@678
|
1482 |
xhr.readyState = 4;
|
jtulach@678
|
1483 |
//could be improved, I just cant recall the correct http codes
|
jtulach@678
|
1484 |
xhr.status = 200;
|
jtulach@678
|
1485 |
xhr.statusText = "";
|
jtulach@678
|
1486 |
} else if ( xhr.method == "DELETE" ) {
|
jtulach@678
|
1487 |
Envjs.deleteFile(url);
|
jtulach@678
|
1488 |
xhr.readyState = 4;
|
jtulach@678
|
1489 |
//could be improved, I just cant recall the correct http codes
|
jtulach@678
|
1490 |
xhr.status = 200;
|
jtulach@678
|
1491 |
xhr.statusText = "";
|
jtulach@678
|
1492 |
} else {
|
jtulach@678
|
1493 |
connection = url.openConnection();
|
jtulach@678
|
1494 |
connection.connect();
|
jtulach@678
|
1495 |
//try to add some canned headers that make sense
|
jtulach@678
|
1496 |
|
jtulach@678
|
1497 |
try{
|
jtulach@678
|
1498 |
if(xhr.url.match(/html$/)){
|
jtulach@678
|
1499 |
xhr.responseHeaders["Content-Type"] = 'text/html';
|
jtulach@678
|
1500 |
}else if(xhr.url.match(/.xml$/)){
|
jtulach@678
|
1501 |
xhr.responseHeaders["Content-Type"] = 'text/xml';
|
jtulach@678
|
1502 |
}else if(xhr.url.match(/.js$/)){
|
jtulach@678
|
1503 |
xhr.responseHeaders["Content-Type"] = 'text/javascript';
|
jtulach@678
|
1504 |
}else if(xhr.url.match(/.json$/)){
|
jtulach@678
|
1505 |
xhr.responseHeaders["Content-Type"] = 'application/json';
|
jtulach@678
|
1506 |
}else{
|
jtulach@678
|
1507 |
xhr.responseHeaders["Content-Type"] = 'text/plain';
|
jtulach@678
|
1508 |
}
|
jtulach@678
|
1509 |
//xhr.responseHeaders['Last-Modified'] = connection.getLastModified();
|
jtulach@678
|
1510 |
//xhr.responseHeaders['Content-Length'] = headerValue+'';
|
jtulach@678
|
1511 |
//xhr.responseHeaders['Date'] = new Date()+'';*/
|
jtulach@678
|
1512 |
}catch(e){
|
jtulach@678
|
1513 |
console.log('failed to load response headers',e);
|
jtulach@678
|
1514 |
}
|
jtulach@678
|
1515 |
}
|
jtulach@678
|
1516 |
}catch(e){
|
jtulach@678
|
1517 |
console.log('failed to open file %s %s', url, e);
|
jtulach@678
|
1518 |
connection = null;
|
jtulach@678
|
1519 |
xhr.readyState = 4;
|
jtulach@678
|
1520 |
xhr.statusText = "Local File Protocol Error";
|
jtulach@678
|
1521 |
xhr.responseText = "<html><head/><body><p>"+ e+ "</p></body></html>";
|
jtulach@678
|
1522 |
}
|
jtulach@678
|
1523 |
} else {
|
jtulach@678
|
1524 |
connection = url.openConnection();
|
jtulach@678
|
1525 |
connection.setRequestMethod( xhr.method );
|
jtulach@678
|
1526 |
|
jtulach@678
|
1527 |
// Add headers to Java connection
|
jtulach@678
|
1528 |
for (header in xhr.headers){
|
jtulach@678
|
1529 |
connection.addRequestProperty(header+'', xhr.headers[header]+'');
|
jtulach@678
|
1530 |
}
|
jtulach@678
|
1531 |
|
jtulach@678
|
1532 |
//write data to output stream if required
|
jtulach@678
|
1533 |
if(data){
|
jtulach@678
|
1534 |
if(data instanceof Document){
|
jtulach@678
|
1535 |
if ( xhr.method == "PUT" || xhr.method == "POST" ) {
|
jtulach@678
|
1536 |
connection.setDoOutput(true);
|
jtulach@678
|
1537 |
outstream = connection.getOutputStream(),
|
jtulach@678
|
1538 |
xml = (new XMLSerializer()).serializeToString(data);
|
jtulach@678
|
1539 |
buffer = new java.lang.String(xml).getBytes('UTF-8');
|
jtulach@678
|
1540 |
outstream.write(buffer, 0, buffer.length);
|
jtulach@678
|
1541 |
outstream.close();
|
jtulach@678
|
1542 |
}
|
jtulach@678
|
1543 |
}else if(data.length&&data.length>0){
|
jtulach@678
|
1544 |
if ( xhr.method == "PUT" || xhr.method == "POST" ) {
|
jtulach@678
|
1545 |
connection.setDoOutput(true);
|
jtulach@678
|
1546 |
outstream = connection.getOutputStream();
|
jtulach@678
|
1547 |
buffer = new java.lang.String(data).getBytes('UTF-8');
|
jtulach@678
|
1548 |
outstream.write(buffer, 0, buffer.length);
|
jtulach@678
|
1549 |
outstream.close();
|
jtulach@678
|
1550 |
}
|
jtulach@678
|
1551 |
}
|
jtulach@678
|
1552 |
connection.connect();
|
jtulach@678
|
1553 |
}else{
|
jtulach@678
|
1554 |
connection.connect();
|
jtulach@678
|
1555 |
}
|
jtulach@678
|
1556 |
}
|
jtulach@678
|
1557 |
|
jtulach@678
|
1558 |
if(connection){
|
jtulach@678
|
1559 |
try{
|
jtulach@678
|
1560 |
length = connection.getHeaderFields().size();
|
jtulach@678
|
1561 |
// Stick the response headers into responseHeaders
|
jtulach@678
|
1562 |
for (i = 0; i < length; i++) {
|
jtulach@678
|
1563 |
name = connection.getHeaderFieldKey(i);
|
jtulach@678
|
1564 |
value = connection.getHeaderField(i);
|
jtulach@678
|
1565 |
if (name)
|
jtulach@678
|
1566 |
xhr.responseHeaders[name+''] = value+'';
|
jtulach@678
|
1567 |
}
|
jtulach@678
|
1568 |
}catch(e){
|
jtulach@678
|
1569 |
console.log('failed to load response headers \n%s',e);
|
jtulach@678
|
1570 |
}
|
jtulach@678
|
1571 |
|
jtulach@678
|
1572 |
xhr.readyState = 4;
|
jtulach@678
|
1573 |
xhr.status = parseInt(connection.responseCode,10) || undefined;
|
jtulach@678
|
1574 |
xhr.statusText = connection.responseMessage || "";
|
jtulach@678
|
1575 |
|
jtulach@678
|
1576 |
contentEncoding = connection.getContentEncoding() || "utf-8";
|
jtulach@678
|
1577 |
instream = null;
|
jtulach@678
|
1578 |
responseXML = null;
|
jtulach@678
|
1579 |
|
jtulach@678
|
1580 |
try{
|
jtulach@678
|
1581 |
//console.log('contentEncoding %s', contentEncoding);
|
jtulach@678
|
1582 |
if( contentEncoding.equalsIgnoreCase("gzip") ||
|
jtulach@678
|
1583 |
contentEncoding.equalsIgnoreCase("decompress")){
|
jtulach@678
|
1584 |
//zipped content
|
jtulach@678
|
1585 |
binary = true;
|
jtulach@678
|
1586 |
outstream = new java.io.ByteArrayOutputStream();
|
jtulach@678
|
1587 |
buffer = java.lang.reflect.Array.newInstance(java.lang.Byte.TYPE, 1024);
|
jtulach@678
|
1588 |
instream = new java.util.zip.GZIPInputStream(connection.getInputStream())
|
jtulach@678
|
1589 |
}else{
|
jtulach@678
|
1590 |
//this is a text file
|
jtulach@678
|
1591 |
outstream = new java.io.StringWriter();
|
jtulach@678
|
1592 |
buffer = java.lang.reflect.Array.newInstance(java.lang.Character.TYPE, 1024);
|
jtulach@678
|
1593 |
instream = new java.io.InputStreamReader(connection.getInputStream());
|
jtulach@678
|
1594 |
}
|
jtulach@678
|
1595 |
}catch(e){
|
jtulach@678
|
1596 |
if (connection.getResponseCode() == 404){
|
jtulach@678
|
1597 |
console.log('failed to open connection stream \n %s %s',
|
jtulach@678
|
1598 |
e.toString(), e);
|
jtulach@678
|
1599 |
}else{
|
jtulach@678
|
1600 |
console.log('failed to open connection stream \n %s %s',
|
jtulach@678
|
1601 |
e.toString(), e);
|
jtulach@678
|
1602 |
}
|
jtulach@678
|
1603 |
instream = connection.getErrorStream();
|
jtulach@678
|
1604 |
}
|
jtulach@678
|
1605 |
|
jtulach@678
|
1606 |
while ((length = instream.read(buffer, 0, 1024)) != -1) {
|
jtulach@678
|
1607 |
outstream.write(buffer, 0, length);
|
jtulach@678
|
1608 |
}
|
jtulach@678
|
1609 |
|
jtulach@678
|
1610 |
outstream.close();
|
jtulach@678
|
1611 |
instream.close();
|
jtulach@678
|
1612 |
|
jtulach@678
|
1613 |
if(binary){
|
jtulach@678
|
1614 |
xhr.responseText = new String(outstream.toByteArray(), 'UTF-8')+'';
|
jtulach@678
|
1615 |
}else{
|
jtulach@678
|
1616 |
xhr.responseText = outstream.toString()+'';
|
jtulach@678
|
1617 |
}
|
jtulach@678
|
1618 |
|
jtulach@678
|
1619 |
}
|
jtulach@678
|
1620 |
if(responseHandler){
|
jtulach@678
|
1621 |
//Envjs.debug('calling ajax response handler');
|
jtulach@678
|
1622 |
responseHandler();
|
jtulach@678
|
1623 |
}
|
jtulach@678
|
1624 |
};
|
jtulach@678
|
1625 |
|
jtulach@678
|
1626 |
//Since we're running in rhino I guess we can safely assume
|
jtulach@678
|
1627 |
//java is 'enabled'. I'm sure this requires more thought
|
jtulach@678
|
1628 |
//than I've given it here
|
jtulach@678
|
1629 |
Envjs.javaEnabled = true;
|
jtulach@678
|
1630 |
|
jtulach@678
|
1631 |
Envjs.homedir = java.lang.System.getProperty("user.home");
|
jtulach@678
|
1632 |
Envjs.tmpdir = java.lang.System.getProperty("java.io.tmpdir");
|
jtulach@678
|
1633 |
Envjs.os_name = java.lang.System.getProperty("os.name");
|
jtulach@678
|
1634 |
Envjs.os_arch = java.lang.System.getProperty("os.arch");
|
jtulach@678
|
1635 |
Envjs.os_version = java.lang.System.getProperty("os.version");
|
jtulach@678
|
1636 |
Envjs.lang = java.lang.System.getProperty("user.lang");
|
jtulach@678
|
1637 |
|
jtulach@678
|
1638 |
|
jtulach@678
|
1639 |
/**
|
jtulach@678
|
1640 |
*
|
jtulach@678
|
1641 |
* @param {Object} frameElement
|
jtulach@678
|
1642 |
* @param {Object} url
|
jtulach@678
|
1643 |
*/
|
jtulach@678
|
1644 |
Envjs.loadFrame = function(frame, url){
|
jtulach@678
|
1645 |
try {
|
jtulach@678
|
1646 |
if(frame.contentWindow){
|
jtulach@678
|
1647 |
//mark for garbage collection
|
jtulach@678
|
1648 |
frame.contentWindow = null;
|
jtulach@678
|
1649 |
}
|
jtulach@678
|
1650 |
|
jtulach@678
|
1651 |
//create a new scope for the window proxy
|
jtulach@678
|
1652 |
frame.contentWindow = Envjs.proxy();
|
jtulach@678
|
1653 |
new Window(frame.contentWindow, window);
|
jtulach@678
|
1654 |
|
jtulach@678
|
1655 |
//I dont think frames load asynchronously in firefox
|
jtulach@678
|
1656 |
//and I think the tests have verified this but for
|
jtulach@678
|
1657 |
//some reason I'm less than confident... Are there cases?
|
jtulach@678
|
1658 |
frame.contentDocument = frame.contentWindow.document;
|
jtulach@678
|
1659 |
frame.contentDocument.async = false;
|
jtulach@678
|
1660 |
if(url){
|
jtulach@678
|
1661 |
//console.log('envjs.loadFrame async %s', frame.contentDocument.async);
|
jtulach@678
|
1662 |
frame.contentWindow.location = url;
|
jtulach@678
|
1663 |
}
|
jtulach@678
|
1664 |
} catch(e) {
|
jtulach@678
|
1665 |
console.log("failed to load frame content: from %s %s", url, e);
|
jtulach@678
|
1666 |
}
|
jtulach@678
|
1667 |
};
|
jtulach@678
|
1668 |
|
jtulach@678
|
1669 |
/**
|
jtulach@678
|
1670 |
* unloadFrame
|
jtulach@678
|
1671 |
* @param {Object} frame
|
jtulach@678
|
1672 |
*/
|
jtulach@678
|
1673 |
Envjs.unloadFrame = function(frame){
|
jtulach@678
|
1674 |
var all, length, i;
|
jtulach@678
|
1675 |
try{
|
jtulach@678
|
1676 |
//TODO: probably self-referencing structures within a document tree
|
jtulach@678
|
1677 |
//preventing it from being entirely garbage collected once orphaned.
|
jtulach@678
|
1678 |
//Should have code to walk tree and break all links between contained
|
jtulach@678
|
1679 |
//objects.
|
jtulach@678
|
1680 |
frame.contentDocument = null;
|
jtulach@678
|
1681 |
if(frame.contentWindow){
|
jtulach@678
|
1682 |
frame.contentWindow.close();
|
jtulach@678
|
1683 |
}
|
jtulach@678
|
1684 |
gc();
|
jtulach@678
|
1685 |
}catch(e){
|
jtulach@678
|
1686 |
console.log(e);
|
jtulach@678
|
1687 |
}
|
jtulach@678
|
1688 |
};
|
jtulach@678
|
1689 |
|
jtulach@678
|
1690 |
/**
|
jtulach@678
|
1691 |
* Makes an object window-like by proxying object accessors
|
jtulach@678
|
1692 |
* @param {Object} scope
|
jtulach@678
|
1693 |
* @param {Object} parent
|
jtulach@678
|
1694 |
*/
|
jtulach@678
|
1695 |
Envjs.proxy = function(scope, parent) {
|
jtulach@678
|
1696 |
try{
|
jtulach@678
|
1697 |
if(scope+'' == '[object global]'){
|
jtulach@678
|
1698 |
return scope
|
jtulach@678
|
1699 |
}else{
|
jtulach@678
|
1700 |
return __context__.createGlobal();
|
jtulach@678
|
1701 |
}
|
jtulach@678
|
1702 |
}catch(e){
|
jtulach@678
|
1703 |
console.log('failed to init standard objects %s %s \n%s', scope, parent, e);
|
jtulach@678
|
1704 |
}
|
jtulach@678
|
1705 |
|
jtulach@678
|
1706 |
};
|
jtulach@678
|
1707 |
|
jtulach@678
|
1708 |
/**
|
jtulach@678
|
1709 |
* @author john resig & the envjs team
|
jtulach@678
|
1710 |
* @uri http://www.envjs.com/
|
jtulach@678
|
1711 |
* @copyright 2008-2010
|
jtulach@678
|
1712 |
* @license MIT
|
jtulach@678
|
1713 |
*/
|
jtulach@678
|
1714 |
//CLOSURE_END
|
jtulach@678
|
1715 |
}());
|
jtulach@678
|
1716 |
|
jtulach@678
|
1717 |
/**
|
jtulach@678
|
1718 |
* @author envjs team
|
jtulach@678
|
1719 |
*/
|
jtulach@678
|
1720 |
var Console,
|
jtulach@678
|
1721 |
console;
|
jtulach@678
|
1722 |
|
jtulach@678
|
1723 |
/*
|
jtulach@678
|
1724 |
* Envjs console.1.2.13
|
jtulach@678
|
1725 |
* Pure JavaScript Browser Environment
|
jtulach@678
|
1726 |
* By John Resig <http://ejohn.org/> and the Envjs Team
|
jtulach@678
|
1727 |
* Copyright 2008-2010 John Resig, under the MIT License
|
jtulach@678
|
1728 |
*/
|
jtulach@678
|
1729 |
|
jtulach@678
|
1730 |
//CLOSURE_START
|
jtulach@678
|
1731 |
(function(){
|
jtulach@678
|
1732 |
|
jtulach@678
|
1733 |
|
jtulach@678
|
1734 |
|
jtulach@678
|
1735 |
|
jtulach@678
|
1736 |
|
jtulach@678
|
1737 |
/**
|
jtulach@678
|
1738 |
* @author envjs team
|
jtulach@678
|
1739 |
* borrowed 99%-ish with love from firebug-lite
|
jtulach@678
|
1740 |
*
|
jtulach@678
|
1741 |
* http://wiki.commonjs.org/wiki/Console
|
jtulach@678
|
1742 |
*/
|
jtulach@678
|
1743 |
Console = function(module){
|
jtulach@678
|
1744 |
var $level,
|
jtulach@678
|
1745 |
$logger,
|
jtulach@678
|
1746 |
$null = function(){};
|
jtulach@678
|
1747 |
|
jtulach@678
|
1748 |
|
jtulach@678
|
1749 |
if(Envjs[module] && Envjs[module].loglevel){
|
jtulach@678
|
1750 |
$level = Envjs.module.loglevel;
|
jtulach@678
|
1751 |
$logger = {
|
jtulach@678
|
1752 |
log: function(level){
|
jtulach@678
|
1753 |
logFormatted(arguments, (module)+" ");
|
jtulach@678
|
1754 |
},
|
jtulach@678
|
1755 |
debug: $level>1 ? $null: function() {
|
jtulach@678
|
1756 |
logFormatted(arguments, (module)+" debug");
|
jtulach@678
|
1757 |
},
|
jtulach@678
|
1758 |
info: $level>2 ? $null:function(){
|
jtulach@678
|
1759 |
logFormatted(arguments, (module)+" info");
|
jtulach@678
|
1760 |
},
|
jtulach@678
|
1761 |
warn: $level>3 ? $null:function(){
|
jtulach@678
|
1762 |
logFormatted(arguments, (module)+" warning");
|
jtulach@678
|
1763 |
},
|
jtulach@678
|
1764 |
error: $level>4 ? $null:function(){
|
jtulach@678
|
1765 |
logFormatted(arguments, (module)+" error");
|
jtulach@678
|
1766 |
}
|
jtulach@678
|
1767 |
};
|
jtulach@678
|
1768 |
} else {
|
jtulach@678
|
1769 |
$logger = {
|
jtulach@678
|
1770 |
log: function(level){
|
jtulach@678
|
1771 |
logFormatted(arguments, "");
|
jtulach@678
|
1772 |
},
|
jtulach@678
|
1773 |
debug: $null,
|
jtulach@678
|
1774 |
info: $null,
|
jtulach@678
|
1775 |
warn: $null,
|
jtulach@678
|
1776 |
error: $null
|
jtulach@678
|
1777 |
};
|
jtulach@678
|
1778 |
}
|
jtulach@678
|
1779 |
|
jtulach@678
|
1780 |
return $logger;
|
jtulach@678
|
1781 |
};
|
jtulach@678
|
1782 |
|
jtulach@678
|
1783 |
console = new Console("console",1);
|
jtulach@678
|
1784 |
|
jtulach@678
|
1785 |
function logFormatted(objects, className)
|
jtulach@678
|
1786 |
{
|
jtulach@678
|
1787 |
var html = [];
|
jtulach@678
|
1788 |
|
jtulach@678
|
1789 |
var format = objects[0];
|
jtulach@678
|
1790 |
var objIndex = 0;
|
jtulach@678
|
1791 |
|
jtulach@678
|
1792 |
if (typeof(format) != "string")
|
jtulach@678
|
1793 |
{
|
jtulach@678
|
1794 |
format = "";
|
jtulach@678
|
1795 |
objIndex = -1;
|
jtulach@678
|
1796 |
}
|
jtulach@678
|
1797 |
|
jtulach@678
|
1798 |
var parts = parseFormat(format);
|
jtulach@678
|
1799 |
for (var i = 0; i < parts.length; ++i)
|
jtulach@678
|
1800 |
{
|
jtulach@678
|
1801 |
var part = parts[i];
|
jtulach@678
|
1802 |
if (part && typeof(part) == "object")
|
jtulach@678
|
1803 |
{
|
jtulach@678
|
1804 |
var object = objects[++objIndex];
|
jtulach@678
|
1805 |
part.appender(object, html);
|
jtulach@678
|
1806 |
}
|
jtulach@678
|
1807 |
else {
|
jtulach@678
|
1808 |
appendText(part, html);
|
jtulach@678
|
1809 |
}
|
jtulach@678
|
1810 |
}
|
jtulach@678
|
1811 |
|
jtulach@678
|
1812 |
for (var i = objIndex+1; i < objects.length; ++i)
|
jtulach@678
|
1813 |
{
|
jtulach@678
|
1814 |
appendText(" ", html);
|
jtulach@678
|
1815 |
|
jtulach@678
|
1816 |
var object = objects[i];
|
jtulach@678
|
1817 |
if (typeof(object) == "string") {
|
jtulach@678
|
1818 |
appendText(object, html);
|
jtulach@678
|
1819 |
} else {
|
jtulach@678
|
1820 |
appendObject(object, html);
|
jtulach@678
|
1821 |
}
|
jtulach@678
|
1822 |
}
|
jtulach@678
|
1823 |
|
jtulach@678
|
1824 |
Envjs.log(html.join(' '));
|
jtulach@678
|
1825 |
}
|
jtulach@678
|
1826 |
|
jtulach@678
|
1827 |
function parseFormat(format)
|
jtulach@678
|
1828 |
{
|
jtulach@678
|
1829 |
var parts = [];
|
jtulach@678
|
1830 |
|
jtulach@678
|
1831 |
var reg = /((^%|[^\\]%)(\d+)?(\.)([a-zA-Z]))|((^%|[^\\]%)([a-zA-Z]))/;
|
jtulach@678
|
1832 |
var appenderMap = {s: appendText, d: appendInteger, i: appendInteger, f: appendFloat};
|
jtulach@678
|
1833 |
|
jtulach@678
|
1834 |
for (var m = reg.exec(format); m; m = reg.exec(format))
|
jtulach@678
|
1835 |
{
|
jtulach@678
|
1836 |
var type = m[8] ? m[8] : m[5];
|
jtulach@678
|
1837 |
var appender = type in appenderMap ? appenderMap[type] : appendObject;
|
jtulach@678
|
1838 |
var precision = m[3] ? parseInt(m[3]) : (m[4] == "." ? -1 : 0);
|
jtulach@678
|
1839 |
|
jtulach@678
|
1840 |
parts.push(format.substr(0, m[0][0] == "%" ? m.index : m.index+1));
|
jtulach@678
|
1841 |
parts.push({appender: appender, precision: precision});
|
jtulach@678
|
1842 |
|
jtulach@678
|
1843 |
format = format.substr(m.index+m[0].length);
|
jtulach@678
|
1844 |
}
|
jtulach@678
|
1845 |
|
jtulach@678
|
1846 |
parts.push(format);
|
jtulach@678
|
1847 |
|
jtulach@678
|
1848 |
return parts;
|
jtulach@678
|
1849 |
}
|
jtulach@678
|
1850 |
|
jtulach@678
|
1851 |
function escapeHTML(value)
|
jtulach@678
|
1852 |
{
|
jtulach@678
|
1853 |
return value;
|
jtulach@678
|
1854 |
}
|
jtulach@678
|
1855 |
|
jtulach@678
|
1856 |
function objectToString(object)
|
jtulach@678
|
1857 |
{
|
jtulach@678
|
1858 |
try
|
jtulach@678
|
1859 |
{
|
jtulach@678
|
1860 |
return object+"";
|
jtulach@678
|
1861 |
}
|
jtulach@678
|
1862 |
catch (exc)
|
jtulach@678
|
1863 |
{
|
jtulach@678
|
1864 |
return null;
|
jtulach@678
|
1865 |
}
|
jtulach@678
|
1866 |
}
|
jtulach@678
|
1867 |
|
jtulach@678
|
1868 |
// ********************************************************************************************
|
jtulach@678
|
1869 |
|
jtulach@678
|
1870 |
function appendText(object, html)
|
jtulach@678
|
1871 |
{
|
jtulach@678
|
1872 |
html.push(escapeHTML(objectToString(object)));
|
jtulach@678
|
1873 |
}
|
jtulach@678
|
1874 |
|
jtulach@678
|
1875 |
function appendNull(object, html)
|
jtulach@678
|
1876 |
{
|
jtulach@678
|
1877 |
html.push(escapeHTML(objectToString(object)));
|
jtulach@678
|
1878 |
}
|
jtulach@678
|
1879 |
|
jtulach@678
|
1880 |
function appendString(object, html)
|
jtulach@678
|
1881 |
{
|
jtulach@678
|
1882 |
html.push(escapeHTML(objectToString(object)));
|
jtulach@678
|
1883 |
}
|
jtulach@678
|
1884 |
|
jtulach@678
|
1885 |
function appendInteger(object, html)
|
jtulach@678
|
1886 |
{
|
jtulach@678
|
1887 |
html.push(escapeHTML(objectToString(object)));
|
jtulach@678
|
1888 |
}
|
jtulach@678
|
1889 |
|
jtulach@678
|
1890 |
function appendFloat(object, html)
|
jtulach@678
|
1891 |
{
|
jtulach@678
|
1892 |
html.push(escapeHTML(objectToString(object)));
|
jtulach@678
|
1893 |
}
|
jtulach@678
|
1894 |
|
jtulach@678
|
1895 |
function appendFunction(object, html)
|
jtulach@678
|
1896 |
{
|
jtulach@678
|
1897 |
var reName = /function ?(.*?)\(/;
|
jtulach@678
|
1898 |
var m = reName.exec(objectToString(object));
|
jtulach@678
|
1899 |
var name = m ? m[1] : "function";
|
jtulach@678
|
1900 |
html.push(escapeHTML(name));
|
jtulach@678
|
1901 |
}
|
jtulach@678
|
1902 |
|
jtulach@678
|
1903 |
function appendObject(object, html)
|
jtulach@678
|
1904 |
{
|
jtulach@678
|
1905 |
try
|
jtulach@678
|
1906 |
{
|
jtulach@678
|
1907 |
if (object == undefined) {
|
jtulach@678
|
1908 |
appendNull("undefined", html);
|
jtulach@678
|
1909 |
} else if (object == null) {
|
jtulach@678
|
1910 |
appendNull("null", html);
|
jtulach@678
|
1911 |
} else if (typeof object == "string") {
|
jtulach@678
|
1912 |
appendString(object, html);
|
jtulach@678
|
1913 |
} else if (typeof object == "number") {
|
jtulach@678
|
1914 |
appendInteger(object, html);
|
jtulach@678
|
1915 |
} else if (typeof object == "function") {
|
jtulach@678
|
1916 |
appendFunction(object, html);
|
jtulach@678
|
1917 |
} else if (object.nodeType == 1) {
|
jtulach@678
|
1918 |
appendSelector(object, html);
|
jtulach@678
|
1919 |
} else if (typeof object == "object") {
|
jtulach@678
|
1920 |
appendObjectFormatted(object, html);
|
jtulach@678
|
1921 |
} else {
|
jtulach@678
|
1922 |
appendText(object, html);
|
jtulach@678
|
1923 |
}
|
jtulach@678
|
1924 |
}
|
jtulach@678
|
1925 |
catch (exc)
|
jtulach@678
|
1926 |
{
|
jtulach@678
|
1927 |
}
|
jtulach@678
|
1928 |
}
|
jtulach@678
|
1929 |
|
jtulach@678
|
1930 |
function appendObjectFormatted(object, html)
|
jtulach@678
|
1931 |
{
|
jtulach@678
|
1932 |
var text = objectToString(object);
|
jtulach@678
|
1933 |
var reObject = /\[object (.*?)\]/;
|
jtulach@678
|
1934 |
|
jtulach@678
|
1935 |
var m = reObject.exec(text);
|
jtulach@678
|
1936 |
html.push( m ? m[1] : text);
|
jtulach@678
|
1937 |
}
|
jtulach@678
|
1938 |
|
jtulach@678
|
1939 |
function appendSelector(object, html)
|
jtulach@678
|
1940 |
{
|
jtulach@678
|
1941 |
|
jtulach@678
|
1942 |
html.push(escapeHTML(object.nodeName.toLowerCase()));
|
jtulach@678
|
1943 |
if (object.id) {
|
jtulach@678
|
1944 |
html.push(escapeHTML(object.id));
|
jtulach@678
|
1945 |
}
|
jtulach@678
|
1946 |
if (object.className) {
|
jtulach@678
|
1947 |
html.push(escapeHTML(object.className));
|
jtulach@678
|
1948 |
}
|
jtulach@678
|
1949 |
}
|
jtulach@678
|
1950 |
|
jtulach@678
|
1951 |
function appendNode(node, html)
|
jtulach@678
|
1952 |
{
|
jtulach@678
|
1953 |
if (node.nodeType == 1)
|
jtulach@678
|
1954 |
{
|
jtulach@678
|
1955 |
html.push( node.nodeName.toLowerCase());
|
jtulach@678
|
1956 |
|
jtulach@678
|
1957 |
for (var i = 0; i < node.attributes.length; ++i)
|
jtulach@678
|
1958 |
{
|
jtulach@678
|
1959 |
var attr = node.attributes[i];
|
jtulach@678
|
1960 |
if (!attr.specified) {
|
jtulach@678
|
1961 |
continue;
|
jtulach@678
|
1962 |
}
|
jtulach@678
|
1963 |
|
jtulach@678
|
1964 |
html.push( attr.nodeName.toLowerCase(),escapeHTML(attr.nodeValue));
|
jtulach@678
|
1965 |
}
|
jtulach@678
|
1966 |
|
jtulach@678
|
1967 |
if (node.firstChild)
|
jtulach@678
|
1968 |
{
|
jtulach@678
|
1969 |
for (var child = node.firstChild; child; child = child.nextSibling) {
|
jtulach@678
|
1970 |
appendNode(child, html);
|
jtulach@678
|
1971 |
}
|
jtulach@678
|
1972 |
|
jtulach@678
|
1973 |
html.push( node.nodeName.toLowerCase());
|
jtulach@678
|
1974 |
}
|
jtulach@678
|
1975 |
}
|
jtulach@678
|
1976 |
else if (node.nodeType === 3)
|
jtulach@678
|
1977 |
{
|
jtulach@678
|
1978 |
html.push(escapeHTML(node.nodeValue));
|
jtulach@678
|
1979 |
}
|
jtulach@678
|
1980 |
};
|
jtulach@678
|
1981 |
|
jtulach@678
|
1982 |
/**
|
jtulach@678
|
1983 |
* @author john resig & the envjs team
|
jtulach@678
|
1984 |
* @uri http://www.envjs.com/
|
jtulach@678
|
1985 |
* @copyright 2008-2010
|
jtulach@678
|
1986 |
* @license MIT
|
jtulach@678
|
1987 |
*/
|
jtulach@678
|
1988 |
//CLOSURE_END
|
jtulach@678
|
1989 |
}());
|
jtulach@678
|
1990 |
/*
|
jtulach@678
|
1991 |
* Envjs dom.1.2.13
|
jtulach@678
|
1992 |
* Pure JavaScript Browser Environment
|
jtulach@678
|
1993 |
* By John Resig <http://ejohn.org/> and the Envjs Team
|
jtulach@678
|
1994 |
* Copyright 2008-2010 John Resig, under the MIT License
|
jtulach@678
|
1995 |
*
|
jtulach@678
|
1996 |
* Parts of the implementation were originally written by:\
|
jtulach@678
|
1997 |
* and Jon van Noort (jon@webarcana.com.au) \
|
jtulach@678
|
1998 |
* and David Joham (djoham@yahoo.com)",\
|
jtulach@678
|
1999 |
* and Scott Severtson
|
jtulach@678
|
2000 |
*
|
jtulach@678
|
2001 |
* This file simply provides the global definitions we need to \
|
jtulach@678
|
2002 |
* be able to correctly implement to core browser DOM interfaces."
|
jtulach@678
|
2003 |
*/
|
jtulach@678
|
2004 |
|
jtulach@678
|
2005 |
var Attr,
|
jtulach@678
|
2006 |
CDATASection,
|
jtulach@678
|
2007 |
CharacterData,
|
jtulach@678
|
2008 |
Comment,
|
jtulach@678
|
2009 |
Document,
|
jtulach@678
|
2010 |
DocumentFragment,
|
jtulach@678
|
2011 |
DocumentType,
|
jtulach@678
|
2012 |
DOMException,
|
jtulach@678
|
2013 |
DOMImplementation,
|
jtulach@678
|
2014 |
Element,
|
jtulach@678
|
2015 |
Entity,
|
jtulach@678
|
2016 |
EntityReference,
|
jtulach@678
|
2017 |
NamedNodeMap,
|
jtulach@678
|
2018 |
Namespace,
|
jtulach@678
|
2019 |
Node,
|
jtulach@678
|
2020 |
NodeList,
|
jtulach@678
|
2021 |
Notation,
|
jtulach@678
|
2022 |
ProcessingInstruction,
|
jtulach@678
|
2023 |
Text,
|
jtulach@678
|
2024 |
Range,
|
jtulach@678
|
2025 |
XMLSerializer,
|
jtulach@678
|
2026 |
DOMParser;
|
jtulach@678
|
2027 |
|
jtulach@678
|
2028 |
|
jtulach@678
|
2029 |
|
jtulach@678
|
2030 |
/*
|
jtulach@678
|
2031 |
* Envjs dom.1.2.13
|
jtulach@678
|
2032 |
* Pure JavaScript Browser Environment
|
jtulach@678
|
2033 |
* By John Resig <http://ejohn.org/> and the Envjs Team
|
jtulach@678
|
2034 |
* Copyright 2008-2010 John Resig, under the MIT License
|
jtulach@678
|
2035 |
*/
|
jtulach@678
|
2036 |
|
jtulach@678
|
2037 |
//CLOSURE_START
|
jtulach@678
|
2038 |
(function(){
|
jtulach@678
|
2039 |
|
jtulach@678
|
2040 |
|
jtulach@678
|
2041 |
|
jtulach@678
|
2042 |
|
jtulach@678
|
2043 |
|
jtulach@678
|
2044 |
/**
|
jtulach@678
|
2045 |
* @author john resig
|
jtulach@678
|
2046 |
*/
|
jtulach@678
|
2047 |
// Helper method for extending one object with another.
|
jtulach@678
|
2048 |
function __extend__(a,b) {
|
jtulach@678
|
2049 |
for ( var i in b ) {
|
jtulach@678
|
2050 |
var g = b.__lookupGetter__(i), s = b.__lookupSetter__(i);
|
jtulach@678
|
2051 |
if ( g || s ) {
|
jtulach@678
|
2052 |
if ( g ) { a.__defineGetter__(i, g); }
|
jtulach@678
|
2053 |
if ( s ) { a.__defineSetter__(i, s); }
|
jtulach@678
|
2054 |
} else {
|
jtulach@678
|
2055 |
a[i] = b[i];
|
jtulach@678
|
2056 |
}
|
jtulach@678
|
2057 |
} return a;
|
jtulach@678
|
2058 |
}
|
jtulach@678
|
2059 |
|
jtulach@678
|
2060 |
/**
|
jtulach@678
|
2061 |
* @author john resig
|
jtulach@678
|
2062 |
*/
|
jtulach@678
|
2063 |
//from jQuery
|
jtulach@678
|
2064 |
function __setArray__( target, array ) {
|
jtulach@678
|
2065 |
// Resetting the length to 0, then using the native Array push
|
jtulach@678
|
2066 |
// is a super-fast way to populate an object with array-like properties
|
jtulach@678
|
2067 |
target.length = 0;
|
jtulach@678
|
2068 |
Array.prototype.push.apply( target, array );
|
jtulach@678
|
2069 |
}
|
jtulach@678
|
2070 |
|
jtulach@678
|
2071 |
/**
|
jtulach@678
|
2072 |
* @class NodeList -
|
jtulach@678
|
2073 |
* provides the abstraction of an ordered collection of nodes
|
jtulach@678
|
2074 |
*
|
jtulach@678
|
2075 |
* @param ownerDocument : Document - the ownerDocument
|
jtulach@678
|
2076 |
* @param parentNode : Node - the node that the NodeList is attached to (or null)
|
jtulach@678
|
2077 |
*/
|
jtulach@678
|
2078 |
NodeList = function(ownerDocument, parentNode) {
|
jtulach@678
|
2079 |
this.length = 0;
|
jtulach@678
|
2080 |
this.parentNode = parentNode;
|
jtulach@678
|
2081 |
this.ownerDocument = ownerDocument;
|
jtulach@678
|
2082 |
this._readonly = false;
|
jtulach@678
|
2083 |
__setArray__(this, []);
|
jtulach@678
|
2084 |
};
|
jtulach@678
|
2085 |
|
jtulach@678
|
2086 |
__extend__(NodeList.prototype, {
|
jtulach@678
|
2087 |
item : function(index) {
|
jtulach@678
|
2088 |
var ret = null;
|
jtulach@678
|
2089 |
if ((index >= 0) && (index < this.length)) {
|
jtulach@678
|
2090 |
// bounds check
|
jtulach@678
|
2091 |
ret = this[index];
|
jtulach@678
|
2092 |
}
|
jtulach@678
|
2093 |
// if the index is out of bounds, default value null is returned
|
jtulach@678
|
2094 |
return ret;
|
jtulach@678
|
2095 |
},
|
jtulach@678
|
2096 |
get xml() {
|
jtulach@678
|
2097 |
var ret = "",
|
jtulach@678
|
2098 |
i;
|
jtulach@678
|
2099 |
|
jtulach@678
|
2100 |
// create string containing the concatenation of the string values of each child
|
jtulach@678
|
2101 |
for (i=0; i < this.length; i++) {
|
jtulach@678
|
2102 |
if(this[i]){
|
jtulach@678
|
2103 |
if(this[i].nodeType == Node.TEXT_NODE && i>0 &&
|
jtulach@678
|
2104 |
this[i-1].nodeType == Node.TEXT_NODE){
|
jtulach@678
|
2105 |
//add a single space between adjacent text nodes
|
jtulach@678
|
2106 |
ret += " "+this[i].xml;
|
jtulach@678
|
2107 |
}else{
|
jtulach@678
|
2108 |
ret += this[i].xml;
|
jtulach@678
|
2109 |
}
|
jtulach@678
|
2110 |
}
|
jtulach@678
|
2111 |
}
|
jtulach@678
|
2112 |
return ret;
|
jtulach@678
|
2113 |
},
|
jtulach@678
|
2114 |
toArray: function () {
|
jtulach@678
|
2115 |
var children = [],
|
jtulach@678
|
2116 |
i;
|
jtulach@678
|
2117 |
for ( i=0; i < this.length; i++) {
|
jtulach@678
|
2118 |
children.push (this[i]);
|
jtulach@678
|
2119 |
}
|
jtulach@678
|
2120 |
return children;
|
jtulach@678
|
2121 |
},
|
jtulach@678
|
2122 |
toString: function(){
|
jtulach@678
|
2123 |
return "[object NodeList]";
|
jtulach@678
|
2124 |
}
|
jtulach@678
|
2125 |
});
|
jtulach@678
|
2126 |
|
jtulach@678
|
2127 |
|
jtulach@678
|
2128 |
/**
|
jtulach@678
|
2129 |
* @method __findItemIndex__
|
jtulach@678
|
2130 |
* find the item index of the node
|
jtulach@678
|
2131 |
* @author Jon van Noort (jon@webarcana.com.au)
|
jtulach@678
|
2132 |
* @param node : Node
|
jtulach@678
|
2133 |
* @return : int
|
jtulach@678
|
2134 |
*/
|
jtulach@678
|
2135 |
var __findItemIndex__ = function (nodelist, node) {
|
jtulach@678
|
2136 |
var ret = -1, i;
|
jtulach@678
|
2137 |
for (i=0; i<nodelist.length; i++) {
|
jtulach@678
|
2138 |
// compare id to each node's _id
|
jtulach@678
|
2139 |
if (nodelist[i] === node) {
|
jtulach@678
|
2140 |
// found it!
|
jtulach@678
|
2141 |
ret = i;
|
jtulach@678
|
2142 |
break;
|
jtulach@678
|
2143 |
}
|
jtulach@678
|
2144 |
}
|
jtulach@678
|
2145 |
// if node is not found, default value -1 is returned
|
jtulach@678
|
2146 |
return ret;
|
jtulach@678
|
2147 |
};
|
jtulach@678
|
2148 |
|
jtulach@678
|
2149 |
/**
|
jtulach@678
|
2150 |
* @method __insertBefore__
|
jtulach@678
|
2151 |
* insert the specified Node into the NodeList before the specified index
|
jtulach@678
|
2152 |
* Used by Node.insertBefore(). Note: Node.insertBefore() is responsible
|
jtulach@678
|
2153 |
* for Node Pointer surgery __insertBefore__ simply modifies the internal
|
jtulach@678
|
2154 |
* data structure (Array).
|
jtulach@678
|
2155 |
* @param newChild : Node - the Node to be inserted
|
jtulach@678
|
2156 |
* @param refChildIndex : int - the array index to insert the Node before
|
jtulach@678
|
2157 |
*/
|
jtulach@678
|
2158 |
var __insertBefore__ = function(nodelist, newChild, refChildIndex) {
|
jtulach@678
|
2159 |
if ((refChildIndex >= 0) && (refChildIndex <= nodelist.length)) {
|
jtulach@678
|
2160 |
// bounds check
|
jtulach@678
|
2161 |
if (newChild.nodeType == Node.DOCUMENT_FRAGMENT_NODE) {
|
jtulach@678
|
2162 |
// node is a DocumentFragment
|
jtulach@678
|
2163 |
// append the children of DocumentFragment
|
jtulach@678
|
2164 |
Array.prototype.splice.apply(nodelist,
|
jtulach@678
|
2165 |
[refChildIndex, 0].concat(newChild.childNodes.toArray()));
|
jtulach@678
|
2166 |
}
|
jtulach@678
|
2167 |
else {
|
jtulach@678
|
2168 |
// append the newChild
|
jtulach@678
|
2169 |
Array.prototype.splice.apply(nodelist,[refChildIndex, 0, newChild]);
|
jtulach@678
|
2170 |
}
|
jtulach@678
|
2171 |
}
|
jtulach@678
|
2172 |
};
|
jtulach@678
|
2173 |
|
jtulach@678
|
2174 |
/**
|
jtulach@678
|
2175 |
* @method __replaceChild__
|
jtulach@678
|
2176 |
* replace the specified Node in the NodeList at the specified index
|
jtulach@678
|
2177 |
* Used by Node.replaceChild(). Note: Node.replaceChild() is responsible
|
jtulach@678
|
2178 |
* for Node Pointer surgery __replaceChild__ simply modifies the internal
|
jtulach@678
|
2179 |
* data structure (Array).
|
jtulach@678
|
2180 |
*
|
jtulach@678
|
2181 |
* @param newChild : Node - the Node to be inserted
|
jtulach@678
|
2182 |
* @param refChildIndex : int - the array index to hold the Node
|
jtulach@678
|
2183 |
*/
|
jtulach@678
|
2184 |
var __replaceChild__ = function(nodelist, newChild, refChildIndex) {
|
jtulach@678
|
2185 |
var ret = null;
|
jtulach@678
|
2186 |
|
jtulach@678
|
2187 |
// bounds check
|
jtulach@678
|
2188 |
if ((refChildIndex >= 0) && (refChildIndex < nodelist.length)) {
|
jtulach@678
|
2189 |
// preserve old child for return
|
jtulach@678
|
2190 |
ret = nodelist[refChildIndex];
|
jtulach@678
|
2191 |
|
jtulach@678
|
2192 |
if (newChild.nodeType == Node.DOCUMENT_FRAGMENT_NODE) {
|
jtulach@678
|
2193 |
// node is a DocumentFragment
|
jtulach@678
|
2194 |
// get array containing children prior to refChild
|
jtulach@678
|
2195 |
Array.prototype.splice.apply(nodelist,
|
jtulach@678
|
2196 |
[refChildIndex, 1].concat(newChild.childNodes.toArray()));
|
jtulach@678
|
2197 |
}
|
jtulach@678
|
2198 |
else {
|
jtulach@678
|
2199 |
// simply replace node in array (links between Nodes are
|
jtulach@678
|
2200 |
// made at higher level)
|
jtulach@678
|
2201 |
nodelist[refChildIndex] = newChild;
|
jtulach@678
|
2202 |
}
|
jtulach@678
|
2203 |
}
|
jtulach@678
|
2204 |
// return replaced node
|
jtulach@678
|
2205 |
return ret;
|
jtulach@678
|
2206 |
};
|
jtulach@678
|
2207 |
|
jtulach@678
|
2208 |
/**
|
jtulach@678
|
2209 |
* @method __removeChild__
|
jtulach@678
|
2210 |
* remove the specified Node in the NodeList at the specified index
|
jtulach@678
|
2211 |
* Used by Node.removeChild(). Note: Node.removeChild() is responsible
|
jtulach@678
|
2212 |
* for Node Pointer surgery __removeChild__ simply modifies the internal
|
jtulach@678
|
2213 |
* data structure (Array).
|
jtulach@678
|
2214 |
* @param refChildIndex : int - the array index holding the Node to be removed
|
jtulach@678
|
2215 |
*/
|
jtulach@678
|
2216 |
var __removeChild__ = function(nodelist, refChildIndex) {
|
jtulach@678
|
2217 |
var ret = null;
|
jtulach@678
|
2218 |
|
jtulach@678
|
2219 |
if (refChildIndex > -1) {
|
jtulach@678
|
2220 |
// found it!
|
jtulach@678
|
2221 |
// return removed node
|
jtulach@678
|
2222 |
ret = nodelist[refChildIndex];
|
jtulach@678
|
2223 |
|
jtulach@678
|
2224 |
// rebuild array without removed child
|
jtulach@678
|
2225 |
Array.prototype.splice.apply(nodelist,[refChildIndex, 1]);
|
jtulach@678
|
2226 |
}
|
jtulach@678
|
2227 |
// return removed node
|
jtulach@678
|
2228 |
return ret;
|
jtulach@678
|
2229 |
};
|
jtulach@678
|
2230 |
|
jtulach@678
|
2231 |
/**
|
jtulach@678
|
2232 |
* @method __appendChild__
|
jtulach@678
|
2233 |
* append the specified Node to the NodeList. Used by Node.appendChild().
|
jtulach@678
|
2234 |
* Note: Node.appendChild() is responsible for Node Pointer surgery
|
jtulach@678
|
2235 |
* __appendChild__ simply modifies the internal data structure (Array).
|
jtulach@678
|
2236 |
* @param newChild : Node - the Node to be inserted
|
jtulach@678
|
2237 |
*/
|
jtulach@678
|
2238 |
var __appendChild__ = function(nodelist, newChild) {
|
jtulach@678
|
2239 |
if (newChild.nodeType == Node.DOCUMENT_FRAGMENT_NODE) {
|
jtulach@678
|
2240 |
// node is a DocumentFragment
|
jtulach@678
|
2241 |
// append the children of DocumentFragment
|
jtulach@678
|
2242 |
Array.prototype.push.apply(nodelist, newChild.childNodes.toArray() );
|
jtulach@678
|
2243 |
} else {
|
jtulach@678
|
2244 |
// simply add node to array (links between Nodes are made at higher level)
|
jtulach@678
|
2245 |
Array.prototype.push.apply(nodelist, [newChild]);
|
jtulach@678
|
2246 |
}
|
jtulach@678
|
2247 |
|
jtulach@678
|
2248 |
};
|
jtulach@678
|
2249 |
|
jtulach@678
|
2250 |
/**
|
jtulach@678
|
2251 |
* @method __cloneNodes__ -
|
jtulach@678
|
2252 |
* Returns a NodeList containing clones of the Nodes in this NodeList
|
jtulach@678
|
2253 |
* @param deep : boolean -
|
jtulach@678
|
2254 |
* If true, recursively clone the subtree under each of the nodes;
|
jtulach@678
|
2255 |
* if false, clone only the nodes themselves (and their attributes,
|
jtulach@678
|
2256 |
* if it is an Element).
|
jtulach@678
|
2257 |
* @param parentNode : Node - the new parent of the cloned NodeList
|
jtulach@678
|
2258 |
* @return : NodeList - NodeList containing clones of the Nodes in this NodeList
|
jtulach@678
|
2259 |
*/
|
jtulach@678
|
2260 |
var __cloneNodes__ = function(nodelist, deep, parentNode) {
|
jtulach@678
|
2261 |
var cloneNodeList = new NodeList(nodelist.ownerDocument, parentNode);
|
jtulach@678
|
2262 |
|
jtulach@678
|
2263 |
// create list containing clones of each child
|
jtulach@678
|
2264 |
for (var i=0; i < nodelist.length; i++) {
|
jtulach@678
|
2265 |
__appendChild__(cloneNodeList, nodelist[i].cloneNode(deep));
|
jtulach@678
|
2266 |
}
|
jtulach@678
|
2267 |
|
jtulach@678
|
2268 |
return cloneNodeList;
|
jtulach@678
|
2269 |
};
|
jtulach@678
|
2270 |
|
jtulach@678
|
2271 |
|
jtulach@678
|
2272 |
var __ownerDocument__ = function(node){
|
jtulach@678
|
2273 |
return (node.nodeType == Node.DOCUMENT_NODE)?node:node.ownerDocument;
|
jtulach@678
|
2274 |
};
|
jtulach@678
|
2275 |
|
jtulach@678
|
2276 |
/**
|
jtulach@678
|
2277 |
* @class Node -
|
jtulach@678
|
2278 |
* The Node interface is the primary datatype for the entire
|
jtulach@678
|
2279 |
* Document Object Model. It represents a single node in the
|
jtulach@678
|
2280 |
* document tree.
|
jtulach@678
|
2281 |
* @param ownerDocument : Document - The Document object associated with this node.
|
jtulach@678
|
2282 |
*/
|
jtulach@678
|
2283 |
|
jtulach@678
|
2284 |
Node = function(ownerDocument) {
|
jtulach@678
|
2285 |
this.baseURI = 'about:blank';
|
jtulach@678
|
2286 |
this.namespaceURI = null;
|
jtulach@678
|
2287 |
this.nodeName = "";
|
jtulach@678
|
2288 |
this.nodeValue = null;
|
jtulach@678
|
2289 |
|
jtulach@678
|
2290 |
// A NodeList that contains all children of this node. If there are no
|
jtulach@678
|
2291 |
// children, this is a NodeList containing no nodes. The content of the
|
jtulach@678
|
2292 |
// returned NodeList is "live" in the sense that, for instance, changes to
|
jtulach@678
|
2293 |
// the children of the node object that it was created from are immediately
|
jtulach@678
|
2294 |
// reflected in the nodes returned by the NodeList accessors; it is not a
|
jtulach@678
|
2295 |
// static snapshot of the content of the node. This is true for every
|
jtulach@678
|
2296 |
// NodeList, including the ones returned by the getElementsByTagName method.
|
jtulach@678
|
2297 |
this.childNodes = new NodeList(ownerDocument, this);
|
jtulach@678
|
2298 |
|
jtulach@678
|
2299 |
// The first child of this node. If there is no such node, this is null
|
jtulach@678
|
2300 |
this.firstChild = null;
|
jtulach@678
|
2301 |
// The last child of this node. If there is no such node, this is null.
|
jtulach@678
|
2302 |
this.lastChild = null;
|
jtulach@678
|
2303 |
// The node immediately preceding this node. If there is no such node,
|
jtulach@678
|
2304 |
// this is null.
|
jtulach@678
|
2305 |
this.previousSibling = null;
|
jtulach@678
|
2306 |
// The node immediately following this node. If there is no such node,
|
jtulach@678
|
2307 |
// this is null.
|
jtulach@678
|
2308 |
this.nextSibling = null;
|
jtulach@678
|
2309 |
|
jtulach@678
|
2310 |
this.attributes = null;
|
jtulach@678
|
2311 |
// The namespaces in scope for this node
|
jtulach@678
|
2312 |
this._namespaces = new NamespaceNodeMap(ownerDocument, this);
|
jtulach@678
|
2313 |
this._readonly = false;
|
jtulach@678
|
2314 |
|
jtulach@678
|
2315 |
//IMPORTANT: These must come last so rhino will not iterate parent
|
jtulach@678
|
2316 |
// properties before child properties. (qunit.equiv issue)
|
jtulach@678
|
2317 |
|
jtulach@678
|
2318 |
// The parent of this node. All nodes, except Document, DocumentFragment,
|
jtulach@678
|
2319 |
// and Attr may have a parent. However, if a node has just been created
|
jtulach@678
|
2320 |
// and not yet added to the tree, or if it has been removed from the tree,
|
jtulach@678
|
2321 |
// this is null
|
jtulach@678
|
2322 |
this.parentNode = null;
|
jtulach@678
|
2323 |
// The Document object associated with this node
|
jtulach@678
|
2324 |
this.ownerDocument = ownerDocument;
|
jtulach@678
|
2325 |
|
jtulach@678
|
2326 |
};
|
jtulach@678
|
2327 |
|
jtulach@678
|
2328 |
// nodeType constants
|
jtulach@678
|
2329 |
Node.ELEMENT_NODE = 1;
|
jtulach@678
|
2330 |
Node.ATTRIBUTE_NODE = 2;
|
jtulach@678
|
2331 |
Node.TEXT_NODE = 3;
|
jtulach@678
|
2332 |
Node.CDATA_SECTION_NODE = 4;
|
jtulach@678
|
2333 |
Node.ENTITY_REFERENCE_NODE = 5;
|
jtulach@678
|
2334 |
Node.ENTITY_NODE = 6;
|
jtulach@678
|
2335 |
Node.PROCESSING_INSTRUCTION_NODE = 7;
|
jtulach@678
|
2336 |
Node.COMMENT_NODE = 8;
|
jtulach@678
|
2337 |
Node.DOCUMENT_NODE = 9;
|
jtulach@678
|
2338 |
Node.DOCUMENT_TYPE_NODE = 10;
|
jtulach@678
|
2339 |
Node.DOCUMENT_FRAGMENT_NODE = 11;
|
jtulach@678
|
2340 |
Node.NOTATION_NODE = 12;
|
jtulach@678
|
2341 |
Node.NAMESPACE_NODE = 13;
|
jtulach@678
|
2342 |
|
jtulach@678
|
2343 |
Node.DOCUMENT_POSITION_EQUAL = 0x00;
|
jtulach@678
|
2344 |
Node.DOCUMENT_POSITION_DISCONNECTED = 0x01;
|
jtulach@678
|
2345 |
Node.DOCUMENT_POSITION_PRECEDING = 0x02;
|
jtulach@678
|
2346 |
Node.DOCUMENT_POSITION_FOLLOWING = 0x04;
|
jtulach@678
|
2347 |
Node.DOCUMENT_POSITION_CONTAINS = 0x08;
|
jtulach@678
|
2348 |
Node.DOCUMENT_POSITION_CONTAINED_BY = 0x10;
|
jtulach@678
|
2349 |
Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC = 0x20;
|
jtulach@678
|
2350 |
|
jtulach@678
|
2351 |
|
jtulach@678
|
2352 |
__extend__(Node.prototype, {
|
jtulach@678
|
2353 |
get localName(){
|
jtulach@678
|
2354 |
return this.prefix?
|
jtulach@678
|
2355 |
this.nodeName.substring(this.prefix.length+1, this.nodeName.length):
|
jtulach@678
|
2356 |
this.nodeName;
|
jtulach@678
|
2357 |
},
|
jtulach@678
|
2358 |
get prefix(){
|
jtulach@678
|
2359 |
return this.nodeName.split(':').length>1?
|
jtulach@678
|
2360 |
this.nodeName.split(':')[0]:
|
jtulach@678
|
2361 |
null;
|
jtulach@678
|
2362 |
},
|
jtulach@678
|
2363 |
set prefix(value){
|
jtulach@678
|
2364 |
if(value === null){
|
jtulach@678
|
2365 |
this.nodeName = this.localName;
|
jtulach@678
|
2366 |
}else{
|
jtulach@678
|
2367 |
this.nodeName = value+':'+this.localName;
|
jtulach@678
|
2368 |
}
|
jtulach@678
|
2369 |
},
|
jtulach@678
|
2370 |
hasAttributes : function() {
|
jtulach@678
|
2371 |
if (this.attributes.length == 0) {
|
jtulach@678
|
2372 |
return false;
|
jtulach@678
|
2373 |
}else{
|
jtulach@678
|
2374 |
return true;
|
jtulach@678
|
2375 |
}
|
jtulach@678
|
2376 |
},
|
jtulach@678
|
2377 |
get textContent(){
|
jtulach@678
|
2378 |
return __recursivelyGatherText__(this);
|
jtulach@678
|
2379 |
},
|
jtulach@678
|
2380 |
set textContent(newText){
|
jtulach@678
|
2381 |
while(this.firstChild != null){
|
jtulach@678
|
2382 |
this.removeChild( this.firstChild );
|
jtulach@678
|
2383 |
}
|
jtulach@678
|
2384 |
var text = this.ownerDocument.createTextNode(newText);
|
jtulach@678
|
2385 |
this.appendChild(text);
|
jtulach@678
|
2386 |
},
|
jtulach@678
|
2387 |
insertBefore : function(newChild, refChild) {
|
jtulach@678
|
2388 |
var prevNode;
|
jtulach@678
|
2389 |
|
jtulach@678
|
2390 |
if(newChild==null){
|
jtulach@678
|
2391 |
return newChild;
|
jtulach@678
|
2392 |
}
|
jtulach@678
|
2393 |
if(refChild==null){
|
jtulach@678
|
2394 |
this.appendChild(newChild);
|
jtulach@678
|
2395 |
return this.newChild;
|
jtulach@678
|
2396 |
}
|
jtulach@678
|
2397 |
|
jtulach@678
|
2398 |
// test for exceptions
|
jtulach@678
|
2399 |
if (__ownerDocument__(this).implementation.errorChecking) {
|
jtulach@678
|
2400 |
// throw Exception if Node is readonly
|
jtulach@678
|
2401 |
if (this._readonly) {
|
jtulach@678
|
2402 |
throw(new DOMException(DOMException.NO_MODIFICATION_ALLOWED_ERR));
|
jtulach@678
|
2403 |
}
|
jtulach@678
|
2404 |
|
jtulach@678
|
2405 |
// throw Exception if newChild was not created by this Document
|
jtulach@678
|
2406 |
if (__ownerDocument__(this) != __ownerDocument__(newChild)) {
|
jtulach@678
|
2407 |
throw(new DOMException(DOMException.WRONG_DOCUMENT_ERR));
|
jtulach@678
|
2408 |
}
|
jtulach@678
|
2409 |
|
jtulach@678
|
2410 |
// throw Exception if the node is an ancestor
|
jtulach@678
|
2411 |
if (__isAncestor__(this, newChild)) {
|
jtulach@678
|
2412 |
throw(new DOMException(DOMException.HIERARCHY_REQUEST_ERR));
|
jtulach@678
|
2413 |
}
|
jtulach@678
|
2414 |
}
|
jtulach@678
|
2415 |
|
jtulach@678
|
2416 |
// if refChild is specified, insert before it
|
jtulach@678
|
2417 |
if (refChild) {
|
jtulach@678
|
2418 |
// find index of refChild
|
jtulach@678
|
2419 |
var itemIndex = __findItemIndex__(this.childNodes, refChild);
|
jtulach@678
|
2420 |
// throw Exception if there is no child node with this id
|
jtulach@678
|
2421 |
if (__ownerDocument__(this).implementation.errorChecking && (itemIndex < 0)) {
|
jtulach@678
|
2422 |
throw(new DOMException(DOMException.NOT_FOUND_ERR));
|
jtulach@678
|
2423 |
}
|
jtulach@678
|
2424 |
|
jtulach@678
|
2425 |
// if the newChild is already in the tree,
|
jtulach@678
|
2426 |
var newChildParent = newChild.parentNode;
|
jtulach@678
|
2427 |
if (newChildParent) {
|
jtulach@678
|
2428 |
// remove it
|
jtulach@678
|
2429 |
newChildParent.removeChild(newChild);
|
jtulach@678
|
2430 |
}
|
jtulach@678
|
2431 |
|
jtulach@678
|
2432 |
// insert newChild into childNodes
|
jtulach@678
|
2433 |
__insertBefore__(this.childNodes, newChild, itemIndex);
|
jtulach@678
|
2434 |
|
jtulach@678
|
2435 |
// do node pointer surgery
|
jtulach@678
|
2436 |
prevNode = refChild.previousSibling;
|
jtulach@678
|
2437 |
|
jtulach@678
|
2438 |
// handle DocumentFragment
|
jtulach@678
|
2439 |
if (newChild.nodeType == Node.DOCUMENT_FRAGMENT_NODE) {
|
jtulach@678
|
2440 |
if (newChild.childNodes.length > 0) {
|
jtulach@678
|
2441 |
// set the parentNode of DocumentFragment's children
|
jtulach@678
|
2442 |
for (var ind = 0; ind < newChild.childNodes.length; ind++) {
|
jtulach@678
|
2443 |
newChild.childNodes[ind].parentNode = this;
|
jtulach@678
|
2444 |
}
|
jtulach@678
|
2445 |
|
jtulach@678
|
2446 |
// link refChild to last child of DocumentFragment
|
jtulach@678
|
2447 |
refChild.previousSibling = newChild.childNodes[newChild.childNodes.length-1];
|
jtulach@678
|
2448 |
}
|
jtulach@678
|
2449 |
}else {
|
jtulach@678
|
2450 |
// set the parentNode of the newChild
|
jtulach@678
|
2451 |
newChild.parentNode = this;
|
jtulach@678
|
2452 |
// link refChild to newChild
|
jtulach@678
|
2453 |
refChild.previousSibling = newChild;
|
jtulach@678
|
2454 |
}
|
jtulach@678
|
2455 |
|
jtulach@678
|
2456 |
}else {
|
jtulach@678
|
2457 |
// otherwise, append to end
|
jtulach@678
|
2458 |
prevNode = this.lastChild;
|
jtulach@678
|
2459 |
this.appendChild(newChild);
|
jtulach@678
|
2460 |
}
|
jtulach@678
|
2461 |
|
jtulach@678
|
2462 |
if (newChild.nodeType == Node.DOCUMENT_FRAGMENT_NODE) {
|
jtulach@678
|
2463 |
// do node pointer surgery for DocumentFragment
|
jtulach@678
|
2464 |
if (newChild.childNodes.length > 0) {
|
jtulach@678
|
2465 |
if (prevNode) {
|
jtulach@678
|
2466 |
prevNode.nextSibling = newChild.childNodes[0];
|
jtulach@678
|
2467 |
}else {
|
jtulach@678
|
2468 |
// this is the first child in the list
|
jtulach@678
|
2469 |
this.firstChild = newChild.childNodes[0];
|
jtulach@678
|
2470 |
}
|
jtulach@678
|
2471 |
newChild.childNodes[0].previousSibling = prevNode;
|
jtulach@678
|
2472 |
newChild.childNodes[newChild.childNodes.length-1].nextSibling = refChild;
|
jtulach@678
|
2473 |
}
|
jtulach@678
|
2474 |
}else {
|
jtulach@678
|
2475 |
// do node pointer surgery for newChild
|
jtulach@678
|
2476 |
if (prevNode) {
|
jtulach@678
|
2477 |
prevNode.nextSibling = newChild;
|
jtulach@678
|
2478 |
}else {
|
jtulach@678
|
2479 |
// this is the first child in the list
|
jtulach@678
|
2480 |
this.firstChild = newChild;
|
jtulach@678
|
2481 |
}
|
jtulach@678
|
2482 |
newChild.previousSibling = prevNode;
|
jtulach@678
|
2483 |
newChild.nextSibling = refChild;
|
jtulach@678
|
2484 |
}
|
jtulach@678
|
2485 |
|
jtulach@678
|
2486 |
return newChild;
|
jtulach@678
|
2487 |
},
|
jtulach@678
|
2488 |
replaceChild : function(newChild, oldChild) {
|
jtulach@678
|
2489 |
var ret = null;
|
jtulach@678
|
2490 |
|
jtulach@678
|
2491 |
if(newChild==null || oldChild==null){
|
jtulach@678
|
2492 |
return oldChild;
|
jtulach@678
|
2493 |
}
|
jtulach@678
|
2494 |
|
jtulach@678
|
2495 |
// test for exceptions
|
jtulach@678
|
2496 |
if (__ownerDocument__(this).implementation.errorChecking) {
|
jtulach@678
|
2497 |
// throw Exception if Node is readonly
|
jtulach@678
|
2498 |
if (this._readonly) {
|
jtulach@678
|
2499 |
throw(new DOMException(DOMException.NO_MODIFICATION_ALLOWED_ERR));
|
jtulach@678
|
2500 |
}
|
jtulach@678
|
2501 |
|
jtulach@678
|
2502 |
// throw Exception if newChild was not created by this Document
|
jtulach@678
|
2503 |
if (__ownerDocument__(this) != __ownerDocument__(newChild)) {
|
jtulach@678
|
2504 |
throw(new DOMException(DOMException.WRONG_DOCUMENT_ERR));
|
jtulach@678
|
2505 |
}
|
jtulach@678
|
2506 |
|
jtulach@678
|
2507 |
// throw Exception if the node is an ancestor
|
jtulach@678
|
2508 |
if (__isAncestor__(this, newChild)) {
|
jtulach@678
|
2509 |
throw(new DOMException(DOMException.HIERARCHY_REQUEST_ERR));
|
jtulach@678
|
2510 |
}
|
jtulach@678
|
2511 |
}
|
jtulach@678
|
2512 |
|
jtulach@678
|
2513 |
// get index of oldChild
|
jtulach@678
|
2514 |
var index = __findItemIndex__(this.childNodes, oldChild);
|
jtulach@678
|
2515 |
|
jtulach@678
|
2516 |
// throw Exception if there is no child node with this id
|
jtulach@678
|
2517 |
if (__ownerDocument__(this).implementation.errorChecking && (index < 0)) {
|
jtulach@678
|
2518 |
throw(new DOMException(DOMException.NOT_FOUND_ERR));
|
jtulach@678
|
2519 |
}
|
jtulach@678
|
2520 |
|
jtulach@678
|
2521 |
// if the newChild is already in the tree,
|
jtulach@678
|
2522 |
var newChildParent = newChild.parentNode;
|
jtulach@678
|
2523 |
if (newChildParent) {
|
jtulach@678
|
2524 |
// remove it
|
jtulach@678
|
2525 |
newChildParent.removeChild(newChild);
|
jtulach@678
|
2526 |
}
|
jtulach@678
|
2527 |
|
jtulach@678
|
2528 |
// add newChild to childNodes
|
jtulach@678
|
2529 |
ret = __replaceChild__(this.childNodes,newChild, index);
|
jtulach@678
|
2530 |
|
jtulach@678
|
2531 |
|
jtulach@678
|
2532 |
if (newChild.nodeType == Node.DOCUMENT_FRAGMENT_NODE) {
|
jtulach@678
|
2533 |
// do node pointer surgery for Document Fragment
|
jtulach@678
|
2534 |
if (newChild.childNodes.length > 0) {
|
jtulach@678
|
2535 |
for (var ind = 0; ind < newChild.childNodes.length; ind++) {
|
jtulach@678
|
2536 |
newChild.childNodes[ind].parentNode = this;
|
jtulach@678
|
2537 |
}
|
jtulach@678
|
2538 |
|
jtulach@678
|
2539 |
if (oldChild.previousSibling) {
|
jtulach@678
|
2540 |
oldChild.previousSibling.nextSibling = newChild.childNodes[0];
|
jtulach@678
|
2541 |
} else {
|
jtulach@678
|
2542 |
this.firstChild = newChild.childNodes[0];
|
jtulach@678
|
2543 |
}
|
jtulach@678
|
2544 |
|
jtulach@678
|
2545 |
if (oldChild.nextSibling) {
|
jtulach@678
|
2546 |
oldChild.nextSibling.previousSibling = newChild;
|
jtulach@678
|
2547 |
} else {
|
jtulach@678
|
2548 |
this.lastChild = newChild.childNodes[newChild.childNodes.length-1];
|
jtulach@678
|
2549 |
}
|
jtulach@678
|
2550 |
|
jtulach@678
|
2551 |
newChild.childNodes[0].previousSibling = oldChild.previousSibling;
|
jtulach@678
|
2552 |
newChild.childNodes[newChild.childNodes.length-1].nextSibling = oldChild.nextSibling;
|
jtulach@678
|
2553 |
}
|
jtulach@678
|
2554 |
} else {
|
jtulach@678
|
2555 |
// do node pointer surgery for newChild
|
jtulach@678
|
2556 |
newChild.parentNode = this;
|
jtulach@678
|
2557 |
|
jtulach@678
|
2558 |
if (oldChild.previousSibling) {
|
jtulach@678
|
2559 |
oldChild.previousSibling.nextSibling = newChild;
|
jtulach@678
|
2560 |
}else{
|
jtulach@678
|
2561 |
this.firstChild = newChild;
|
jtulach@678
|
2562 |
}
|
jtulach@678
|
2563 |
if (oldChild.nextSibling) {
|
jtulach@678
|
2564 |
oldChild.nextSibling.previousSibling = newChild;
|
jtulach@678
|
2565 |
}else{
|
jtulach@678
|
2566 |
this.lastChild = newChild;
|
jtulach@678
|
2567 |
}
|
jtulach@678
|
2568 |
newChild.previousSibling = oldChild.previousSibling;
|
jtulach@678
|
2569 |
newChild.nextSibling = oldChild.nextSibling;
|
jtulach@678
|
2570 |
}
|
jtulach@678
|
2571 |
|
jtulach@678
|
2572 |
return ret;
|
jtulach@678
|
2573 |
},
|
jtulach@678
|
2574 |
removeChild : function(oldChild) {
|
jtulach@678
|
2575 |
if(!oldChild){
|
jtulach@678
|
2576 |
return null;
|
jtulach@678
|
2577 |
}
|
jtulach@678
|
2578 |
// throw Exception if NamedNodeMap is readonly
|
jtulach@678
|
2579 |
if (__ownerDocument__(this).implementation.errorChecking &&
|
jtulach@678
|
2580 |
(this._readonly || oldChild._readonly)) {
|
jtulach@678
|
2581 |
throw(new DOMException(DOMException.NO_MODIFICATION_ALLOWED_ERR));
|
jtulach@678
|
2582 |
}
|
jtulach@678
|
2583 |
|
jtulach@678
|
2584 |
// get index of oldChild
|
jtulach@678
|
2585 |
var itemIndex = __findItemIndex__(this.childNodes, oldChild);
|
jtulach@678
|
2586 |
|
jtulach@678
|
2587 |
// throw Exception if there is no child node with this id
|
jtulach@678
|
2588 |
if (__ownerDocument__(this).implementation.errorChecking && (itemIndex < 0)) {
|
jtulach@678
|
2589 |
throw(new DOMException(DOMException.NOT_FOUND_ERR));
|
jtulach@678
|
2590 |
}
|
jtulach@678
|
2591 |
|
jtulach@678
|
2592 |
// remove oldChild from childNodes
|
jtulach@678
|
2593 |
__removeChild__(this.childNodes, itemIndex);
|
jtulach@678
|
2594 |
|
jtulach@678
|
2595 |
// do node pointer surgery
|
jtulach@678
|
2596 |
oldChild.parentNode = null;
|
jtulach@678
|
2597 |
|
jtulach@678
|
2598 |
if (oldChild.previousSibling) {
|
jtulach@678
|
2599 |
oldChild.previousSibling.nextSibling = oldChild.nextSibling;
|
jtulach@678
|
2600 |
}else {
|
jtulach@678
|
2601 |
this.firstChild = oldChild.nextSibling;
|
jtulach@678
|
2602 |
}
|
jtulach@678
|
2603 |
if (oldChild.nextSibling) {
|
jtulach@678
|
2604 |
oldChild.nextSibling.previousSibling = oldChild.previousSibling;
|
jtulach@678
|
2605 |
}else {
|
jtulach@678
|
2606 |
this.lastChild = oldChild.previousSibling;
|
jtulach@678
|
2607 |
}
|
jtulach@678
|
2608 |
|
jtulach@678
|
2609 |
oldChild.previousSibling = null;
|
jtulach@678
|
2610 |
oldChild.nextSibling = null;
|
jtulach@678
|
2611 |
|
jtulach@678
|
2612 |
return oldChild;
|
jtulach@678
|
2613 |
},
|
jtulach@678
|
2614 |
appendChild : function(newChild) {
|
jtulach@678
|
2615 |
if(!newChild){
|
jtulach@678
|
2616 |
return null;
|
jtulach@678
|
2617 |
}
|
jtulach@678
|
2618 |
// test for exceptions
|
jtulach@678
|
2619 |
if (__ownerDocument__(this).implementation.errorChecking) {
|
jtulach@678
|
2620 |
// throw Exception if Node is readonly
|
jtulach@678
|
2621 |
if (this._readonly) {
|
jtulach@678
|
2622 |
throw(new DOMException(DOMException.NO_MODIFICATION_ALLOWED_ERR));
|
jtulach@678
|
2623 |
}
|
jtulach@678
|
2624 |
|
jtulach@678
|
2625 |
// throw Exception if arg was not created by this Document
|
jtulach@678
|
2626 |
if (__ownerDocument__(this) != __ownerDocument__(this)) {
|
jtulach@678
|
2627 |
throw(new DOMException(DOMException.WRONG_DOCUMENT_ERR));
|
jtulach@678
|
2628 |
}
|
jtulach@678
|
2629 |
|
jtulach@678
|
2630 |
// throw Exception if the node is an ancestor
|
jtulach@678
|
2631 |
if (__isAncestor__(this, newChild)) {
|
jtulach@678
|
2632 |
throw(new DOMException(DOMException.HIERARCHY_REQUEST_ERR));
|
jtulach@678
|
2633 |
}
|
jtulach@678
|
2634 |
}
|
jtulach@678
|
2635 |
|
jtulach@678
|
2636 |
// if the newChild is already in the tree,
|
jtulach@678
|
2637 |
var newChildParent = newChild.parentNode;
|
jtulach@678
|
2638 |
if (newChildParent) {
|
jtulach@678
|
2639 |
// remove it
|
jtulach@678
|
2640 |
//console.debug('removing node %s', newChild);
|
jtulach@678
|
2641 |
newChildParent.removeChild(newChild);
|
jtulach@678
|
2642 |
}
|
jtulach@678
|
2643 |
|
jtulach@678
|
2644 |
// add newChild to childNodes
|
jtulach@678
|
2645 |
__appendChild__(this.childNodes, newChild);
|
jtulach@678
|
2646 |
|
jtulach@678
|
2647 |
if (newChild.nodeType == Node.DOCUMENT_FRAGMENT_NODE) {
|
jtulach@678
|
2648 |
// do node pointer surgery for DocumentFragment
|
jtulach@678
|
2649 |
if (newChild.childNodes.length > 0) {
|
jtulach@678
|
2650 |
for (var ind = 0; ind < newChild.childNodes.length; ind++) {
|
jtulach@678
|
2651 |
newChild.childNodes[ind].parentNode = this;
|
jtulach@678
|
2652 |
}
|
jtulach@678
|
2653 |
|
jtulach@678
|
2654 |
if (this.lastChild) {
|
jtulach@678
|
2655 |
this.lastChild.nextSibling = newChild.childNodes[0];
|
jtulach@678
|
2656 |
newChild.childNodes[0].previousSibling = this.lastChild;
|
jtulach@678
|
2657 |
this.lastChild = newChild.childNodes[newChild.childNodes.length-1];
|
jtulach@678
|
2658 |
} else {
|
jtulach@678
|
2659 |
this.lastChild = newChild.childNodes[newChild.childNodes.length-1];
|
jtulach@678
|
2660 |
this.firstChild = newChild.childNodes[0];
|
jtulach@678
|
2661 |
}
|
jtulach@678
|
2662 |
}
|
jtulach@678
|
2663 |
} else {
|
jtulach@678
|
2664 |
// do node pointer surgery for newChild
|
jtulach@678
|
2665 |
newChild.parentNode = this;
|
jtulach@678
|
2666 |
if (this.lastChild) {
|
jtulach@678
|
2667 |
this.lastChild.nextSibling = newChild;
|
jtulach@678
|
2668 |
newChild.previousSibling = this.lastChild;
|
jtulach@678
|
2669 |
this.lastChild = newChild;
|
jtulach@678
|
2670 |
} else {
|
jtulach@678
|
2671 |
this.lastChild = newChild;
|
jtulach@678
|
2672 |
this.firstChild = newChild;
|
jtulach@678
|
2673 |
}
|
jtulach@678
|
2674 |
}
|
jtulach@678
|
2675 |
return newChild;
|
jtulach@678
|
2676 |
},
|
jtulach@678
|
2677 |
hasChildNodes : function() {
|
jtulach@678
|
2678 |
return (this.childNodes.length > 0);
|
jtulach@678
|
2679 |
},
|
jtulach@678
|
2680 |
cloneNode: function(deep) {
|
jtulach@678
|
2681 |
// use importNode to clone this Node
|
jtulach@678
|
2682 |
//do not throw any exceptions
|
jtulach@678
|
2683 |
try {
|
jtulach@678
|
2684 |
return __ownerDocument__(this).importNode(this, deep);
|
jtulach@678
|
2685 |
} catch (e) {
|
jtulach@678
|
2686 |
//there shouldn't be any exceptions, but if there are, return null
|
jtulach@678
|
2687 |
// may want to warn: $debug("could not clone node: "+e.code);
|
jtulach@678
|
2688 |
return null;
|
jtulach@678
|
2689 |
}
|
jtulach@678
|
2690 |
},
|
jtulach@678
|
2691 |
normalize : function() {
|
jtulach@678
|
2692 |
var i;
|
jtulach@678
|
2693 |
var inode;
|
jtulach@678
|
2694 |
var nodesToRemove = new NodeList();
|
jtulach@678
|
2695 |
|
jtulach@678
|
2696 |
if (this.nodeType == Node.ELEMENT_NODE || this.nodeType == Node.DOCUMENT_NODE) {
|
jtulach@678
|
2697 |
var adjacentTextNode = null;
|
jtulach@678
|
2698 |
|
jtulach@678
|
2699 |
// loop through all childNodes
|
jtulach@678
|
2700 |
for(i = 0; i < this.childNodes.length; i++) {
|
jtulach@678
|
2701 |
inode = this.childNodes.item(i);
|
jtulach@678
|
2702 |
|
jtulach@678
|
2703 |
if (inode.nodeType == Node.TEXT_NODE) {
|
jtulach@678
|
2704 |
// this node is a text node
|
jtulach@678
|
2705 |
if (inode.length < 1) {
|
jtulach@678
|
2706 |
// this text node is empty
|
jtulach@678
|
2707 |
// add this node to the list of nodes to be remove
|
jtulach@678
|
2708 |
__appendChild__(nodesToRemove, inode);
|
jtulach@678
|
2709 |
}else {
|
jtulach@678
|
2710 |
if (adjacentTextNode) {
|
jtulach@678
|
2711 |
// previous node was also text
|
jtulach@678
|
2712 |
adjacentTextNode.appendData(inode.data);
|
jtulach@678
|
2713 |
// merge the data in adjacent text nodes
|
jtulach@678
|
2714 |
// add this node to the list of nodes to be removed
|
jtulach@678
|
2715 |
__appendChild__(nodesToRemove, inode);
|
jtulach@678
|
2716 |
} else {
|
jtulach@678
|
2717 |
// remember this node for next cycle
|
jtulach@678
|
2718 |
adjacentTextNode = inode;
|
jtulach@678
|
2719 |
}
|
jtulach@678
|
2720 |
}
|
jtulach@678
|
2721 |
} else {
|
jtulach@678
|
2722 |
// (soon to be) previous node is not a text node
|
jtulach@678
|
2723 |
adjacentTextNode = null;
|
jtulach@678
|
2724 |
// normalize non Text childNodes
|
jtulach@678
|
2725 |
inode.normalize();
|
jtulach@678
|
2726 |
}
|
jtulach@678
|
2727 |
}
|
jtulach@678
|
2728 |
|
jtulach@678
|
2729 |
// remove redundant Text Nodes
|
jtulach@678
|
2730 |
for(i = 0; i < nodesToRemove.length; i++) {
|
jtulach@678
|
2731 |
inode = nodesToRemove.item(i);
|
jtulach@678
|
2732 |
inode.parentNode.removeChild(inode);
|
jtulach@678
|
2733 |
}
|
jtulach@678
|
2734 |
}
|
jtulach@678
|
2735 |
},
|
jtulach@678
|
2736 |
isSupported : function(feature, version) {
|
jtulach@678
|
2737 |
// use Implementation.hasFeature to determine if this feature is supported
|
jtulach@678
|
2738 |
return __ownerDocument__(this).implementation.hasFeature(feature, version);
|
jtulach@678
|
2739 |
},
|
jtulach@678
|
2740 |
getElementsByTagName : function(tagname) {
|
jtulach@678
|
2741 |
// delegate to _getElementsByTagNameRecursive
|
jtulach@678
|
2742 |
// recurse childNodes
|
jtulach@678
|
2743 |
var nodelist = new NodeList(__ownerDocument__(this));
|
jtulach@678
|
2744 |
for (var i = 0; i < this.childNodes.length; i++) {
|
jtulach@678
|
2745 |
__getElementsByTagNameRecursive__(this.childNodes.item(i),
|
jtulach@678
|
2746 |
tagname,
|
jtulach@678
|
2747 |
nodelist);
|
jtulach@678
|
2748 |
}
|
jtulach@678
|
2749 |
return nodelist;
|
jtulach@678
|
2750 |
},
|
jtulach@678
|
2751 |
getElementsByTagNameNS : function(namespaceURI, localName) {
|
jtulach@678
|
2752 |
// delegate to _getElementsByTagNameNSRecursive
|
jtulach@678
|
2753 |
return __getElementsByTagNameNSRecursive__(this, namespaceURI, localName,
|
jtulach@678
|
2754 |
new NodeList(__ownerDocument__(this)));
|
jtulach@678
|
2755 |
},
|
jtulach@678
|
2756 |
importNode : function(importedNode, deep) {
|
jtulach@678
|
2757 |
var i;
|
jtulach@678
|
2758 |
var importNode;
|
jtulach@678
|
2759 |
|
jtulach@678
|
2760 |
//there is no need to perform namespace checks since everything has already gone through them
|
jtulach@678
|
2761 |
//in order to have gotten into the DOM in the first place. The following line
|
jtulach@678
|
2762 |
//turns namespace checking off in ._isValidNamespace
|
jtulach@678
|
2763 |
__ownerDocument__(this).importing = true;
|
jtulach@678
|
2764 |
|
jtulach@678
|
2765 |
if (importedNode.nodeType == Node.ELEMENT_NODE) {
|
jtulach@678
|
2766 |
if (!__ownerDocument__(this).implementation.namespaceAware) {
|
jtulach@678
|
2767 |
// create a local Element (with the name of the importedNode)
|
jtulach@678
|
2768 |
importNode = __ownerDocument__(this).createElement(importedNode.tagName);
|
jtulach@678
|
2769 |
|
jtulach@678
|
2770 |
// create attributes matching those of the importedNode
|
jtulach@678
|
2771 |
for(i = 0; i < importedNode.attributes.length; i++) {
|
jtulach@678
|
2772 |
importNode.setAttribute(importedNode.attributes.item(i).name, importedNode.attributes.item(i).value);
|
jtulach@678
|
2773 |
}
|
jtulach@678
|
2774 |
} else {
|
jtulach@678
|
2775 |
// create a local Element (with the name & namespaceURI of the importedNode)
|
jtulach@678
|
2776 |
importNode = __ownerDocument__(this).createElementNS(importedNode.namespaceURI, importedNode.nodeName);
|
jtulach@678
|
2777 |
|
jtulach@678
|
2778 |
// create attributes matching those of the importedNode
|
jtulach@678
|
2779 |
for(i = 0; i < importedNode.attributes.length; i++) {
|
jtulach@678
|
2780 |
importNode.setAttributeNS(importedNode.attributes.item(i).namespaceURI,
|
jtulach@678
|
2781 |
importedNode.attributes.item(i).name, importedNode.attributes.item(i).value);
|
jtulach@678
|
2782 |
}
|
jtulach@678
|
2783 |
|
jtulach@678
|
2784 |
// create namespace definitions matching those of the importedNode
|
jtulach@678
|
2785 |
for(i = 0; i < importedNode._namespaces.length; i++) {
|
jtulach@678
|
2786 |
importNode._namespaces[i] = __ownerDocument__(this).createNamespace(importedNode._namespaces.item(i).localName);
|
jtulach@678
|
2787 |
importNode._namespaces[i].value = importedNode._namespaces.item(i).value;
|
jtulach@678
|
2788 |
}
|
jtulach@678
|
2789 |
}
|
jtulach@678
|
2790 |
} else if (importedNode.nodeType == Node.ATTRIBUTE_NODE) {
|
jtulach@678
|
2791 |
if (!__ownerDocument__(this).implementation.namespaceAware) {
|
jtulach@678
|
2792 |
// create a local Attribute (with the name of the importedAttribute)
|
jtulach@678
|
2793 |
importNode = __ownerDocument__(this).createAttribute(importedNode.name);
|
jtulach@678
|
2794 |
} else {
|
jtulach@678
|
2795 |
// create a local Attribute (with the name & namespaceURI of the importedAttribute)
|
jtulach@678
|
2796 |
importNode = __ownerDocument__(this).createAttributeNS(importedNode.namespaceURI, importedNode.nodeName);
|
jtulach@678
|
2797 |
|
jtulach@678
|
2798 |
// create namespace definitions matching those of the importedAttribute
|
jtulach@678
|
2799 |
for(i = 0; i < importedNode._namespaces.length; i++) {
|
jtulach@678
|
2800 |
importNode._namespaces[i] = __ownerDocument__(this).createNamespace(importedNode._namespaces.item(i).localName);
|
jtulach@678
|
2801 |
importNode._namespaces[i].value = importedNode._namespaces.item(i).value;
|
jtulach@678
|
2802 |
}
|
jtulach@678
|
2803 |
}
|
jtulach@678
|
2804 |
|
jtulach@678
|
2805 |
// set the value of the local Attribute to match that of the importedAttribute
|
jtulach@678
|
2806 |
importNode.value = importedNode.value;
|
jtulach@678
|
2807 |
|
jtulach@678
|
2808 |
} else if (importedNode.nodeType == Node.DOCUMENT_FRAGMENT_NODE) {
|
jtulach@678
|
2809 |
// create a local DocumentFragment
|
jtulach@678
|
2810 |
importNode = __ownerDocument__(this).createDocumentFragment();
|
jtulach@678
|
2811 |
} else if (importedNode.nodeType == Node.NAMESPACE_NODE) {
|
jtulach@678
|
2812 |
// create a local NamespaceNode (with the same name & value as the importedNode)
|
jtulach@678
|
2813 |
importNode = __ownerDocument__(this).createNamespace(importedNode.nodeName);
|
jtulach@678
|
2814 |
importNode.value = importedNode.value;
|
jtulach@678
|
2815 |
} else if (importedNode.nodeType == Node.TEXT_NODE) {
|
jtulach@678
|
2816 |
// create a local TextNode (with the same data as the importedNode)
|
jtulach@678
|
2817 |
importNode = __ownerDocument__(this).createTextNode(importedNode.data);
|
jtulach@678
|
2818 |
} else if (importedNode.nodeType == Node.CDATA_SECTION_NODE) {
|
jtulach@678
|
2819 |
// create a local CDATANode (with the same data as the importedNode)
|
jtulach@678
|
2820 |
importNode = __ownerDocument__(this).createCDATASection(importedNode.data);
|
jtulach@678
|
2821 |
} else if (importedNode.nodeType == Node.PROCESSING_INSTRUCTION_NODE) {
|
jtulach@678
|
2822 |
// create a local ProcessingInstruction (with the same target & data as the importedNode)
|
jtulach@678
|
2823 |
importNode = __ownerDocument__(this).createProcessingInstruction(importedNode.target, importedNode.data);
|
jtulach@678
|
2824 |
} else if (importedNode.nodeType == Node.COMMENT_NODE) {
|
jtulach@678
|
2825 |
// create a local Comment (with the same data as the importedNode)
|
jtulach@678
|
2826 |
importNode = __ownerDocument__(this).createComment(importedNode.data);
|
jtulach@678
|
2827 |
} else { // throw Exception if nodeType is not supported
|
jtulach@678
|
2828 |
throw(new DOMException(DOMException.NOT_SUPPORTED_ERR));
|
jtulach@678
|
2829 |
}
|
jtulach@678
|
2830 |
|
jtulach@678
|
2831 |
if (deep) {
|
jtulach@678
|
2832 |
// recurse childNodes
|
jtulach@678
|
2833 |
for(i = 0; i < importedNode.childNodes.length; i++) {
|
jtulach@678
|
2834 |
importNode.appendChild(__ownerDocument__(this).importNode(importedNode.childNodes.item(i), true));
|
jtulach@678
|
2835 |
}
|
jtulach@678
|
2836 |
}
|
jtulach@678
|
2837 |
|
jtulach@678
|
2838 |
//reset importing
|
jtulach@678
|
2839 |
__ownerDocument__(this).importing = false;
|
jtulach@678
|
2840 |
return importNode;
|
jtulach@678
|
2841 |
|
jtulach@678
|
2842 |
},
|
jtulach@678
|
2843 |
contains : function(node){
|
jtulach@678
|
2844 |
while(node && node != this ){
|
jtulach@678
|
2845 |
node = node.parentNode;
|
jtulach@678
|
2846 |
}
|
jtulach@678
|
2847 |
return !!node;
|
jtulach@678
|
2848 |
},
|
jtulach@678
|
2849 |
compareDocumentPosition : function(b){
|
jtulach@678
|
2850 |
//console.log("comparing document position %s %s", this, b);
|
jtulach@678
|
2851 |
var i,
|
jtulach@678
|
2852 |
length,
|
jtulach@678
|
2853 |
a = this,
|
jtulach@678
|
2854 |
parent,
|
jtulach@678
|
2855 |
aparents,
|
jtulach@678
|
2856 |
bparents;
|
jtulach@678
|
2857 |
//handle a couple simpler case first
|
jtulach@678
|
2858 |
if(a === b) {
|
jtulach@678
|
2859 |
return Node.DOCUMENT_POSITION_EQUAL;
|
jtulach@678
|
2860 |
}
|
jtulach@678
|
2861 |
if(a.ownerDocument !== b.ownerDocument) {
|
jtulach@678
|
2862 |
return Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC|
|
jtulach@678
|
2863 |
Node.DOCUMENT_POSITION_FOLLOWING|
|
jtulach@678
|
2864 |
Node.DOCUMENT_POSITION_DISCONNECTED;
|
jtulach@678
|
2865 |
}
|
jtulach@678
|
2866 |
if(a.parentNode === b.parentNode){
|
jtulach@678
|
2867 |
length = a.parentNode.childNodes.length;
|
jtulach@678
|
2868 |
for(i=0;i<length;i++){
|
jtulach@678
|
2869 |
if(a.parentNode.childNodes[i] === a){
|
jtulach@678
|
2870 |
return Node.DOCUMENT_POSITION_FOLLOWING;
|
jtulach@678
|
2871 |
}else if(a.parentNode.childNodes[i] === b){
|
jtulach@678
|
2872 |
return Node.DOCUMENT_POSITION_PRECEDING;
|
jtulach@678
|
2873 |
}
|
jtulach@678
|
2874 |
}
|
jtulach@678
|
2875 |
}
|
jtulach@678
|
2876 |
|
jtulach@678
|
2877 |
if(a.contains(b)) {
|
jtulach@678
|
2878 |
return Node.DOCUMENT_POSITION_CONTAINED_BY|
|
jtulach@678
|
2879 |
Node.DOCUMENT_POSITION_FOLLOWING;
|
jtulach@678
|
2880 |
}
|
jtulach@678
|
2881 |
if(b.contains(a)) {
|
jtulach@678
|
2882 |
return Node.DOCUMENT_POSITION_CONTAINS|
|
jtulach@678
|
2883 |
Node.DOCUMENT_POSITION_PRECEDING;
|
jtulach@678
|
2884 |
}
|
jtulach@678
|
2885 |
aparents = [];
|
jtulach@678
|
2886 |
parent = a.parentNode;
|
jtulach@678
|
2887 |
while(parent){
|
jtulach@678
|
2888 |
aparents[aparents.length] = parent;
|
jtulach@678
|
2889 |
parent = parent.parentNode;
|
jtulach@678
|
2890 |
}
|
jtulach@678
|
2891 |
|
jtulach@678
|
2892 |
bparents = [];
|
jtulach@678
|
2893 |
parent = b.parentNode;
|
jtulach@678
|
2894 |
while(parent){
|
jtulach@678
|
2895 |
i = aparents.indexOf(parent);
|
jtulach@678
|
2896 |
if(i < 0){
|
jtulach@678
|
2897 |
bparents[bparents.length] = parent;
|
jtulach@678
|
2898 |
parent = parent.parentNode;
|
jtulach@678
|
2899 |
}else{
|
jtulach@678
|
2900 |
//i cant be 0 since we already checked for equal parentNode
|
jtulach@678
|
2901 |
if(bparents.length > aparents.length){
|
jtulach@678
|
2902 |
return Node.DOCUMENT_POSITION_FOLLOWING;
|
jtulach@678
|
2903 |
}else if(bparents.length < aparents.length){
|
jtulach@678
|
2904 |
return Node.DOCUMENT_POSITION_PRECEDING;
|
jtulach@678
|
2905 |
}else{
|
jtulach@678
|
2906 |
//common ancestor diverge point
|
jtulach@678
|
2907 |
if (i === 0) {
|
jtulach@678
|
2908 |
return Node.DOCUMENT_POSITION_FOLLOWING;
|
jtulach@678
|
2909 |
} else {
|
jtulach@678
|
2910 |
parent = aparents[i-1];
|
jtulach@678
|
2911 |
}
|
jtulach@678
|
2912 |
return parent.compareDocumentPosition(bparents.pop());
|
jtulach@678
|
2913 |
}
|
jtulach@678
|
2914 |
}
|
jtulach@678
|
2915 |
}
|
jtulach@678
|
2916 |
|
jtulach@678
|
2917 |
return Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC|
|
jtulach@678
|
2918 |
Node.DOCUMENT_POSITION_DISCONNECTED;
|
jtulach@678
|
2919 |
|
jtulach@678
|
2920 |
},
|
jtulach@678
|
2921 |
toString : function() {
|
jtulach@678
|
2922 |
return '[object Node]';
|
jtulach@678
|
2923 |
}
|
jtulach@678
|
2924 |
|
jtulach@678
|
2925 |
});
|
jtulach@678
|
2926 |
|
jtulach@678
|
2927 |
|
jtulach@678
|
2928 |
|
jtulach@678
|
2929 |
/**
|
jtulach@678
|
2930 |
* @method __getElementsByTagNameRecursive__ - implements getElementsByTagName()
|
jtulach@678
|
2931 |
* @param elem : Element - The element which are checking and then recursing into
|
jtulach@678
|
2932 |
* @param tagname : string - The name of the tag to match on. The special value "*" matches all tags
|
jtulach@678
|
2933 |
* @param nodeList : NodeList - The accumulating list of matching nodes
|
jtulach@678
|
2934 |
*
|
jtulach@678
|
2935 |
* @return : NodeList
|
jtulach@678
|
2936 |
*/
|
jtulach@678
|
2937 |
var __getElementsByTagNameRecursive__ = function (elem, tagname, nodeList) {
|
jtulach@678
|
2938 |
|
jtulach@678
|
2939 |
if (elem.nodeType == Node.ELEMENT_NODE || elem.nodeType == Node.DOCUMENT_NODE) {
|
jtulach@678
|
2940 |
|
jtulach@678
|
2941 |
if(elem.nodeType !== Node.DOCUMENT_NODE &&
|
jtulach@678
|
2942 |
((elem.nodeName.toUpperCase() == tagname.toUpperCase()) ||
|
jtulach@678
|
2943 |
(tagname == "*")) ){
|
jtulach@678
|
2944 |
// add matching node to nodeList
|
jtulach@678
|
2945 |
__appendChild__(nodeList, elem);
|
jtulach@678
|
2946 |
}
|
jtulach@678
|
2947 |
|
jtulach@678
|
2948 |
// recurse childNodes
|
jtulach@678
|
2949 |
for(var i = 0; i < elem.childNodes.length; i++) {
|
jtulach@678
|
2950 |
nodeList = __getElementsByTagNameRecursive__(elem.childNodes.item(i), tagname, nodeList);
|
jtulach@678
|
2951 |
}
|
jtulach@678
|
2952 |
}
|
jtulach@678
|
2953 |
|
jtulach@678
|
2954 |
return nodeList;
|
jtulach@678
|
2955 |
};
|
jtulach@678
|
2956 |
|
jtulach@678
|
2957 |
/**
|
jtulach@678
|
2958 |
* @method __getElementsByTagNameNSRecursive__
|
jtulach@678
|
2959 |
* implements getElementsByTagName()
|
jtulach@678
|
2960 |
*
|
jtulach@678
|
2961 |
* @param elem : Element - The element which are checking and then recursing into
|
jtulach@678
|
2962 |
* @param namespaceURI : string - the namespace URI of the required node
|
jtulach@678
|
2963 |
* @param localName : string - the local name of the required node
|
jtulach@678
|
2964 |
* @param nodeList : NodeList - The accumulating list of matching nodes
|
jtulach@678
|
2965 |
*
|
jtulach@678
|
2966 |
* @return : NodeList
|
jtulach@678
|
2967 |
*/
|
jtulach@678
|
2968 |
var __getElementsByTagNameNSRecursive__ = function(elem, namespaceURI, localName, nodeList) {
|
jtulach@678
|
2969 |
if (elem.nodeType == Node.ELEMENT_NODE || elem.nodeType == Node.DOCUMENT_NODE) {
|
jtulach@678
|
2970 |
|
jtulach@678
|
2971 |
if (((elem.namespaceURI == namespaceURI) || (namespaceURI == "*")) &&
|
jtulach@678
|
2972 |
((elem.localName == localName) || (localName == "*"))) {
|
jtulach@678
|
2973 |
// add matching node to nodeList
|
jtulach@678
|
2974 |
__appendChild__(nodeList, elem);
|
jtulach@678
|
2975 |
}
|
jtulach@678
|
2976 |
|
jtulach@678
|
2977 |
// recurse childNodes
|
jtulach@678
|
2978 |
for(var i = 0; i < elem.childNodes.length; i++) {
|
jtulach@678
|
2979 |
nodeList = __getElementsByTagNameNSRecursive__(
|
jtulach@678
|
2980 |
elem.childNodes.item(i), namespaceURI, localName, nodeList);
|
jtulach@678
|
2981 |
}
|
jtulach@678
|
2982 |
}
|
jtulach@678
|
2983 |
|
jtulach@678
|
2984 |
return nodeList;
|
jtulach@678
|
2985 |
};
|
jtulach@678
|
2986 |
|
jtulach@678
|
2987 |
/**
|
jtulach@678
|
2988 |
* @method __isAncestor__ - returns true if node is ancestor of target
|
jtulach@678
|
2989 |
* @param target : Node - The node we are using as context
|
jtulach@678
|
2990 |
* @param node : Node - The candidate ancestor node
|
jtulach@678
|
2991 |
* @return : boolean
|
jtulach@678
|
2992 |
*/
|
jtulach@678
|
2993 |
var __isAncestor__ = function(target, node) {
|
jtulach@678
|
2994 |
// if this node matches, return true,
|
jtulach@678
|
2995 |
// otherwise recurse up (if there is a parentNode)
|
jtulach@678
|
2996 |
return ((target == node) || ((target.parentNode) && (__isAncestor__(target.parentNode, node))));
|
jtulach@678
|
2997 |
};
|
jtulach@678
|
2998 |
|
jtulach@678
|
2999 |
|
jtulach@678
|
3000 |
|
jtulach@678
|
3001 |
var __recursivelyGatherText__ = function(aNode) {
|
jtulach@678
|
3002 |
var accumulateText = "",
|
jtulach@678
|
3003 |
idx,
|
jtulach@678
|
3004 |
node;
|
jtulach@678
|
3005 |
for (idx=0;idx < aNode.childNodes.length;idx++){
|
jtulach@678
|
3006 |
node = aNode.childNodes.item(idx);
|
jtulach@678
|
3007 |
if(node.nodeType == Node.TEXT_NODE)
|
jtulach@678
|
3008 |
accumulateText += node.data;
|
jtulach@678
|
3009 |
else
|
jtulach@678
|
3010 |
accumulateText += __recursivelyGatherText__(node);
|
jtulach@678
|
3011 |
}
|
jtulach@678
|
3012 |
return accumulateText;
|
jtulach@678
|
3013 |
};
|
jtulach@678
|
3014 |
|
jtulach@678
|
3015 |
/**
|
jtulach@678
|
3016 |
* function __escapeXML__
|
jtulach@678
|
3017 |
* @param str : string - The string to be escaped
|
jtulach@678
|
3018 |
* @return : string - The escaped string
|
jtulach@678
|
3019 |
*/
|
jtulach@678
|
3020 |
var escAmpRegEx = /&(?!(amp;|lt;|gt;|quot|apos;))/g;
|
jtulach@678
|
3021 |
var escLtRegEx = /</g;
|
jtulach@678
|
3022 |
var escGtRegEx = />/g;
|
jtulach@678
|
3023 |
var quotRegEx = /"/g;
|
jtulach@678
|
3024 |
var aposRegEx = /'/g;
|
jtulach@678
|
3025 |
|
jtulach@678
|
3026 |
function __escapeXML__(str) {
|
jtulach@678
|
3027 |
str = str.replace(escAmpRegEx, "&").
|
jtulach@678
|
3028 |
replace(escLtRegEx, "<").
|
jtulach@678
|
3029 |
replace(escGtRegEx, ">").
|
jtulach@678
|
3030 |
replace(quotRegEx, """).
|
jtulach@678
|
3031 |
replace(aposRegEx, "'");
|
jtulach@678
|
3032 |
|
jtulach@678
|
3033 |
return str;
|
jtulach@678
|
3034 |
};
|
jtulach@678
|
3035 |
|
jtulach@678
|
3036 |
/*
|
jtulach@678
|
3037 |
function __escapeHTML5__(str) {
|
jtulach@678
|
3038 |
str = str.replace(escAmpRegEx, "&").
|
jtulach@678
|
3039 |
replace(escLtRegEx, "<").
|
jtulach@678
|
3040 |
replace(escGtRegEx, ">");
|
jtulach@678
|
3041 |
|
jtulach@678
|
3042 |
return str;
|
jtulach@678
|
3043 |
};
|
jtulach@678
|
3044 |
function __escapeHTML5Atribute__(str) {
|
jtulach@678
|
3045 |
str = str.replace(escAmpRegEx, "&").
|
jtulach@678
|
3046 |
replace(escLtRegEx, "<").
|
jtulach@678
|
3047 |
replace(escGtRegEx, ">").
|
jtulach@678
|
3048 |
replace(quotRegEx, """).
|
jtulach@678
|
3049 |
replace(aposRegEx, "'");
|
jtulach@678
|
3050 |
|
jtulach@678
|
3051 |
return str;
|
jtulach@678
|
3052 |
};
|
jtulach@678
|
3053 |
*/
|
jtulach@678
|
3054 |
|
jtulach@678
|
3055 |
/**
|
jtulach@678
|
3056 |
* function __unescapeXML__
|
jtulach@678
|
3057 |
* @param str : string - The string to be unescaped
|
jtulach@678
|
3058 |
* @return : string - The unescaped string
|
jtulach@678
|
3059 |
*/
|
jtulach@678
|
3060 |
var unescAmpRegEx = /&/g;
|
jtulach@678
|
3061 |
var unescLtRegEx = /</g;
|
jtulach@678
|
3062 |
var unescGtRegEx = />/g;
|
jtulach@678
|
3063 |
var unquotRegEx = /"/g;
|
jtulach@678
|
3064 |
var unaposRegEx = /'/g;
|
jtulach@678
|
3065 |
function __unescapeXML__(str) {
|
jtulach@678
|
3066 |
str = str.replace(unescAmpRegEx, "&").
|
jtulach@678
|
3067 |
replace(unescLtRegEx, "<").
|
jtulach@678
|
3068 |
replace(unescGtRegEx, ">").
|
jtulach@678
|
3069 |
replace(unquotRegEx, "\"").
|
jtulach@678
|
3070 |
replace(unaposRegEx, "'");
|
jtulach@678
|
3071 |
|
jtulach@678
|
3072 |
return str;
|
jtulach@678
|
3073 |
};
|
jtulach@678
|
3074 |
|
jtulach@678
|
3075 |
/**
|
jtulach@678
|
3076 |
* @class NamedNodeMap -
|
jtulach@678
|
3077 |
* used to represent collections of nodes that can be accessed by name
|
jtulach@678
|
3078 |
* typically a set of Element attributes
|
jtulach@678
|
3079 |
*
|
jtulach@678
|
3080 |
* @extends NodeList -
|
jtulach@678
|
3081 |
* note W3C spec says that this is not the case, but we need an item()
|
jtulach@678
|
3082 |
* method identical to NodeList's, so why not?
|
jtulach@678
|
3083 |
* @param ownerDocument : Document - the ownerDocument
|
jtulach@678
|
3084 |
* @param parentNode : Node - the node that the NamedNodeMap is attached to (or null)
|
jtulach@678
|
3085 |
*/
|
jtulach@678
|
3086 |
NamedNodeMap = function(ownerDocument, parentNode) {
|
jtulach@678
|
3087 |
NodeList.apply(this, arguments);
|
jtulach@678
|
3088 |
__setArray__(this, []);
|
jtulach@678
|
3089 |
};
|
jtulach@678
|
3090 |
NamedNodeMap.prototype = new NodeList();
|
jtulach@678
|
3091 |
__extend__(NamedNodeMap.prototype, {
|
jtulach@678
|
3092 |
add: function(name){
|
jtulach@678
|
3093 |
this[this.length] = name;
|
jtulach@678
|
3094 |
},
|
jtulach@678
|
3095 |
getNamedItem : function(name) {
|
jtulach@678
|
3096 |
var ret = null;
|
jtulach@678
|
3097 |
//console.log('NamedNodeMap getNamedItem %s', name);
|
jtulach@678
|
3098 |
// test that Named Node exists
|
jtulach@678
|
3099 |
var itemIndex = __findNamedItemIndex__(this, name);
|
jtulach@678
|
3100 |
|
jtulach@678
|
3101 |
if (itemIndex > -1) {
|
jtulach@678
|
3102 |
// found it!
|
jtulach@678
|
3103 |
ret = this[itemIndex];
|
jtulach@678
|
3104 |
}
|
jtulach@678
|
3105 |
// if node is not found, default value null is returned
|
jtulach@678
|
3106 |
return ret;
|
jtulach@678
|
3107 |
},
|
jtulach@678
|
3108 |
setNamedItem : function(arg) {
|
jtulach@678
|
3109 |
//console.log('setNamedItem %s', arg);
|
jtulach@678
|
3110 |
// test for exceptions
|
jtulach@678
|
3111 |
if (__ownerDocument__(this).implementation.errorChecking) {
|
jtulach@678
|
3112 |
// throw Exception if arg was not created by this Document
|
jtulach@678
|
3113 |
if (this.ownerDocument != arg.ownerDocument) {
|
jtulach@678
|
3114 |
throw(new DOMException(DOMException.WRONG_DOCUMENT_ERR));
|
jtulach@678
|
3115 |
}
|
jtulach@678
|
3116 |
|
jtulach@678
|
3117 |
// throw Exception if DOMNamedNodeMap is readonly
|
jtulach@678
|
3118 |
if (this._readonly || (this.parentNode && this.parentNode._readonly)) {
|
jtulach@678
|
3119 |
throw(new DOMException(DOMException.NO_MODIFICATION_ALLOWED_ERR));
|
jtulach@678
|
3120 |
}
|
jtulach@678
|
3121 |
|
jtulach@678
|
3122 |
// throw Exception if arg is already an attribute of another Element object
|
jtulach@678
|
3123 |
if (arg.ownerElement && (arg.ownerElement != this.parentNode)) {
|
jtulach@678
|
3124 |
throw(new DOMException(DOMException.INUSE_ATTRIBUTE_ERR));
|
jtulach@678
|
3125 |
}
|
jtulach@678
|
3126 |
}
|
jtulach@678
|
3127 |
|
jtulach@678
|
3128 |
//console.log('setNamedItem __findNamedItemIndex__ ');
|
jtulach@678
|
3129 |
// get item index
|
jtulach@678
|
3130 |
var itemIndex = __findNamedItemIndex__(this, arg.name);
|
jtulach@678
|
3131 |
var ret = null;
|
jtulach@678
|
3132 |
|
jtulach@678
|
3133 |
//console.log('setNamedItem __findNamedItemIndex__ %s', itemIndex);
|
jtulach@678
|
3134 |
if (itemIndex > -1) { // found it!
|
jtulach@678
|
3135 |
ret = this[itemIndex]; // use existing Attribute
|
jtulach@678
|
3136 |
|
jtulach@678
|
3137 |
// throw Exception if DOMAttr is readonly
|
jtulach@678
|
3138 |
if (__ownerDocument__(this).implementation.errorChecking && ret._readonly) {
|
jtulach@678
|
3139 |
throw(new DOMException(DOMException.NO_MODIFICATION_ALLOWED_ERR));
|
jtulach@678
|
3140 |
} else {
|
jtulach@678
|
3141 |
this[itemIndex] = arg; // over-write existing NamedNode
|
jtulach@678
|
3142 |
this[arg.name.toLowerCase()] = arg;
|
jtulach@678
|
3143 |
}
|
jtulach@678
|
3144 |
} else {
|
jtulach@678
|
3145 |
// add new NamedNode
|
jtulach@678
|
3146 |
//console.log('setNamedItem add new named node map (by index)');
|
jtulach@678
|
3147 |
Array.prototype.push.apply(this, [arg]);
|
jtulach@678
|
3148 |
//console.log('setNamedItem add new named node map (by name) %s %s', arg, arg.name);
|
jtulach@678
|
3149 |
this[arg.name] = arg;
|
jtulach@678
|
3150 |
//console.log('finsished setNamedItem add new named node map (by name) %s', arg.name);
|
jtulach@678
|
3151 |
|
jtulach@678
|
3152 |
}
|
jtulach@678
|
3153 |
|
jtulach@678
|
3154 |
//console.log('setNamedItem parentNode');
|
jtulach@678
|
3155 |
arg.ownerElement = this.parentNode; // update ownerElement
|
jtulach@678
|
3156 |
// return old node or new node
|
jtulach@678
|
3157 |
//console.log('setNamedItem exit');
|
jtulach@678
|
3158 |
return ret;
|
jtulach@678
|
3159 |
},
|
jtulach@678
|
3160 |
removeNamedItem : function(name) {
|
jtulach@678
|
3161 |
var ret = null;
|
jtulach@678
|
3162 |
// test for exceptions
|
jtulach@678
|
3163 |
// throw Exception if NamedNodeMap is readonly
|
jtulach@678
|
3164 |
if (__ownerDocument__(this).implementation.errorChecking &&
|
jtulach@678
|
3165 |
(this._readonly || (this.parentNode && this.parentNode._readonly))) {
|
jtulach@678
|
3166 |
throw(new DOMException(DOMException.NO_MODIFICATION_ALLOWED_ERR));
|
jtulach@678
|
3167 |
}
|
jtulach@678
|
3168 |
|
jtulach@678
|
3169 |
// get item index
|
jtulach@678
|
3170 |
var itemIndex = __findNamedItemIndex__(this, name);
|
jtulach@678
|
3171 |
|
jtulach@678
|
3172 |
// throw Exception if there is no node named name in this map
|
jtulach@678
|
3173 |
if (__ownerDocument__(this).implementation.errorChecking && (itemIndex < 0)) {
|
jtulach@678
|
3174 |
throw(new DOMException(DOMException.NOT_FOUND_ERR));
|
jtulach@678
|
3175 |
}
|
jtulach@678
|
3176 |
|
jtulach@678
|
3177 |
// get Node
|
jtulach@678
|
3178 |
var oldNode = this[itemIndex];
|
jtulach@678
|
3179 |
//this[oldNode.name] = undefined;
|
jtulach@678
|
3180 |
|
jtulach@678
|
3181 |
// throw Exception if Node is readonly
|
jtulach@678
|
3182 |
if (__ownerDocument__(this).implementation.errorChecking && oldNode._readonly) {
|
jtulach@678
|
3183 |
throw(new DOMException(DOMException.NO_MODIFICATION_ALLOWED_ERR));
|
jtulach@678
|
3184 |
}
|
jtulach@678
|
3185 |
|
jtulach@678
|
3186 |
// return removed node
|
jtulach@678
|
3187 |
return __removeChild__(this, itemIndex);
|
jtulach@678
|
3188 |
},
|
jtulach@678
|
3189 |
getNamedItemNS : function(namespaceURI, localName) {
|
jtulach@678
|
3190 |
var ret = null;
|
jtulach@678
|
3191 |
|
jtulach@678
|
3192 |
// test that Named Node exists
|
jtulach@678
|
3193 |
var itemIndex = __findNamedItemNSIndex__(this, namespaceURI, localName);
|
jtulach@678
|
3194 |
|
jtulach@678
|
3195 |
if (itemIndex > -1) {
|
jtulach@678
|
3196 |
// found it! return NamedNode
|
jtulach@678
|
3197 |
ret = this[itemIndex];
|
jtulach@678
|
3198 |
}
|
jtulach@678
|
3199 |
// if node is not found, default value null is returned
|
jtulach@678
|
3200 |
return ret;
|
jtulach@678
|
3201 |
},
|
jtulach@678
|
3202 |
setNamedItemNS : function(arg) {
|
jtulach@678
|
3203 |
//console.log('setNamedItemNS %s', arg);
|
jtulach@678
|
3204 |
// test for exceptions
|
jtulach@678
|
3205 |
if (__ownerDocument__(this).implementation.errorChecking) {
|
jtulach@678
|
3206 |
// throw Exception if NamedNodeMap is readonly
|
jtulach@678
|
3207 |
if (this._readonly || (this.parentNode && this.parentNode._readonly)) {
|
jtulach@678
|
3208 |
throw(new DOMException(DOMException.NO_MODIFICATION_ALLOWED_ERR));
|
jtulach@678
|
3209 |
}
|
jtulach@678
|
3210 |
|
jtulach@678
|
3211 |
// throw Exception if arg was not created by this Document
|
jtulach@678
|
3212 |
if (__ownerDocument__(this) != __ownerDocument__(arg)) {
|
jtulach@678
|
3213 |
throw(new DOMException(DOMException.WRONG_DOCUMENT_ERR));
|
jtulach@678
|
3214 |
}
|
jtulach@678
|
3215 |
|
jtulach@678
|
3216 |
// throw Exception if arg is already an attribute of another Element object
|
jtulach@678
|
3217 |
if (arg.ownerElement && (arg.ownerElement != this.parentNode)) {
|
jtulach@678
|
3218 |
throw(new DOMException(DOMException.INUSE_ATTRIBUTE_ERR));
|
jtulach@678
|
3219 |
}
|
jtulach@678
|
3220 |
}
|
jtulach@678
|
3221 |
|
jtulach@678
|
3222 |
// get item index
|
jtulach@678
|
3223 |
var itemIndex = __findNamedItemNSIndex__(this, arg.namespaceURI, arg.localName);
|
jtulach@678
|
3224 |
var ret = null;
|
jtulach@678
|
3225 |
|
jtulach@678
|
3226 |
if (itemIndex > -1) {
|
jtulach@678
|
3227 |
// found it!
|
jtulach@678
|
3228 |
// use existing Attribute
|
jtulach@678
|
3229 |
ret = this[itemIndex];
|
jtulach@678
|
3230 |
// throw Exception if Attr is readonly
|
jtulach@678
|
3231 |
if (__ownerDocument__(this).implementation.errorChecking && ret._readonly) {
|
jtulach@678
|
3232 |
throw(new DOMException(DOMException.NO_MODIFICATION_ALLOWED_ERR));
|
jtulach@678
|
3233 |
} else {
|
jtulach@678
|
3234 |
// over-write existing NamedNode
|
jtulach@678
|
3235 |
this[itemIndex] = arg;
|
jtulach@678
|
3236 |
}
|
jtulach@678
|
3237 |
}else {
|
jtulach@678
|
3238 |
// add new NamedNode
|
jtulach@678
|
3239 |
Array.prototype.push.apply(this, [arg]);
|
jtulach@678
|
3240 |
}
|
jtulach@678
|
3241 |
arg.ownerElement = this.parentNode;
|
jtulach@678
|
3242 |
|
jtulach@678
|
3243 |
// return old node or null
|
jtulach@678
|
3244 |
return ret;
|
jtulach@678
|
3245 |
//console.log('finished setNamedItemNS %s', arg);
|
jtulach@678
|
3246 |
},
|
jtulach@678
|
3247 |
removeNamedItemNS : function(namespaceURI, localName) {
|
jtulach@678
|
3248 |
var ret = null;
|
jtulach@678
|
3249 |
|
jtulach@678
|
3250 |
// test for exceptions
|
jtulach@678
|
3251 |
// throw Exception if NamedNodeMap is readonly
|
jtulach@678
|
3252 |
if (__ownerDocument__(this).implementation.errorChecking && (this._readonly || (this.parentNode && this.parentNode._readonly))) {
|
jtulach@678
|
3253 |
throw(new DOMException(DOMException.NO_MODIFICATION_ALLOWED_ERR));
|
jtulach@678
|
3254 |
}
|
jtulach@678
|
3255 |
|
jtulach@678
|
3256 |
// get item index
|
jtulach@678
|
3257 |
var itemIndex = __findNamedItemNSIndex__(this, namespaceURI, localName);
|
jtulach@678
|
3258 |
|
jtulach@678
|
3259 |
// throw Exception if there is no matching node in this map
|
jtulach@678
|
3260 |
if (__ownerDocument__(this).implementation.errorChecking && (itemIndex < 0)) {
|
jtulach@678
|
3261 |
throw(new DOMException(DOMException.NOT_FOUND_ERR));
|
jtulach@678
|
3262 |
}
|
jtulach@678
|
3263 |
|
jtulach@678
|
3264 |
// get Node
|
jtulach@678
|
3265 |
var oldNode = this[itemIndex];
|
jtulach@678
|
3266 |
|
jtulach@678
|
3267 |
// throw Exception if Node is readonly
|
jtulach@678
|
3268 |
if (__ownerDocument__(this).implementation.errorChecking && oldNode._readonly) {
|
jtulach@678
|
3269 |
throw(new DOMException(DOMException.NO_MODIFICATION_ALLOWED_ERR));
|
jtulach@678
|
3270 |
}
|
jtulach@678
|
3271 |
|
jtulach@678
|
3272 |
return __removeChild__(this, itemIndex); // return removed node
|
jtulach@678
|
3273 |
},
|
jtulach@678
|
3274 |
get xml() {
|
jtulach@678
|
3275 |
var ret = "";
|
jtulach@678
|
3276 |
|
jtulach@678
|
3277 |
// create string containing concatenation of all (but last) Attribute string values (separated by spaces)
|
jtulach@678
|
3278 |
for (var i=0; i < this.length -1; i++) {
|
jtulach@678
|
3279 |
ret += this[i].xml +" ";
|
jtulach@678
|
3280 |
}
|
jtulach@678
|
3281 |
|
jtulach@678
|
3282 |
// add last Attribute to string (without trailing space)
|
jtulach@678
|
3283 |
if (this.length > 0) {
|
jtulach@678
|
3284 |
ret += this[this.length -1].xml;
|
jtulach@678
|
3285 |
}
|
jtulach@678
|
3286 |
|
jtulach@678
|
3287 |
return ret;
|
jtulach@678
|
3288 |
},
|
jtulach@678
|
3289 |
toString : function(){
|
jtulach@678
|
3290 |
return "[object NamedNodeMap]";
|
jtulach@678
|
3291 |
}
|
jtulach@678
|
3292 |
|
jtulach@678
|
3293 |
});
|
jtulach@678
|
3294 |
|
jtulach@678
|
3295 |
/**
|
jtulach@678
|
3296 |
* @method __findNamedItemIndex__
|
jtulach@678
|
3297 |
* find the item index of the node with the specified name
|
jtulach@678
|
3298 |
*
|
jtulach@678
|
3299 |
* @param name : string - the name of the required node
|
jtulach@678
|
3300 |
* @param isnsmap : if its a NamespaceNodeMap
|
jtulach@678
|
3301 |
* @return : int
|
jtulach@678
|
3302 |
*/
|
jtulach@678
|
3303 |
var __findNamedItemIndex__ = function(namednodemap, name, isnsmap) {
|
jtulach@678
|
3304 |
var ret = -1;
|
jtulach@678
|
3305 |
// loop through all nodes
|
jtulach@678
|
3306 |
for (var i=0; i<namednodemap.length; i++) {
|
jtulach@678
|
3307 |
// compare name to each node's nodeName
|
jtulach@678
|
3308 |
if(namednodemap[i].localName && name && isnsmap){
|
jtulach@678
|
3309 |
if (namednodemap[i].localName.toLowerCase() == name.toLowerCase()) {
|
jtulach@678
|
3310 |
// found it!
|
jtulach@678
|
3311 |
ret = i;
|
jtulach@678
|
3312 |
break;
|
jtulach@678
|
3313 |
}
|
jtulach@678
|
3314 |
}else{
|
jtulach@678
|
3315 |
if(namednodemap[i].name && name){
|
jtulach@678
|
3316 |
if (namednodemap[i].name.toLowerCase() == name.toLowerCase()) {
|
jtulach@678
|
3317 |
// found it!
|
jtulach@678
|
3318 |
ret = i;
|
jtulach@678
|
3319 |
break;
|
jtulach@678
|
3320 |
}
|
jtulach@678
|
3321 |
}
|
jtulach@678
|
3322 |
}
|
jtulach@678
|
3323 |
}
|
jtulach@678
|
3324 |
// if node is not found, default value -1 is returned
|
jtulach@678
|
3325 |
return ret;
|
jtulach@678
|
3326 |
};
|
jtulach@678
|
3327 |
|
jtulach@678
|
3328 |
/**
|
jtulach@678
|
3329 |
* @method __findNamedItemNSIndex__
|
jtulach@678
|
3330 |
* find the item index of the node with the specified
|
jtulach@678
|
3331 |
* namespaceURI and localName
|
jtulach@678
|
3332 |
*
|
jtulach@678
|
3333 |
* @param namespaceURI : string - the namespace URI of the required node
|
jtulach@678
|
3334 |
* @param localName : string - the local name of the required node
|
jtulach@678
|
3335 |
* @return : int
|
jtulach@678
|
3336 |
*/
|
jtulach@678
|
3337 |
var __findNamedItemNSIndex__ = function(namednodemap, namespaceURI, localName) {
|
jtulach@678
|
3338 |
var ret = -1;
|
jtulach@678
|
3339 |
// test that localName is not null
|
jtulach@678
|
3340 |
if (localName) {
|
jtulach@678
|
3341 |
// loop through all nodes
|
jtulach@678
|
3342 |
for (var i=0; i<namednodemap.length; i++) {
|
jtulach@678
|
3343 |
if(namednodemap[i].namespaceURI && namednodemap[i].localName){
|
jtulach@678
|
3344 |
// compare name to each node's namespaceURI and localName
|
jtulach@678
|
3345 |
if ((namednodemap[i].namespaceURI.toLowerCase() == namespaceURI.toLowerCase()) &&
|
jtulach@678
|
3346 |
(namednodemap[i].localName.toLowerCase() == localName.toLowerCase())) {
|
jtulach@678
|
3347 |
// found it!
|
jtulach@678
|
3348 |
ret = i;
|
jtulach@678
|
3349 |
break;
|
jtulach@678
|
3350 |
}
|
jtulach@678
|
3351 |
}
|
jtulach@678
|
3352 |
}
|
jtulach@678
|
3353 |
}
|
jtulach@678
|
3354 |
// if node is not found, default value -1 is returned
|
jtulach@678
|
3355 |
return ret;
|
jtulach@678
|
3356 |
};
|
jtulach@678
|
3357 |
|
jtulach@678
|
3358 |
/**
|
jtulach@678
|
3359 |
* @method __hasAttribute__
|
jtulach@678
|
3360 |
* Returns true if specified node exists
|
jtulach@678
|
3361 |
*
|
jtulach@678
|
3362 |
* @param name : string - the name of the required node
|
jtulach@678
|
3363 |
* @return : boolean
|
jtulach@678
|
3364 |
*/
|
jtulach@678
|
3365 |
var __hasAttribute__ = function(namednodemap, name) {
|
jtulach@678
|
3366 |
var ret = false;
|
jtulach@678
|
3367 |
// test that Named Node exists
|
jtulach@678
|
3368 |
var itemIndex = __findNamedItemIndex__(namednodemap, name);
|
jtulach@678
|
3369 |
if (itemIndex > -1) {
|
jtulach@678
|
3370 |
// found it!
|
jtulach@678
|
3371 |
ret = true;
|
jtulach@678
|
3372 |
}
|
jtulach@678
|
3373 |
// if node is not found, default value false is returned
|
jtulach@678
|
3374 |
return ret;
|
jtulach@678
|
3375 |
}
|
jtulach@678
|
3376 |
|
jtulach@678
|
3377 |
/**
|
jtulach@678
|
3378 |
* @method __hasAttributeNS__
|
jtulach@678
|
3379 |
* Returns true if specified node exists
|
jtulach@678
|
3380 |
*
|
jtulach@678
|
3381 |
* @param namespaceURI : string - the namespace URI of the required node
|
jtulach@678
|
3382 |
* @param localName : string - the local name of the required node
|
jtulach@678
|
3383 |
* @return : boolean
|
jtulach@678
|
3384 |
*/
|
jtulach@678
|
3385 |
var __hasAttributeNS__ = function(namednodemap, namespaceURI, localName) {
|
jtulach@678
|
3386 |
var ret = false;
|
jtulach@678
|
3387 |
// test that Named Node exists
|
jtulach@678
|
3388 |
var itemIndex = __findNamedItemNSIndex__(namednodemap, namespaceURI, localName);
|
jtulach@678
|
3389 |
if (itemIndex > -1) {
|
jtulach@678
|
3390 |
// found it!
|
jtulach@678
|
3391 |
ret = true;
|
jtulach@678
|
3392 |
}
|
jtulach@678
|
3393 |
// if node is not found, default value false is returned
|
jtulach@678
|
3394 |
return ret;
|
jtulach@678
|
3395 |
}
|
jtulach@678
|
3396 |
|
jtulach@678
|
3397 |
/**
|
jtulach@678
|
3398 |
* @method __cloneNamedNodes__
|
jtulach@678
|
3399 |
* Returns a NamedNodeMap containing clones of the Nodes in this NamedNodeMap
|
jtulach@678
|
3400 |
*
|
jtulach@678
|
3401 |
* @param parentNode : Node - the new parent of the cloned NodeList
|
jtulach@678
|
3402 |
* @param isnsmap : bool - is this a NamespaceNodeMap
|
jtulach@678
|
3403 |
* @return NamedNodeMap containing clones of the Nodes in this NamedNodeMap
|
jtulach@678
|
3404 |
*/
|
jtulach@678
|
3405 |
var __cloneNamedNodes__ = function(namednodemap, parentNode, isnsmap) {
|
jtulach@678
|
3406 |
var cloneNamedNodeMap = isnsmap?
|
jtulach@678
|
3407 |
new NamespaceNodeMap(namednodemap.ownerDocument, parentNode):
|
jtulach@678
|
3408 |
new NamedNodeMap(namednodemap.ownerDocument, parentNode);
|
jtulach@678
|
3409 |
|
jtulach@678
|
3410 |
// create list containing clones of all children
|
jtulach@678
|
3411 |
for (var i=0; i < namednodemap.length; i++) {
|
jtulach@678
|
3412 |
__appendChild__(cloneNamedNodeMap, namednodemap[i].cloneNode(false));
|
jtulach@678
|
3413 |
}
|
jtulach@678
|
3414 |
|
jtulach@678
|
3415 |
return cloneNamedNodeMap;
|
jtulach@678
|
3416 |
};
|
jtulach@678
|
3417 |
|
jtulach@678
|
3418 |
|
jtulach@678
|
3419 |
/**
|
jtulach@678
|
3420 |
* @class NamespaceNodeMap -
|
jtulach@678
|
3421 |
* used to represent collections of namespace nodes that can be
|
jtulach@678
|
3422 |
* accessed by name typically a set of Element attributes
|
jtulach@678
|
3423 |
*
|
jtulach@678
|
3424 |
* @extends NamedNodeMap
|
jtulach@678
|
3425 |
*
|
jtulach@678
|
3426 |
* @param ownerDocument : Document - the ownerDocument
|
jtulach@678
|
3427 |
* @param parentNode : Node - the node that the NamespaceNodeMap is attached to (or null)
|
jtulach@678
|
3428 |
*/
|
jtulach@678
|
3429 |
var NamespaceNodeMap = function(ownerDocument, parentNode) {
|
jtulach@678
|
3430 |
this.NamedNodeMap = NamedNodeMap;
|
jtulach@678
|
3431 |
this.NamedNodeMap(ownerDocument, parentNode);
|
jtulach@678
|
3432 |
__setArray__(this, []);
|
jtulach@678
|
3433 |
};
|
jtulach@678
|
3434 |
NamespaceNodeMap.prototype = new NamedNodeMap();
|
jtulach@678
|
3435 |
__extend__(NamespaceNodeMap.prototype, {
|
jtulach@678
|
3436 |
get xml() {
|
jtulach@678
|
3437 |
var ret = "",
|
jtulach@678
|
3438 |
ns,
|
jtulach@678
|
3439 |
ind;
|
jtulach@678
|
3440 |
// identify namespaces declared local to this Element (ie, not inherited)
|
jtulach@678
|
3441 |
for (ind = 0; ind < this.length; ind++) {
|
jtulach@678
|
3442 |
// if namespace declaration does not exist in the containing node's, parentNode's namespaces
|
jtulach@678
|
3443 |
ns = null;
|
jtulach@678
|
3444 |
try {
|
jtulach@678
|
3445 |
var ns = this.parentNode.parentNode._namespaces.
|
jtulach@678
|
3446 |
getNamedItem(this[ind].localName);
|
jtulach@678
|
3447 |
}catch (e) {
|
jtulach@678
|
3448 |
//breaking to prevent default namespace being inserted into return value
|
jtulach@678
|
3449 |
break;
|
jtulach@678
|
3450 |
}
|
jtulach@678
|
3451 |
if (!(ns && (""+ ns.nodeValue == ""+ this[ind].nodeValue))) {
|
jtulach@678
|
3452 |
// display the namespace declaration
|
jtulach@678
|
3453 |
ret += this[ind].xml +" ";
|
jtulach@678
|
3454 |
}
|
jtulach@678
|
3455 |
}
|
jtulach@678
|
3456 |
return ret;
|
jtulach@678
|
3457 |
}
|
jtulach@678
|
3458 |
});
|
jtulach@678
|
3459 |
|
jtulach@678
|
3460 |
/**
|
jtulach@678
|
3461 |
* @class Namespace -
|
jtulach@678
|
3462 |
* The Namespace interface represents an namespace in an Element object
|
jtulach@678
|
3463 |
*
|
jtulach@678
|
3464 |
* @param ownerDocument : The Document object associated with this node.
|
jtulach@678
|
3465 |
*/
|
jtulach@678
|
3466 |
Namespace = function(ownerDocument) {
|
jtulach@678
|
3467 |
Node.apply(this, arguments);
|
jtulach@678
|
3468 |
// the name of this attribute
|
jtulach@678
|
3469 |
this.name = "";
|
jtulach@678
|
3470 |
|
jtulach@678
|
3471 |
// If this attribute was explicitly given a value in the original document,
|
jtulach@678
|
3472 |
// this is true; otherwise, it is false.
|
jtulach@678
|
3473 |
// Note that the implementation is in charge of this attribute, not the user.
|
jtulach@678
|
3474 |
// If the user changes the value of the attribute (even if it ends up having
|
jtulach@678
|
3475 |
// the same value as the default value) then the specified flag is
|
jtulach@678
|
3476 |
// automatically flipped to true
|
jtulach@678
|
3477 |
this.specified = false;
|
jtulach@678
|
3478 |
};
|
jtulach@678
|
3479 |
Namespace.prototype = new Node();
|
jtulach@678
|
3480 |
__extend__(Namespace.prototype, {
|
jtulach@678
|
3481 |
get value(){
|
jtulach@678
|
3482 |
// the value of the attribute is returned as a string
|
jtulach@678
|
3483 |
return this.nodeValue;
|
jtulach@678
|
3484 |
},
|
jtulach@678
|
3485 |
set value(value){
|
jtulach@678
|
3486 |
this.nodeValue = value+'';
|
jtulach@678
|
3487 |
},
|
jtulach@678
|
3488 |
get nodeType(){
|
jtulach@678
|
3489 |
return Node.NAMESPACE_NODE;
|
jtulach@678
|
3490 |
},
|
jtulach@678
|
3491 |
get xml(){
|
jtulach@678
|
3492 |
var ret = "";
|
jtulach@678
|
3493 |
|
jtulach@678
|
3494 |
// serialize Namespace Declaration
|
jtulach@678
|
3495 |
if (this.nodeName != "") {
|
jtulach@678
|
3496 |
ret += this.nodeName +"=\""+ __escapeXML__(this.nodeValue) +"\"";
|
jtulach@678
|
3497 |
}
|
jtulach@678
|
3498 |
else { // handle default namespace
|
jtulach@678
|
3499 |
ret += "xmlns=\""+ __escapeXML__(this.nodeValue) +"\"";
|
jtulach@678
|
3500 |
}
|
jtulach@678
|
3501 |
|
jtulach@678
|
3502 |
return ret;
|
jtulach@678
|
3503 |
},
|
jtulach@678
|
3504 |
toString: function(){
|
jtulach@678
|
3505 |
return '[object Namespace]';
|
jtulach@678
|
3506 |
}
|
jtulach@678
|
3507 |
});
|
jtulach@678
|
3508 |
|
jtulach@678
|
3509 |
|
jtulach@678
|
3510 |
/**
|
jtulach@678
|
3511 |
* @class CharacterData - parent abstract class for Text and Comment
|
jtulach@678
|
3512 |
* @extends Node
|
jtulach@678
|
3513 |
* @param ownerDocument : The Document object associated with this node.
|
jtulach@678
|
3514 |
*/
|
jtulach@678
|
3515 |
CharacterData = function(ownerDocument) {
|
jtulach@678
|
3516 |
Node.apply(this, arguments);
|
jtulach@678
|
3517 |
};
|
jtulach@678
|
3518 |
CharacterData.prototype = new Node();
|
jtulach@678
|
3519 |
__extend__(CharacterData.prototype,{
|
jtulach@678
|
3520 |
get data(){
|
jtulach@678
|
3521 |
return this.nodeValue;
|
jtulach@678
|
3522 |
},
|
jtulach@678
|
3523 |
set data(data){
|
jtulach@678
|
3524 |
this.nodeValue = data;
|
jtulach@678
|
3525 |
},
|
jtulach@678
|
3526 |
get textContent(){
|
jtulach@678
|
3527 |
return this.nodeValue;
|
jtulach@678
|
3528 |
},
|
jtulach@678
|
3529 |
set textContent(newText){
|
jtulach@678
|
3530 |
this.nodeValue = newText;
|
jtulach@678
|
3531 |
},
|
jtulach@678
|
3532 |
get length(){return this.nodeValue.length;},
|
jtulach@678
|
3533 |
appendData: function(arg){
|
jtulach@678
|
3534 |
// throw Exception if CharacterData is readonly
|
jtulach@678
|
3535 |
if (__ownerDocument__(this).implementation.errorChecking && this._readonly) {
|
jtulach@678
|
3536 |
throw(new DOMException(DOMException.NO_MODIFICATION_ALLOWED_ERR));
|
jtulach@678
|
3537 |
}
|
jtulach@678
|
3538 |
// append data
|
jtulach@678
|
3539 |
this.data = "" + this.data + arg;
|
jtulach@678
|
3540 |
},
|
jtulach@678
|
3541 |
deleteData: function(offset, count){
|
jtulach@678
|
3542 |
// throw Exception if CharacterData is readonly
|
jtulach@678
|
3543 |
if (__ownerDocument__(this).implementation.errorChecking && this._readonly) {
|
jtulach@678
|
3544 |
throw(new DOMException(DOMException.NO_MODIFICATION_ALLOWED_ERR));
|
jtulach@678
|
3545 |
}
|
jtulach@678
|
3546 |
if (this.data) {
|
jtulach@678
|
3547 |
// throw Exception if offset is negative or greater than the data length,
|
jtulach@678
|
3548 |
if (__ownerDocument__(this).implementation.errorChecking &&
|
jtulach@678
|
3549 |
((offset < 0) || (offset > this.data.length) || (count < 0))) {
|
jtulach@678
|
3550 |
throw(new DOMException(DOMException.INDEX_SIZE_ERR));
|
jtulach@678
|
3551 |
}
|
jtulach@678
|
3552 |
|
jtulach@678
|
3553 |
// delete data
|
jtulach@678
|
3554 |
if(!count || (offset + count) > this.data.length) {
|
jtulach@678
|
3555 |
this.data = this.data.substring(0, offset);
|
jtulach@678
|
3556 |
}else {
|
jtulach@678
|
3557 |
this.data = this.data.substring(0, offset).
|
jtulach@678
|
3558 |
concat(this.data.substring(offset + count));
|
jtulach@678
|
3559 |
}
|
jtulach@678
|
3560 |
}
|
jtulach@678
|
3561 |
},
|
jtulach@678
|
3562 |
insertData: function(offset, arg){
|
jtulach@678
|
3563 |
// throw Exception if CharacterData is readonly
|
jtulach@678
|
3564 |
if(__ownerDocument__(this).implementation.errorChecking && this._readonly){
|
jtulach@678
|
3565 |
throw(new DOMException(DOMException.NO_MODIFICATION_ALLOWED_ERR));
|
jtulach@678
|
3566 |
}
|
jtulach@678
|
3567 |
|
jtulach@678
|
3568 |
if(this.data){
|
jtulach@678
|
3569 |
// throw Exception if offset is negative or greater than the data length,
|
jtulach@678
|
3570 |
if (__ownerDocument__(this).implementation.errorChecking &&
|
jtulach@678
|
3571 |
((offset < 0) || (offset > this.data.length))) {
|
jtulach@678
|
3572 |
throw(new DOMException(DOMException.INDEX_SIZE_ERR));
|
jtulach@678
|
3573 |
}
|
jtulach@678
|
3574 |
|
jtulach@678
|
3575 |
// insert data
|
jtulach@678
|
3576 |
this.data = this.data.substring(0, offset).concat(arg, this.data.substring(offset));
|
jtulach@678
|
3577 |
}else {
|
jtulach@678
|
3578 |
// throw Exception if offset is negative or greater than the data length,
|
jtulach@678
|
3579 |
if (__ownerDocument__(this).implementation.errorChecking && (offset !== 0)) {
|
jtulach@678
|
3580 |
throw(new DOMException(DOMException.INDEX_SIZE_ERR));
|
jtulach@678
|
3581 |
}
|
jtulach@678
|
3582 |
|
jtulach@678
|
3583 |
// set data
|
jtulach@678
|
3584 |
this.data = arg;
|
jtulach@678
|
3585 |
}
|
jtulach@678
|
3586 |
},
|
jtulach@678
|
3587 |
replaceData: function(offset, count, arg){
|
jtulach@678
|
3588 |
// throw Exception if CharacterData is readonly
|
jtulach@678
|
3589 |
if (__ownerDocument__(this).implementation.errorChecking && this._readonly) {
|
jtulach@678
|
3590 |
throw(new DOMException(DOMException.NO_MODIFICATION_ALLOWED_ERR));
|
jtulach@678
|
3591 |
}
|
jtulach@678
|
3592 |
|
jtulach@678
|
3593 |
if (this.data) {
|
jtulach@678
|
3594 |
// throw Exception if offset is negative or greater than the data length,
|
jtulach@678
|
3595 |
if (__ownerDocument__(this).implementation.errorChecking &&
|
jtulach@678
|
3596 |
((offset < 0) || (offset > this.data.length) || (count < 0))) {
|
jtulach@678
|
3597 |
throw(new DOMException(DOMException.INDEX_SIZE_ERR));
|
jtulach@678
|
3598 |
}
|
jtulach@678
|
3599 |
|
jtulach@678
|
3600 |
// replace data
|
jtulach@678
|
3601 |
this.data = this.data.substring(0, offset).
|
jtulach@678
|
3602 |
concat(arg, this.data.substring(offset + count));
|
jtulach@678
|
3603 |
}else {
|
jtulach@678
|
3604 |
// set data
|
jtulach@678
|
3605 |
this.data = arg;
|
jtulach@678
|
3606 |
}
|
jtulach@678
|
3607 |
},
|
jtulach@678
|
3608 |
substringData: function(offset, count){
|
jtulach@678
|
3609 |
var ret = null;
|
jtulach@678
|
3610 |
if (this.data) {
|
jtulach@678
|
3611 |
// throw Exception if offset is negative or greater than the data length,
|
jtulach@678
|
3612 |
// or the count is negative
|
jtulach@678
|
3613 |
if (__ownerDocument__(this).implementation.errorChecking &&
|
jtulach@678
|
3614 |
((offset < 0) || (offset > this.data.length) || (count < 0))) {
|
jtulach@678
|
3615 |
throw(new DOMException(DOMException.INDEX_SIZE_ERR));
|
jtulach@678
|
3616 |
}
|
jtulach@678
|
3617 |
// if count is not specified
|
jtulach@678
|
3618 |
if (!count) {
|
jtulach@678
|
3619 |
ret = this.data.substring(offset); // default to 'end of string'
|
jtulach@678
|
3620 |
}else{
|
jtulach@678
|
3621 |
ret = this.data.substring(offset, offset + count);
|
jtulach@678
|
3622 |
}
|
jtulach@678
|
3623 |
}
|
jtulach@678
|
3624 |
return ret;
|
jtulach@678
|
3625 |
},
|
jtulach@678
|
3626 |
toString : function(){
|
jtulach@678
|
3627 |
return "[object CharacterData]";
|
jtulach@678
|
3628 |
}
|
jtulach@678
|
3629 |
});
|
jtulach@678
|
3630 |
|
jtulach@678
|
3631 |
/**
|
jtulach@678
|
3632 |
* @class Text
|
jtulach@678
|
3633 |
* The Text interface represents the textual content (termed
|
jtulach@678
|
3634 |
* character data in XML) of an Element or Attr.
|
jtulach@678
|
3635 |
* If there is no markup inside an element's content, the text is
|
jtulach@678
|
3636 |
* contained in a single object implementing the Text interface that
|
jtulach@678
|
3637 |
* is the only child of the element. If there is markup, it is
|
jtulach@678
|
3638 |
* parsed into a list of elements and Text nodes that form the
|
jtulach@678
|
3639 |
* list of children of the element.
|
jtulach@678
|
3640 |
* @extends CharacterData
|
jtulach@678
|
3641 |
* @param ownerDocument The Document object associated with this node.
|
jtulach@678
|
3642 |
*/
|
jtulach@678
|
3643 |
Text = function(ownerDocument) {
|
jtulach@678
|
3644 |
CharacterData.apply(this, arguments);
|
jtulach@678
|
3645 |
this.nodeName = "#text";
|
jtulach@678
|
3646 |
};
|
jtulach@678
|
3647 |
Text.prototype = new CharacterData();
|
jtulach@678
|
3648 |
__extend__(Text.prototype,{
|
jtulach@678
|
3649 |
get localName(){
|
jtulach@678
|
3650 |
return null;
|
jtulach@678
|
3651 |
},
|
jtulach@678
|
3652 |
// Breaks this Text node into two Text nodes at the specified offset,
|
jtulach@678
|
3653 |
// keeping both in the tree as siblings. This node then only contains
|
jtulach@678
|
3654 |
// all the content up to the offset point. And a new Text node, which
|
jtulach@678
|
3655 |
// is inserted as the next sibling of this node, contains all the
|
jtulach@678
|
3656 |
// content at and after the offset point.
|
jtulach@678
|
3657 |
splitText : function(offset) {
|
jtulach@678
|
3658 |
var data,
|
jtulach@678
|
3659 |
inode;
|
jtulach@678
|
3660 |
// test for exceptions
|
jtulach@678
|
3661 |
if (__ownerDocument__(this).implementation.errorChecking) {
|
jtulach@678
|
3662 |
// throw Exception if Node is readonly
|
jtulach@678
|
3663 |
if (this._readonly) {
|
jtulach@678
|
3664 |
throw(new DOMException(DOMException.NO_MODIFICATION_ALLOWED_ERR));
|
jtulach@678
|
3665 |
}
|
jtulach@678
|
3666 |
// throw Exception if offset is negative or greater than the data length,
|
jtulach@678
|
3667 |
if ((offset < 0) || (offset > this.data.length)) {
|
jtulach@678
|
3668 |
throw(new DOMException(DOMException.INDEX_SIZE_ERR));
|
jtulach@678
|
3669 |
}
|
jtulach@678
|
3670 |
}
|
jtulach@678
|
3671 |
if (this.parentNode) {
|
jtulach@678
|
3672 |
// get remaining string (after offset)
|
jtulach@678
|
3673 |
data = this.substringData(offset);
|
jtulach@678
|
3674 |
// create new TextNode with remaining string
|
jtulach@678
|
3675 |
inode = __ownerDocument__(this).createTextNode(data);
|
jtulach@678
|
3676 |
// attach new TextNode
|
jtulach@678
|
3677 |
if (this.nextSibling) {
|
jtulach@678
|
3678 |
this.parentNode.insertBefore(inode, this.nextSibling);
|
jtulach@678
|
3679 |
} else {
|
jtulach@678
|
3680 |
this.parentNode.appendChild(inode);
|
jtulach@678
|
3681 |
}
|
jtulach@678
|
3682 |
// remove remaining string from original TextNode
|
jtulach@678
|
3683 |
this.deleteData(offset);
|
jtulach@678
|
3684 |
}
|
jtulach@678
|
3685 |
return inode;
|
jtulach@678
|
3686 |
},
|
jtulach@678
|
3687 |
get nodeType(){
|
jtulach@678
|
3688 |
return Node.TEXT_NODE;
|
jtulach@678
|
3689 |
},
|
jtulach@678
|
3690 |
get xml(){
|
jtulach@678
|
3691 |
return __escapeXML__(""+ this.nodeValue);
|
jtulach@678
|
3692 |
},
|
jtulach@678
|
3693 |
toString: function(){
|
jtulach@678
|
3694 |
return "[object Text]";
|
jtulach@678
|
3695 |
}
|
jtulach@678
|
3696 |
});
|
jtulach@678
|
3697 |
|
jtulach@678
|
3698 |
/**
|
jtulach@678
|
3699 |
* @class CDATASection
|
jtulach@678
|
3700 |
* CDATA sections are used to escape blocks of text containing
|
jtulach@678
|
3701 |
* characters that would otherwise be regarded as markup.
|
jtulach@678
|
3702 |
* The only delimiter that is recognized in a CDATA section is
|
jtulach@678
|
3703 |
* the "\]\]\>" string that ends the CDATA section
|
jtulach@678
|
3704 |
* @extends Text
|
jtulach@678
|
3705 |
* @param ownerDocument : The Document object associated with this node.
|
jtulach@678
|
3706 |
*/
|
jtulach@678
|
3707 |
CDATASection = function(ownerDocument) {
|
jtulach@678
|
3708 |
Text.apply(this, arguments);
|
jtulach@678
|
3709 |
this.nodeName = '#cdata-section';
|
jtulach@678
|
3710 |
};
|
jtulach@678
|
3711 |
CDATASection.prototype = new Text();
|
jtulach@678
|
3712 |
__extend__(CDATASection.prototype,{
|
jtulach@678
|
3713 |
get nodeType(){
|
jtulach@678
|
3714 |
return Node.CDATA_SECTION_NODE;
|
jtulach@678
|
3715 |
},
|
jtulach@678
|
3716 |
get xml(){
|
jtulach@678
|
3717 |
return "<![CDATA[" + this.nodeValue + "]]>";
|
jtulach@678
|
3718 |
},
|
jtulach@678
|
3719 |
toString : function(){
|
jtulach@678
|
3720 |
return "[object CDATASection]";
|
jtulach@678
|
3721 |
}
|
jtulach@678
|
3722 |
});
|
jtulach@678
|
3723 |
/**
|
jtulach@678
|
3724 |
* @class Comment
|
jtulach@678
|
3725 |
* This represents the content of a comment, i.e., all the
|
jtulach@678
|
3726 |
* characters between the starting '<!--' and ending '-->'
|
jtulach@678
|
3727 |
* @extends CharacterData
|
jtulach@678
|
3728 |
* @param ownerDocument : The Document object associated with this node.
|
jtulach@678
|
3729 |
*/
|
jtulach@678
|
3730 |
Comment = function(ownerDocument) {
|
jtulach@678
|
3731 |
CharacterData.apply(this, arguments);
|
jtulach@678
|
3732 |
this.nodeName = "#comment";
|
jtulach@678
|
3733 |
};
|
jtulach@678
|
3734 |
Comment.prototype = new CharacterData();
|
jtulach@678
|
3735 |
__extend__(Comment.prototype, {
|
jtulach@678
|
3736 |
get localName(){
|
jtulach@678
|
3737 |
return null;
|
jtulach@678
|
3738 |
},
|
jtulach@678
|
3739 |
get nodeType(){
|
jtulach@678
|
3740 |
return Node.COMMENT_NODE;
|
jtulach@678
|
3741 |
},
|
jtulach@678
|
3742 |
get xml(){
|
jtulach@678
|
3743 |
return "<!--" + this.nodeValue + "-->";
|
jtulach@678
|
3744 |
},
|
jtulach@678
|
3745 |
toString : function(){
|
jtulach@678
|
3746 |
return "[object Comment]";
|
jtulach@678
|
3747 |
}
|
jtulach@678
|
3748 |
});
|
jtulach@678
|
3749 |
|
jtulach@678
|
3750 |
|
jtulach@678
|
3751 |
/**
|
jtulach@678
|
3752 |
* @author envjs team
|
jtulach@678
|
3753 |
* @param {Document} onwnerDocument
|
jtulach@678
|
3754 |
*/
|
jtulach@678
|
3755 |
DocumentType = function(ownerDocument) {
|
jtulach@678
|
3756 |
Node.apply(this, arguments);
|
jtulach@678
|
3757 |
this.systemId = null;
|
jtulach@678
|
3758 |
this.publicId = null;
|
jtulach@678
|
3759 |
};
|
jtulach@678
|
3760 |
DocumentType.prototype = new Node();
|
jtulach@678
|
3761 |
__extend__({
|
jtulach@678
|
3762 |
get name(){
|
jtulach@678
|
3763 |
return this.nodeName;
|
jtulach@678
|
3764 |
},
|
jtulach@678
|
3765 |
get entities(){
|
jtulach@678
|
3766 |
return null;
|
jtulach@678
|
3767 |
},
|
jtulach@678
|
3768 |
get internalSubsets(){
|
jtulach@678
|
3769 |
return null;
|
jtulach@678
|
3770 |
},
|
jtulach@678
|
3771 |
get notations(){
|
jtulach@678
|
3772 |
return null;
|
jtulach@678
|
3773 |
},
|
jtulach@678
|
3774 |
toString : function(){
|
jtulach@678
|
3775 |
return "[object DocumentType]";
|
jtulach@678
|
3776 |
}
|
jtulach@678
|
3777 |
});
|
jtulach@678
|
3778 |
|
jtulach@678
|
3779 |
/**
|
jtulach@678
|
3780 |
* @class Attr
|
jtulach@678
|
3781 |
* The Attr interface represents an attribute in an Element object
|
jtulach@678
|
3782 |
* @extends Node
|
jtulach@678
|
3783 |
* @param ownerDocument : The Document object associated with this node.
|
jtulach@678
|
3784 |
*/
|
jtulach@678
|
3785 |
Attr = function(ownerDocument) {
|
jtulach@678
|
3786 |
Node.apply(this, arguments);
|
jtulach@678
|
3787 |
// set when Attr is added to NamedNodeMap
|
jtulach@678
|
3788 |
this.ownerElement = null;
|
jtulach@678
|
3789 |
//TODO: our implementation of Attr is incorrect because we don't
|
jtulach@678
|
3790 |
// treat the value of the attribute as a child text node.
|
jtulach@678
|
3791 |
};
|
jtulach@678
|
3792 |
Attr.prototype = new Node();
|
jtulach@678
|
3793 |
__extend__(Attr.prototype, {
|
jtulach@678
|
3794 |
// the name of this attribute
|
jtulach@678
|
3795 |
get name(){
|
jtulach@678
|
3796 |
return this.nodeName;
|
jtulach@678
|
3797 |
},
|
jtulach@678
|
3798 |
// the value of the attribute is returned as a string
|
jtulach@678
|
3799 |
get value(){
|
jtulach@678
|
3800 |
return this.nodeValue||'';
|
jtulach@678
|
3801 |
},
|
jtulach@678
|
3802 |
set value(value){
|
jtulach@678
|
3803 |
// throw Exception if Attribute is readonly
|
jtulach@678
|
3804 |
if (__ownerDocument__(this).implementation.errorChecking && this._readonly) {
|
jtulach@678
|
3805 |
throw(new DOMException(DOMException.NO_MODIFICATION_ALLOWED_ERR));
|
jtulach@678
|
3806 |
}
|
jtulach@678
|
3807 |
// delegate to node
|
jtulach@678
|
3808 |
this.nodeValue = value;
|
jtulach@678
|
3809 |
},
|
jtulach@678
|
3810 |
get textContent(){
|
jtulach@678
|
3811 |
return this.nodeValue;
|
jtulach@678
|
3812 |
},
|
jtulach@678
|
3813 |
set textContent(newText){
|
jtulach@678
|
3814 |
this.nodeValue = newText;
|
jtulach@678
|
3815 |
},
|
jtulach@678
|
3816 |
get specified(){
|
jtulach@678
|
3817 |
return (this !== null && this !== undefined);
|
jtulach@678
|
3818 |
},
|
jtulach@678
|
3819 |
get nodeType(){
|
jtulach@678
|
3820 |
return Node.ATTRIBUTE_NODE;
|
jtulach@678
|
3821 |
},
|
jtulach@678
|
3822 |
get xml() {
|
jtulach@678
|
3823 |
if (this.nodeValue) {
|
jtulach@678
|
3824 |
return __escapeXML__(this.nodeValue+"");
|
jtulach@678
|
3825 |
} else {
|
jtulach@678
|
3826 |
return '';
|
jtulach@678
|
3827 |
}
|
jtulach@678
|
3828 |
},
|
jtulach@678
|
3829 |
toString : function() {
|
jtulach@678
|
3830 |
return '[object Attr]';
|
jtulach@678
|
3831 |
}
|
jtulach@678
|
3832 |
});
|
jtulach@678
|
3833 |
|
jtulach@678
|
3834 |
|
jtulach@678
|
3835 |
/**
|
jtulach@678
|
3836 |
* @class Element -
|
jtulach@678
|
3837 |
* By far the vast majority of objects (apart from text)
|
jtulach@678
|
3838 |
* that authors encounter when traversing a document are
|
jtulach@678
|
3839 |
* Element nodes.
|
jtulach@678
|
3840 |
* @extends Node
|
jtulach@678
|
3841 |
* @param ownerDocument : The Document object associated with this node.
|
jtulach@678
|
3842 |
*/
|
jtulach@678
|
3843 |
Element = function(ownerDocument) {
|
jtulach@678
|
3844 |
Node.apply(this, arguments);
|
jtulach@678
|
3845 |
this.attributes = new NamedNodeMap(this.ownerDocument, this);
|
jtulach@678
|
3846 |
};
|
jtulach@678
|
3847 |
Element.prototype = new Node();
|
jtulach@678
|
3848 |
__extend__(Element.prototype, {
|
jtulach@678
|
3849 |
// The name of the element.
|
jtulach@678
|
3850 |
get tagName(){
|
jtulach@678
|
3851 |
return this.nodeName;
|
jtulach@678
|
3852 |
},
|
jtulach@678
|
3853 |
|
jtulach@678
|
3854 |
getAttribute: function(name) {
|
jtulach@678
|
3855 |
var ret = null;
|
jtulach@678
|
3856 |
// if attribute exists, use it
|
jtulach@678
|
3857 |
var attr = this.attributes.getNamedItem(name);
|
jtulach@678
|
3858 |
if (attr) {
|
jtulach@678
|
3859 |
ret = attr.value;
|
jtulach@678
|
3860 |
}
|
jtulach@678
|
3861 |
// if Attribute exists, return its value, otherwise, return null
|
jtulach@678
|
3862 |
return ret;
|
jtulach@678
|
3863 |
},
|
jtulach@678
|
3864 |
setAttribute : function (name, value) {
|
jtulach@678
|
3865 |
// if attribute exists, use it
|
jtulach@678
|
3866 |
var attr = this.attributes.getNamedItem(name);
|
jtulach@678
|
3867 |
//console.log('attr %s', attr);
|
jtulach@678
|
3868 |
//I had to add this check because as the script initializes
|
jtulach@678
|
3869 |
//the id may be set in the constructor, and the html element
|
jtulach@678
|
3870 |
//overrides the id property with a getter/setter.
|
jtulach@678
|
3871 |
if(__ownerDocument__(this)){
|
jtulach@678
|
3872 |
if (attr===null||attr===undefined) {
|
jtulach@678
|
3873 |
// otherwise create it
|
jtulach@678
|
3874 |
attr = __ownerDocument__(this).createAttribute(name);
|
jtulach@678
|
3875 |
//console.log('attr %s', attr);
|
jtulach@678
|
3876 |
}
|
jtulach@678
|
3877 |
|
jtulach@678
|
3878 |
|
jtulach@678
|
3879 |
// test for exceptions
|
jtulach@678
|
3880 |
if (__ownerDocument__(this).implementation.errorChecking) {
|
jtulach@678
|
3881 |
// throw Exception if Attribute is readonly
|
jtulach@678
|
3882 |
if (attr._readonly) {
|
jtulach@678
|
3883 |
throw(new DOMException(DOMException.NO_MODIFICATION_ALLOWED_ERR));
|
jtulach@678
|
3884 |
}
|
jtulach@678
|
3885 |
|
jtulach@678
|
3886 |
// throw Exception if the value string contains an illegal character
|
jtulach@678
|
3887 |
if (!__isValidString__(value+'')) {
|
jtulach@678
|
3888 |
throw(new DOMException(DOMException.INVALID_CHARACTER_ERR));
|
jtulach@678
|
3889 |
}
|
jtulach@678
|
3890 |
}
|
jtulach@678
|
3891 |
|
jtulach@678
|
3892 |
// assign values to properties (and aliases)
|
jtulach@678
|
3893 |
attr.value = value + '';
|
jtulach@678
|
3894 |
|
jtulach@678
|
3895 |
// add/replace Attribute in NamedNodeMap
|
jtulach@678
|
3896 |
this.attributes.setNamedItem(attr);
|
jtulach@678
|
3897 |
//console.log('element setNamedItem %s', attr);
|
jtulach@678
|
3898 |
}else{
|
jtulach@678
|
3899 |
console.warn('Element has no owner document '+this.tagName+
|
jtulach@678
|
3900 |
'\n\t cant set attribute ' + name + ' = '+value );
|
jtulach@678
|
3901 |
}
|
jtulach@678
|
3902 |
},
|
jtulach@678
|
3903 |
removeAttribute : function removeAttribute(name) {
|
jtulach@678
|
3904 |
// delegate to NamedNodeMap.removeNamedItem
|
jtulach@678
|
3905 |
return this.attributes.removeNamedItem(name);
|
jtulach@678
|
3906 |
},
|
jtulach@678
|
3907 |
getAttributeNode : function getAttributeNode(name) {
|
jtulach@678
|
3908 |
// delegate to NamedNodeMap.getNamedItem
|
jtulach@678
|
3909 |
return this.attributes.getNamedItem(name);
|
jtulach@678
|
3910 |
},
|
jtulach@678
|
3911 |
setAttributeNode: function(newAttr) {
|
jtulach@678
|
3912 |
// if this Attribute is an ID
|
jtulach@678
|
3913 |
if (__isIdDeclaration__(newAttr.name)) {
|
jtulach@678
|
3914 |
this.id = newAttr.value; // cache ID for getElementById()
|
jtulach@678
|
3915 |
}
|
jtulach@678
|
3916 |
// delegate to NamedNodeMap.setNamedItem
|
jtulach@678
|
3917 |
return this.attributes.setNamedItem(newAttr);
|
jtulach@678
|
3918 |
},
|
jtulach@678
|
3919 |
removeAttributeNode: function(oldAttr) {
|
jtulach@678
|
3920 |
// throw Exception if Attribute is readonly
|
jtulach@678
|
3921 |
if (__ownerDocument__(this).implementation.errorChecking && oldAttr._readonly) {
|
jtulach@678
|
3922 |
throw(new DOMException(DOMException.NO_MODIFICATION_ALLOWED_ERR));
|
jtulach@678
|
3923 |
}
|
jtulach@678
|
3924 |
|
jtulach@678
|
3925 |
// get item index
|
jtulach@678
|
3926 |
var itemIndex = this.attributes._findItemIndex(oldAttr._id);
|
jtulach@678
|
3927 |
|
jtulach@678
|
3928 |
// throw Exception if node does not exist in this map
|
jtulach@678
|
3929 |
if (__ownerDocument__(this).implementation.errorChecking && (itemIndex < 0)) {
|
jtulach@678
|
3930 |
throw(new DOMException(DOMException.NOT_FOUND_ERR));
|
jtulach@678
|
3931 |
}
|
jtulach@678
|
3932 |
|
jtulach@678
|
3933 |
return this.attributes._removeChild(itemIndex);
|
jtulach@678
|
3934 |
},
|
jtulach@678
|
3935 |
getAttributeNS : function(namespaceURI, localName) {
|
jtulach@678
|
3936 |
var ret = "";
|
jtulach@678
|
3937 |
// delegate to NAmedNodeMap.getNamedItemNS
|
jtulach@678
|
3938 |
var attr = this.attributes.getNamedItemNS(namespaceURI, localName);
|
jtulach@678
|
3939 |
if (attr) {
|
jtulach@678
|
3940 |
ret = attr.value;
|
jtulach@678
|
3941 |
}
|
jtulach@678
|
3942 |
return ret; // if Attribute exists, return its value, otherwise return ""
|
jtulach@678
|
3943 |
},
|
jtulach@678
|
3944 |
setAttributeNS : function(namespaceURI, qualifiedName, value) {
|
jtulach@678
|
3945 |
// call NamedNodeMap.getNamedItem
|
jtulach@678
|
3946 |
//console.log('setAttributeNS %s %s %s', namespaceURI, qualifiedName, value);
|
jtulach@678
|
3947 |
var attr = this.attributes.getNamedItem(namespaceURI, qualifiedName);
|
jtulach@678
|
3948 |
|
jtulach@678
|
3949 |
if (!attr) { // if Attribute exists, use it
|
jtulach@678
|
3950 |
// otherwise create it
|
jtulach@678
|
3951 |
attr = __ownerDocument__(this).createAttributeNS(namespaceURI, qualifiedName);
|
jtulach@678
|
3952 |
}
|
jtulach@678
|
3953 |
|
jtulach@678
|
3954 |
value = '' + value;
|
jtulach@678
|
3955 |
|
jtulach@678
|
3956 |
// test for exceptions
|
jtulach@678
|
3957 |
if (__ownerDocument__(this).implementation.errorChecking) {
|
jtulach@678
|
3958 |
// throw Exception if Attribute is readonly
|
jtulach@678
|
3959 |
if (attr._readonly) {
|
jtulach@678
|
3960 |
throw(new DOMException(DOMException.NO_MODIFICATION_ALLOWED_ERR));
|
jtulach@678
|
3961 |
}
|
jtulach@678
|
3962 |
|
jtulach@678
|
3963 |
// throw Exception if the Namespace is invalid
|
jtulach@678
|
3964 |
if (!__isValidNamespace__(this.ownerDocument, namespaceURI, qualifiedName, true)) {
|
jtulach@678
|
3965 |
throw(new DOMException(DOMException.NAMESPACE_ERR));
|
jtulach@678
|
3966 |
}
|
jtulach@678
|
3967 |
|
jtulach@678
|
3968 |
// throw Exception if the value string contains an illegal character
|
jtulach@678
|
3969 |
if (!__isValidString__(value)) {
|
jtulach@678
|
3970 |
throw(new DOMException(DOMException.INVALID_CHARACTER_ERR));
|
jtulach@678
|
3971 |
}
|
jtulach@678
|
3972 |
}
|
jtulach@678
|
3973 |
|
jtulach@678
|
3974 |
// if this Attribute is an ID
|
jtulach@678
|
3975 |
//if (__isIdDeclaration__(name)) {
|
jtulach@678
|
3976 |
// this.id = value;
|
jtulach@678
|
3977 |
//}
|
jtulach@678
|
3978 |
|
jtulach@678
|
3979 |
// assign values to properties (and aliases)
|
jtulach@678
|
3980 |
attr.value = value;
|
jtulach@678
|
3981 |
attr.nodeValue = value;
|
jtulach@678
|
3982 |
|
jtulach@678
|
3983 |
// delegate to NamedNodeMap.setNamedItem
|
jtulach@678
|
3984 |
this.attributes.setNamedItemNS(attr);
|
jtulach@678
|
3985 |
},
|
jtulach@678
|
3986 |
removeAttributeNS : function(namespaceURI, localName) {
|
jtulach@678
|
3987 |
// delegate to NamedNodeMap.removeNamedItemNS
|
jtulach@678
|
3988 |
return this.attributes.removeNamedItemNS(namespaceURI, localName);
|
jtulach@678
|
3989 |
},
|
jtulach@678
|
3990 |
getAttributeNodeNS : function(namespaceURI, localName) {
|
jtulach@678
|
3991 |
// delegate to NamedNodeMap.getNamedItemNS
|
jtulach@678
|
3992 |
return this.attributes.getNamedItemNS(namespaceURI, localName);
|
jtulach@678
|
3993 |
},
|
jtulach@678
|
3994 |
setAttributeNodeNS : function(newAttr) {
|
jtulach@678
|
3995 |
// if this Attribute is an ID
|
jtulach@678
|
3996 |
if ((newAttr.prefix == "") && __isIdDeclaration__(newAttr.name)) {
|
jtulach@678
|
3997 |
this.id = newAttr.value+''; // cache ID for getElementById()
|
jtulach@678
|
3998 |
}
|
jtulach@678
|
3999 |
|
jtulach@678
|
4000 |
// delegate to NamedNodeMap.setNamedItemNS
|
jtulach@678
|
4001 |
return this.attributes.setNamedItemNS(newAttr);
|
jtulach@678
|
4002 |
},
|
jtulach@678
|
4003 |
hasAttribute : function(name) {
|
jtulach@678
|
4004 |
// delegate to NamedNodeMap._hasAttribute
|
jtulach@678
|
4005 |
return __hasAttribute__(this.attributes,name);
|
jtulach@678
|
4006 |
},
|
jtulach@678
|
4007 |
hasAttributeNS : function(namespaceURI, localName) {
|
jtulach@678
|
4008 |
// delegate to NamedNodeMap._hasAttributeNS
|
jtulach@678
|
4009 |
return __hasAttributeNS__(this.attributes, namespaceURI, localName);
|
jtulach@678
|
4010 |
},
|
jtulach@678
|
4011 |
get nodeType(){
|
jtulach@678
|
4012 |
return Node.ELEMENT_NODE;
|
jtulach@678
|
4013 |
},
|
jtulach@678
|
4014 |
get xml() {
|
jtulach@678
|
4015 |
var ret = "",
|
jtulach@678
|
4016 |
ns = "",
|
jtulach@678
|
4017 |
attrs,
|
jtulach@678
|
4018 |
attrstring,
|
jtulach@678
|
4019 |
i;
|
jtulach@678
|
4020 |
|
jtulach@678
|
4021 |
// serialize namespace declarations
|
jtulach@678
|
4022 |
if (this.namespaceURI ){
|
jtulach@678
|
4023 |
if((this === this.ownerDocument.documentElement) ||
|
jtulach@678
|
4024 |
(!this.parentNode)||
|
jtulach@678
|
4025 |
(this.parentNode && (this.parentNode.namespaceURI !== this.namespaceURI))) {
|
jtulach@678
|
4026 |
ns = ' xmlns' + (this.prefix?(':'+this.prefix):'') +
|
jtulach@678
|
4027 |
'="' + this.namespaceURI + '"';
|
jtulach@678
|
4028 |
}
|
jtulach@678
|
4029 |
}
|
jtulach@678
|
4030 |
|
jtulach@678
|
4031 |
// serialize Attribute declarations
|
jtulach@678
|
4032 |
attrs = this.attributes;
|
jtulach@678
|
4033 |
attrstring = "";
|
jtulach@678
|
4034 |
for(i=0;i< attrs.length;i++){
|
jtulach@678
|
4035 |
if(attrs[i].name.match('xmlns:')) {
|
jtulach@678
|
4036 |
attrstring += " "+attrs[i].name+'="'+attrs[i].xml+'"';
|
jtulach@678
|
4037 |
}
|
jtulach@678
|
4038 |
}
|
jtulach@678
|
4039 |
for(i=0;i< attrs.length;i++){
|
jtulach@678
|
4040 |
if(!attrs[i].name.match('xmlns:')) {
|
jtulach@678
|
4041 |
attrstring += " "+attrs[i].name+'="'+attrs[i].xml+'"';
|
jtulach@678
|
4042 |
}
|
jtulach@678
|
4043 |
}
|
jtulach@678
|
4044 |
|
jtulach@678
|
4045 |
if(this.hasChildNodes()){
|
jtulach@678
|
4046 |
// serialize this Element
|
jtulach@678
|
4047 |
ret += "<" + this.tagName + ns + attrstring +">";
|
jtulach@678
|
4048 |
ret += this.childNodes.xml;
|
jtulach@678
|
4049 |
ret += "</" + this.tagName + ">";
|
jtulach@678
|
4050 |
}else{
|
jtulach@678
|
4051 |
ret += "<" + this.tagName + ns + attrstring +"/>";
|
jtulach@678
|
4052 |
}
|
jtulach@678
|
4053 |
|
jtulach@678
|
4054 |
return ret;
|
jtulach@678
|
4055 |
},
|
jtulach@678
|
4056 |
toString : function(){
|
jtulach@678
|
4057 |
return '[object Element]';
|
jtulach@678
|
4058 |
}
|
jtulach@678
|
4059 |
});
|
jtulach@678
|
4060 |
/**
|
jtulach@678
|
4061 |
* @class DOMException - raised when an operation is impossible to perform
|
jtulach@678
|
4062 |
* @author Jon van Noort (jon@webarcana.com.au)
|
jtulach@678
|
4063 |
* @param code : int - the exception code (one of the DOMException constants)
|
jtulach@678
|
4064 |
*/
|
jtulach@678
|
4065 |
DOMException = function(code) {
|
jtulach@678
|
4066 |
this.code = code;
|
jtulach@678
|
4067 |
};
|
jtulach@678
|
4068 |
|
jtulach@678
|
4069 |
// DOMException constants
|
jtulach@678
|
4070 |
// Introduced in DOM Level 1:
|
jtulach@678
|
4071 |
DOMException.INDEX_SIZE_ERR = 1;
|
jtulach@678
|
4072 |
DOMException.DOMSTRING_SIZE_ERR = 2;
|
jtulach@678
|
4073 |
DOMException.HIERARCHY_REQUEST_ERR = 3;
|
jtulach@678
|
4074 |
DOMException.WRONG_DOCUMENT_ERR = 4;
|
jtulach@678
|
4075 |
DOMException.INVALID_CHARACTER_ERR = 5;
|
jtulach@678
|
4076 |
DOMException.NO_DATA_ALLOWED_ERR = 6;
|
jtulach@678
|
4077 |
DOMException.NO_MODIFICATION_ALLOWED_ERR = 7;
|
jtulach@678
|
4078 |
DOMException.NOT_FOUND_ERR = 8;
|
jtulach@678
|
4079 |
DOMException.NOT_SUPPORTED_ERR = 9;
|
jtulach@678
|
4080 |
DOMException.INUSE_ATTRIBUTE_ERR = 10;
|
jtulach@678
|
4081 |
|
jtulach@678
|
4082 |
// Introduced in DOM Level 2:
|
jtulach@678
|
4083 |
DOMException.INVALID_STATE_ERR = 11;
|
jtulach@678
|
4084 |
DOMException.SYNTAX_ERR = 12;
|
jtulach@678
|
4085 |
DOMException.INVALID_MODIFICATION_ERR = 13;
|
jtulach@678
|
4086 |
DOMException.NAMESPACE_ERR = 14;
|
jtulach@678
|
4087 |
DOMException.INVALID_ACCESS_ERR = 15;
|
jtulach@678
|
4088 |
|
jtulach@678
|
4089 |
/**
|
jtulach@678
|
4090 |
* @class DocumentFragment -
|
jtulach@678
|
4091 |
* DocumentFragment is a "lightweight" or "minimal" Document object.
|
jtulach@678
|
4092 |
* @extends Node
|
jtulach@678
|
4093 |
* @param ownerDocument : The Document object associated with this node.
|
jtulach@678
|
4094 |
*/
|
jtulach@678
|
4095 |
DocumentFragment = function(ownerDocument) {
|
jtulach@678
|
4096 |
Node.apply(this, arguments);
|
jtulach@678
|
4097 |
this.nodeName = "#document-fragment";
|
jtulach@678
|
4098 |
};
|
jtulach@678
|
4099 |
DocumentFragment.prototype = new Node();
|
jtulach@678
|
4100 |
__extend__(DocumentFragment.prototype,{
|
jtulach@678
|
4101 |
get nodeType(){
|
jtulach@678
|
4102 |
return Node.DOCUMENT_FRAGMENT_NODE;
|
jtulach@678
|
4103 |
},
|
jtulach@678
|
4104 |
get xml(){
|
jtulach@678
|
4105 |
var xml = "",
|
jtulach@678
|
4106 |
count = this.childNodes.length;
|
jtulach@678
|
4107 |
|
jtulach@678
|
4108 |
// create string concatenating the serialized ChildNodes
|
jtulach@678
|
4109 |
for (var i = 0; i < count; i++) {
|
jtulach@678
|
4110 |
xml += this.childNodes.item(i).xml;
|
jtulach@678
|
4111 |
}
|
jtulach@678
|
4112 |
|
jtulach@678
|
4113 |
return xml;
|
jtulach@678
|
4114 |
},
|
jtulach@678
|
4115 |
toString : function(){
|
jtulach@678
|
4116 |
return "[object DocumentFragment]";
|
jtulach@678
|
4117 |
},
|
jtulach@678
|
4118 |
get localName(){
|
jtulach@678
|
4119 |
return null;
|
jtulach@678
|
4120 |
}
|
jtulach@678
|
4121 |
});
|
jtulach@678
|
4122 |
|
jtulach@678
|
4123 |
|
jtulach@678
|
4124 |
/**
|
jtulach@678
|
4125 |
* @class ProcessingInstruction -
|
jtulach@678
|
4126 |
* The ProcessingInstruction interface represents a
|
jtulach@678
|
4127 |
* "processing instruction", used in XML as a way to
|
jtulach@678
|
4128 |
* keep processor-specific information in the text of
|
jtulach@678
|
4129 |
* the document
|
jtulach@678
|
4130 |
* @extends Node
|
jtulach@678
|
4131 |
* @author Jon van Noort (jon@webarcana.com.au)
|
jtulach@678
|
4132 |
* @param ownerDocument : The Document object associated with this node.
|
jtulach@678
|
4133 |
*/
|
jtulach@678
|
4134 |
ProcessingInstruction = function(ownerDocument) {
|
jtulach@678
|
4135 |
Node.apply(this, arguments);
|
jtulach@678
|
4136 |
};
|
jtulach@678
|
4137 |
ProcessingInstruction.prototype = new Node();
|
jtulach@678
|
4138 |
__extend__(ProcessingInstruction.prototype, {
|
jtulach@678
|
4139 |
get data(){
|
jtulach@678
|
4140 |
return this.nodeValue;
|
jtulach@678
|
4141 |
},
|
jtulach@678
|
4142 |
set data(data){
|
jtulach@678
|
4143 |
// throw Exception if Node is readonly
|
jtulach@678
|
4144 |
if (__ownerDocument__(this).errorChecking && this._readonly) {
|
jtulach@678
|
4145 |
throw(new DOMException(DOMException.NO_MODIFICATION_ALLOWED_ERR));
|
jtulach@678
|
4146 |
}
|
jtulach@678
|
4147 |
this.nodeValue = data;
|
jtulach@678
|
4148 |
},
|
jtulach@678
|
4149 |
get textContent(){
|
jtulach@678
|
4150 |
return this.data;
|
jtulach@678
|
4151 |
},
|
jtulach@678
|
4152 |
get localName(){
|
jtulach@678
|
4153 |
return null;
|
jtulach@678
|
4154 |
},
|
jtulach@678
|
4155 |
get target(){
|
jtulach@678
|
4156 |
// The target of this processing instruction.
|
jtulach@678
|
4157 |
// XML defines this as being the first token following the markup that begins the processing instruction.
|
jtulach@678
|
4158 |
// The content of this processing instruction.
|
jtulach@678
|
4159 |
return this.nodeName;
|
jtulach@678
|
4160 |
},
|
jtulach@678
|
4161 |
set target(value){
|
jtulach@678
|
4162 |
// The target of this processing instruction.
|
jtulach@678
|
4163 |
// XML defines this as being the first token following the markup that begins the processing instruction.
|
jtulach@678
|
4164 |
// The content of this processing instruction.
|
jtulach@678
|
4165 |
this.nodeName = value;
|
jtulach@678
|
4166 |
},
|
jtulach@678
|
4167 |
get nodeType(){
|
jtulach@678
|
4168 |
return Node.PROCESSING_INSTRUCTION_NODE;
|
jtulach@678
|
4169 |
},
|
jtulach@678
|
4170 |
get xml(){
|
jtulach@678
|
4171 |
return "<?" + this.nodeName +" "+ this.nodeValue + "?>";
|
jtulach@678
|
4172 |
},
|
jtulach@678
|
4173 |
toString : function(){
|
jtulach@678
|
4174 |
return "[object ProcessingInstruction]";
|
jtulach@678
|
4175 |
}
|
jtulach@678
|
4176 |
});
|
jtulach@678
|
4177 |
|
jtulach@678
|
4178 |
|
jtulach@678
|
4179 |
/**
|
jtulach@678
|
4180 |
* @author envjs team
|
jtulach@678
|
4181 |
*/
|
jtulach@678
|
4182 |
|
jtulach@678
|
4183 |
Entity = function() {
|
jtulach@678
|
4184 |
throw new Error("Entity Not Implemented" );
|
jtulach@678
|
4185 |
};
|
jtulach@678
|
4186 |
|
jtulach@678
|
4187 |
Entity.constants = {
|
jtulach@678
|
4188 |
// content taken from W3C "HTML 4.01 Specification"
|
jtulach@678
|
4189 |
// "W3C Recommendation 24 December 1999"
|
jtulach@678
|
4190 |
|
jtulach@678
|
4191 |
nbsp: "\u00A0",
|
jtulach@678
|
4192 |
iexcl: "\u00A1",
|
jtulach@678
|
4193 |
cent: "\u00A2",
|
jtulach@678
|
4194 |
pound: "\u00A3",
|
jtulach@678
|
4195 |
curren: "\u00A4",
|
jtulach@678
|
4196 |
yen: "\u00A5",
|
jtulach@678
|
4197 |
brvbar: "\u00A6",
|
jtulach@678
|
4198 |
sect: "\u00A7",
|
jtulach@678
|
4199 |
uml: "\u00A8",
|
jtulach@678
|
4200 |
copy: "\u00A9",
|
jtulach@678
|
4201 |
ordf: "\u00AA",
|
jtulach@678
|
4202 |
laquo: "\u00AB",
|
jtulach@678
|
4203 |
not: "\u00AC",
|
jtulach@678
|
4204 |
shy: "\u00AD",
|
jtulach@678
|
4205 |
reg: "\u00AE",
|
jtulach@678
|
4206 |
macr: "\u00AF",
|
jtulach@678
|
4207 |
deg: "\u00B0",
|
jtulach@678
|
4208 |
plusmn: "\u00B1",
|
jtulach@678
|
4209 |
sup2: "\u00B2",
|
jtulach@678
|
4210 |
sup3: "\u00B3",
|
jtulach@678
|
4211 |
acute: "\u00B4",
|
jtulach@678
|
4212 |
micro: "\u00B5",
|
jtulach@678
|
4213 |
para: "\u00B6",
|
jtulach@678
|
4214 |
middot: "\u00B7",
|
jtulach@678
|
4215 |
cedil: "\u00B8",
|
jtulach@678
|
4216 |
sup1: "\u00B9",
|
jtulach@678
|
4217 |
ordm: "\u00BA",
|
jtulach@678
|
4218 |
raquo: "\u00BB",
|
jtulach@678
|
4219 |
frac14: "\u00BC",
|
jtulach@678
|
4220 |
frac12: "\u00BD",
|
jtulach@678
|
4221 |
frac34: "\u00BE",
|
jtulach@678
|
4222 |
iquest: "\u00BF",
|
jtulach@678
|
4223 |
Agrave: "\u00C0",
|
jtulach@678
|
4224 |
Aacute: "\u00C1",
|
jtulach@678
|
4225 |
Acirc: "\u00C2",
|
jtulach@678
|
4226 |
Atilde: "\u00C3",
|
jtulach@678
|
4227 |
Auml: "\u00C4",
|
jtulach@678
|
4228 |
Aring: "\u00C5",
|
jtulach@678
|
4229 |
AElig: "\u00C6",
|
jtulach@678
|
4230 |
Ccedil: "\u00C7",
|
jtulach@678
|
4231 |
Egrave: "\u00C8",
|
jtulach@678
|
4232 |
Eacute: "\u00C9",
|
jtulach@678
|
4233 |
Ecirc: "\u00CA",
|
jtulach@678
|
4234 |
Euml: "\u00CB",
|
jtulach@678
|
4235 |
Igrave: "\u00CC",
|
jtulach@678
|
4236 |
Iacute: "\u00CD",
|
jtulach@678
|
4237 |
Icirc: "\u00CE",
|
jtulach@678
|
4238 |
Iuml: "\u00CF",
|
jtulach@678
|
4239 |
ETH: "\u00D0",
|
jtulach@678
|
4240 |
Ntilde: "\u00D1",
|
jtulach@678
|
4241 |
Ograve: "\u00D2",
|
jtulach@678
|
4242 |
Oacute: "\u00D3",
|
jtulach@678
|
4243 |
Ocirc: "\u00D4",
|
jtulach@678
|
4244 |
Otilde: "\u00D5",
|
jtulach@678
|
4245 |
Ouml: "\u00D6",
|
jtulach@678
|
4246 |
times: "\u00D7",
|
jtulach@678
|
4247 |
Oslash: "\u00D8",
|
jtulach@678
|
4248 |
Ugrave: "\u00D9",
|
jtulach@678
|
4249 |
Uacute: "\u00DA",
|
jtulach@678
|
4250 |
Ucirc: "\u00DB",
|
jtulach@678
|
4251 |
Uuml: "\u00DC",
|
jtulach@678
|
4252 |
Yacute: "\u00DD",
|
jtulach@678
|
4253 |
THORN: "\u00DE",
|
jtulach@678
|
4254 |
szlig: "\u00DF",
|
jtulach@678
|
4255 |
agrave: "\u00E0",
|
jtulach@678
|
4256 |
aacute: "\u00E1",
|
jtulach@678
|
4257 |
acirc: "\u00E2",
|
jtulach@678
|
4258 |
atilde: "\u00E3",
|
jtulach@678
|
4259 |
auml: "\u00E4",
|
jtulach@678
|
4260 |
aring: "\u00E5",
|
jtulach@678
|
4261 |
aelig: "\u00E6",
|
jtulach@678
|
4262 |
ccedil: "\u00E7",
|
jtulach@678
|
4263 |
egrave: "\u00E8",
|
jtulach@678
|
4264 |
eacute: "\u00E9",
|
jtulach@678
|
4265 |
ecirc: "\u00EA",
|
jtulach@678
|
4266 |
euml: "\u00EB",
|
jtulach@678
|
4267 |
igrave: "\u00EC",
|
jtulach@678
|
4268 |
iacute: "\u00ED",
|
jtulach@678
|
4269 |
icirc: "\u00EE",
|
jtulach@678
|
4270 |
iuml: "\u00EF",
|
jtulach@678
|
4271 |
eth: "\u00F0",
|
jtulach@678
|
4272 |
ntilde: "\u00F1",
|
jtulach@678
|
4273 |
ograve: "\u00F2",
|
jtulach@678
|
4274 |
oacute: "\u00F3",
|
jtulach@678
|
4275 |
ocirc: "\u00F4",
|
jtulach@678
|
4276 |
otilde: "\u00F5",
|
jtulach@678
|
4277 |
ouml: "\u00F6",
|
jtulach@678
|
4278 |
divide: "\u00F7",
|
jtulach@678
|
4279 |
oslash: "\u00F8",
|
jtulach@678
|
4280 |
ugrave: "\u00F9",
|
jtulach@678
|
4281 |
uacute: "\u00FA",
|
jtulach@678
|
4282 |
ucirc: "\u00FB",
|
jtulach@678
|
4283 |
uuml: "\u00FC",
|
jtulach@678
|
4284 |
yacute: "\u00FD",
|
jtulach@678
|
4285 |
thorn: "\u00FE",
|
jtulach@678
|
4286 |
yuml: "\u00FF",
|
jtulach@678
|
4287 |
fnof: "\u0192",
|
jtulach@678
|
4288 |
Alpha: "\u0391",
|
jtulach@678
|
4289 |
Beta: "\u0392",
|
jtulach@678
|
4290 |
Gamma: "\u0393",
|
jtulach@678
|
4291 |
Delta: "\u0394",
|
jtulach@678
|
4292 |
Epsilon: "\u0395",
|
jtulach@678
|
4293 |
Zeta: "\u0396",
|
jtulach@678
|
4294 |
Eta: "\u0397",
|
jtulach@678
|
4295 |
Theta: "\u0398",
|
jtulach@678
|
4296 |
Iota: "\u0399",
|
jtulach@678
|
4297 |
Kappa: "\u039A",
|
jtulach@678
|
4298 |
Lambda: "\u039B",
|
jtulach@678
|
4299 |
Mu: "\u039C",
|
jtulach@678
|
4300 |
Nu: "\u039D",
|
jtulach@678
|
4301 |
Xi: "\u039E",
|
jtulach@678
|
4302 |
Omicron: "\u039F",
|
jtulach@678
|
4303 |
Pi: "\u03A0",
|
jtulach@678
|
4304 |
Rho: "\u03A1",
|
jtulach@678
|
4305 |
Sigma: "\u03A3",
|
jtulach@678
|
4306 |
Tau: "\u03A4",
|
jtulach@678
|
4307 |
Upsilon: "\u03A5",
|
jtulach@678
|
4308 |
Phi: "\u03A6",
|
jtulach@678
|
4309 |
Chi: "\u03A7",
|
jtulach@678
|
4310 |
Psi: "\u03A8",
|
jtulach@678
|
4311 |
Omega: "\u03A9",
|
jtulach@678
|
4312 |
alpha: "\u03B1",
|
jtulach@678
|
4313 |
beta: "\u03B2",
|
jtulach@678
|
4314 |
gamma: "\u03B3",
|
jtulach@678
|
4315 |
delta: "\u03B4",
|
jtulach@678
|
4316 |
epsilon: "\u03B5",
|
jtulach@678
|
4317 |
zeta: "\u03B6",
|
jtulach@678
|
4318 |
eta: "\u03B7",
|
jtulach@678
|
4319 |
theta: "\u03B8",
|
jtulach@678
|
4320 |
iota: "\u03B9",
|
jtulach@678
|
4321 |
kappa: "\u03BA",
|
jtulach@678
|
4322 |
lambda: "\u03BB",
|
jtulach@678
|
4323 |
mu: "\u03BC",
|
jtulach@678
|
4324 |
nu: "\u03BD",
|
jtulach@678
|
4325 |
xi: "\u03BE",
|
jtulach@678
|
4326 |
omicron: "\u03BF",
|
jtulach@678
|
4327 |
pi: "\u03C0",
|
jtulach@678
|
4328 |
rho: "\u03C1",
|
jtulach@678
|
4329 |
sigmaf: "\u03C2",
|
jtulach@678
|
4330 |
sigma: "\u03C3",
|
jtulach@678
|
4331 |
tau: "\u03C4",
|
jtulach@678
|
4332 |
upsilon: "\u03C5",
|
jtulach@678
|
4333 |
phi: "\u03C6",
|
jtulach@678
|
4334 |
chi: "\u03C7",
|
jtulach@678
|
4335 |
psi: "\u03C8",
|
jtulach@678
|
4336 |
omega: "\u03C9",
|
jtulach@678
|
4337 |
thetasym: "\u03D1",
|
jtulach@678
|
4338 |
upsih: "\u03D2",
|
jtulach@678
|
4339 |
piv: "\u03D6",
|
jtulach@678
|
4340 |
bull: "\u2022",
|
jtulach@678
|
4341 |
hellip: "\u2026",
|
jtulach@678
|
4342 |
prime: "\u2032",
|
jtulach@678
|
4343 |
Prime: "\u2033",
|
jtulach@678
|
4344 |
oline: "\u203E",
|
jtulach@678
|
4345 |
frasl: "\u2044",
|
jtulach@678
|
4346 |
weierp: "\u2118",
|
jtulach@678
|
4347 |
image: "\u2111",
|
jtulach@678
|
4348 |
real: "\u211C",
|
jtulach@678
|
4349 |
trade: "\u2122",
|
jtulach@678
|
4350 |
alefsym: "\u2135",
|
jtulach@678
|
4351 |
larr: "\u2190",
|
jtulach@678
|
4352 |
uarr: "\u2191",
|
jtulach@678
|
4353 |
rarr: "\u2192",
|
jtulach@678
|
4354 |
darr: "\u2193",
|
jtulach@678
|
4355 |
harr: "\u2194",
|
jtulach@678
|
4356 |
crarr: "\u21B5",
|
jtulach@678
|
4357 |
lArr: "\u21D0",
|
jtulach@678
|
4358 |
uArr: "\u21D1",
|
jtulach@678
|
4359 |
rArr: "\u21D2",
|
jtulach@678
|
4360 |
dArr: "\u21D3",
|
jtulach@678
|
4361 |
hArr: "\u21D4",
|
jtulach@678
|
4362 |
forall: "\u2200",
|
jtulach@678
|
4363 |
part: "\u2202",
|
jtulach@678
|
4364 |
exist: "\u2203",
|
jtulach@678
|
4365 |
empty: "\u2205",
|
jtulach@678
|
4366 |
nabla: "\u2207",
|
jtulach@678
|
4367 |
isin: "\u2208",
|
jtulach@678
|
4368 |
notin: "\u2209",
|
jtulach@678
|
4369 |
ni: "\u220B",
|
jtulach@678
|
4370 |
prod: "\u220F",
|
jtulach@678
|
4371 |
sum: "\u2211",
|
jtulach@678
|
4372 |
minus: "\u2212",
|
jtulach@678
|
4373 |
lowast: "\u2217",
|
jtulach@678
|
4374 |
radic: "\u221A",
|
jtulach@678
|
4375 |
prop: "\u221D",
|
jtulach@678
|
4376 |
infin: "\u221E",
|
jtulach@678
|
4377 |
ang: "\u2220",
|
jtulach@678
|
4378 |
and: "\u2227",
|
jtulach@678
|
4379 |
or: "\u2228",
|
jtulach@678
|
4380 |
cap: "\u2229",
|
jtulach@678
|
4381 |
cup: "\u222A",
|
jtulach@678
|
4382 |
intXX: "\u222B",
|
jtulach@678
|
4383 |
there4: "\u2234",
|
jtulach@678
|
4384 |
sim: "\u223C",
|
jtulach@678
|
4385 |
cong: "\u2245",
|
jtulach@678
|
4386 |
asymp: "\u2248",
|
jtulach@678
|
4387 |
ne: "\u2260",
|
jtulach@678
|
4388 |
equiv: "\u2261",
|
jtulach@678
|
4389 |
le: "\u2264",
|
jtulach@678
|
4390 |
ge: "\u2265",
|
jtulach@678
|
4391 |
sub: "\u2282",
|
jtulach@678
|
4392 |
sup: "\u2283",
|
jtulach@678
|
4393 |
nsub: "\u2284",
|
jtulach@678
|
4394 |
sube: "\u2286",
|
jtulach@678
|
4395 |
supe: "\u2287",
|
jtulach@678
|
4396 |
oplus: "\u2295",
|
jtulach@678
|
4397 |
otimes: "\u2297",
|
jtulach@678
|
4398 |
perp: "\u22A5",
|
jtulach@678
|
4399 |
sdot: "\u22C5",
|
jtulach@678
|
4400 |
lceil: "\u2308",
|
jtulach@678
|
4401 |
rceil: "\u2309",
|
jtulach@678
|
4402 |
lfloor: "\u230A",
|
jtulach@678
|
4403 |
rfloor: "\u230B",
|
jtulach@678
|
4404 |
lang: "\u2329",
|
jtulach@678
|
4405 |
rang: "\u232A",
|
jtulach@678
|
4406 |
loz: "\u25CA",
|
jtulach@678
|
4407 |
spades: "\u2660",
|
jtulach@678
|
4408 |
clubs: "\u2663",
|
jtulach@678
|
4409 |
hearts: "\u2665",
|
jtulach@678
|
4410 |
diams: "\u2666",
|
jtulach@678
|
4411 |
quot: "\u0022",
|
jtulach@678
|
4412 |
amp: "\u0026",
|
jtulach@678
|
4413 |
lt: "\u003C",
|
jtulach@678
|
4414 |
gt: "\u003E",
|
jtulach@678
|
4415 |
OElig: "\u0152",
|
jtulach@678
|
4416 |
oelig: "\u0153",
|
jtulach@678
|
4417 |
Scaron: "\u0160",
|
jtulach@678
|
4418 |
scaron: "\u0161",
|
jtulach@678
|
4419 |
Yuml: "\u0178",
|
jtulach@678
|
4420 |
circ: "\u02C6",
|
jtulach@678
|
4421 |
tilde: "\u02DC",
|
jtulach@678
|
4422 |
ensp: "\u2002",
|
jtulach@678
|
4423 |
emsp: "\u2003",
|
jtulach@678
|
4424 |
thinsp: "\u2009",
|
jtulach@678
|
4425 |
zwnj: "\u200C",
|
jtulach@678
|
4426 |
zwj: "\u200D",
|
jtulach@678
|
4427 |
lrm: "\u200E",
|
jtulach@678
|
4428 |
rlm: "\u200F",
|
jtulach@678
|
4429 |
ndash: "\u2013",
|
jtulach@678
|
4430 |
mdash: "\u2014",
|
jtulach@678
|
4431 |
lsquo: "\u2018",
|
jtulach@678
|
4432 |
rsquo: "\u2019",
|
jtulach@678
|
4433 |
sbquo: "\u201A",
|
jtulach@678
|
4434 |
ldquo: "\u201C",
|
jtulach@678
|
4435 |
rdquo: "\u201D",
|
jtulach@678
|
4436 |
bdquo: "\u201E",
|
jtulach@678
|
4437 |
dagger: "\u2020",
|
jtulach@678
|
4438 |
Dagger: "\u2021",
|
jtulach@678
|
4439 |
permil: "\u2030",
|
jtulach@678
|
4440 |
lsaquo: "\u2039",
|
jtulach@678
|
4441 |
rsaquo: "\u203A",
|
jtulach@678
|
4442 |
euro: "\u20AC",
|
jtulach@678
|
4443 |
|
jtulach@678
|
4444 |
// non-standard entities
|
jtulach@678
|
4445 |
apos: "'"
|
jtulach@678
|
4446 |
};
|
jtulach@678
|
4447 |
|
jtulach@678
|
4448 |
/**
|
jtulach@678
|
4449 |
* @author envjs team
|
jtulach@678
|
4450 |
*/
|
jtulach@678
|
4451 |
|
jtulach@678
|
4452 |
EntityReference = function() {
|
jtulach@678
|
4453 |
throw new Error("EntityReference Not Implemented" );
|
jtulach@678
|
4454 |
};
|
jtulach@678
|
4455 |
|
jtulach@678
|
4456 |
/**
|
jtulach@678
|
4457 |
* @class DOMImplementation -
|
jtulach@678
|
4458 |
* provides a number of methods for performing operations
|
jtulach@678
|
4459 |
* that are independent of any particular instance of the
|
jtulach@678
|
4460 |
* document object model.
|
jtulach@678
|
4461 |
*
|
jtulach@678
|
4462 |
* @author Jon van Noort (jon@webarcana.com.au)
|
jtulach@678
|
4463 |
*/
|
jtulach@678
|
4464 |
DOMImplementation = function() {
|
jtulach@678
|
4465 |
this.preserveWhiteSpace = false; // by default, ignore whitespace
|
jtulach@678
|
4466 |
this.namespaceAware = true; // by default, handle namespaces
|
jtulach@678
|
4467 |
this.errorChecking = true; // by default, test for exceptions
|
jtulach@678
|
4468 |
};
|
jtulach@678
|
4469 |
|
jtulach@678
|
4470 |
__extend__(DOMImplementation.prototype,{
|
jtulach@678
|
4471 |
// @param feature : string - The package name of the feature to test.
|
jtulach@678
|
4472 |
// the legal only values are "XML" and "CORE" (case-insensitive).
|
jtulach@678
|
4473 |
// @param version : string - This is the version number of the package
|
jtulach@678
|
4474 |
// name to test. In Level 1, this is the string "1.0".*
|
jtulach@678
|
4475 |
// @return : boolean
|
jtulach@678
|
4476 |
hasFeature : function(feature, version) {
|
jtulach@678
|
4477 |
var ret = false;
|
jtulach@678
|
4478 |
if (feature.toLowerCase() == "xml") {
|
jtulach@678
|
4479 |
ret = (!version || (version == "1.0") || (version == "2.0"));
|
jtulach@678
|
4480 |
}
|
jtulach@678
|
4481 |
else if (feature.toLowerCase() == "core") {
|
jtulach@678
|
4482 |
ret = (!version || (version == "2.0"));
|
jtulach@678
|
4483 |
}
|
jtulach@678
|
4484 |
else if (feature == "http://www.w3.org/TR/SVG11/feature#BasicStructure") {
|
jtulach@678
|
4485 |
ret = (version == "1.1");
|
jtulach@678
|
4486 |
}
|
jtulach@678
|
4487 |
return ret;
|
jtulach@678
|
4488 |
},
|
jtulach@678
|
4489 |
createDocumentType : function(qname, publicId, systemId){
|
jtulach@678
|
4490 |
var doctype = new DocumentType();
|
jtulach@678
|
4491 |
doctype.nodeName = qname?qname.toUpperCase():null;
|
jtulach@678
|
4492 |
doctype.publicId = publicId?publicId:null;
|
jtulach@678
|
4493 |
doctype.systemId = systemId?systemId:null;
|
jtulach@678
|
4494 |
return doctype;
|
jtulach@678
|
4495 |
},
|
jtulach@678
|
4496 |
createDocument : function(nsuri, qname, doctype){
|
jtulach@678
|
4497 |
|
jtulach@678
|
4498 |
var doc = null, documentElement;
|
jtulach@678
|
4499 |
|
jtulach@678
|
4500 |
doc = new Document(this, null);
|
jtulach@678
|
4501 |
if(doctype){
|
jtulach@678
|
4502 |
doc.doctype = doctype;
|
jtulach@678
|
4503 |
}
|
jtulach@678
|
4504 |
|
jtulach@678
|
4505 |
if(nsuri && qname){
|
jtulach@678
|
4506 |
documentElement = doc.createElementNS(nsuri, qname);
|
jtulach@678
|
4507 |
}else if(qname){
|
jtulach@678
|
4508 |
documentElement = doc.createElement(qname);
|
jtulach@678
|
4509 |
}
|
jtulach@678
|
4510 |
if(documentElement){
|
jtulach@678
|
4511 |
doc.appendChild(documentElement);
|
jtulach@678
|
4512 |
}
|
jtulach@678
|
4513 |
return doc;
|
jtulach@678
|
4514 |
},
|
jtulach@678
|
4515 |
createHTMLDocument : function(title){
|
jtulach@678
|
4516 |
var doc = new HTMLDocument($implementation, null, "");
|
jtulach@678
|
4517 |
var html = doc.createElement("html"); doc.appendChild(html);
|
jtulach@678
|
4518 |
var head = doc.createElement("head"); html.appendChild(head);
|
jtulach@678
|
4519 |
var body = doc.createElement("body"); html.appendChild(body);
|
jtulach@678
|
4520 |
var t = doc.createElement("title"); head.appendChild(t);
|
jtulach@678
|
4521 |
if( title) {
|
jtulach@678
|
4522 |
t.appendChild(doc.createTextNode(title));
|
jtulach@678
|
4523 |
}
|
jtulach@678
|
4524 |
return doc;
|
jtulach@678
|
4525 |
},
|
jtulach@678
|
4526 |
translateErrCode : function(code) {
|
jtulach@678
|
4527 |
//convert DOMException Code to human readable error message;
|
jtulach@678
|
4528 |
var msg = "";
|
jtulach@678
|
4529 |
|
jtulach@678
|
4530 |
switch (code) {
|
jtulach@678
|
4531 |
case DOMException.INDEX_SIZE_ERR : // 1
|
jtulach@678
|
4532 |
msg = "INDEX_SIZE_ERR: Index out of bounds";
|
jtulach@678
|
4533 |
break;
|
jtulach@678
|
4534 |
|
jtulach@678
|
4535 |
case DOMException.DOMSTRING_SIZE_ERR : // 2
|
jtulach@678
|
4536 |
msg = "DOMSTRING_SIZE_ERR: The resulting string is too long to fit in a DOMString";
|
jtulach@678
|
4537 |
break;
|
jtulach@678
|
4538 |
|
jtulach@678
|
4539 |
case DOMException.HIERARCHY_REQUEST_ERR : // 3
|
jtulach@678
|
4540 |
msg = "HIERARCHY_REQUEST_ERR: The Node can not be inserted at this location";
|
jtulach@678
|
4541 |
break;
|
jtulach@678
|
4542 |
|
jtulach@678
|
4543 |
case DOMException.WRONG_DOCUMENT_ERR : // 4
|
jtulach@678
|
4544 |
msg = "WRONG_DOCUMENT_ERR: The source and the destination Documents are not the same";
|
jtulach@678
|
4545 |
break;
|
jtulach@678
|
4546 |
|
jtulach@678
|
4547 |
case DOMException.INVALID_CHARACTER_ERR : // 5
|
jtulach@678
|
4548 |
msg = "INVALID_CHARACTER_ERR: The string contains an invalid character";
|
jtulach@678
|
4549 |
break;
|
jtulach@678
|
4550 |
|
jtulach@678
|
4551 |
case DOMException.NO_DATA_ALLOWED_ERR : // 6
|
jtulach@678
|
4552 |
msg = "NO_DATA_ALLOWED_ERR: This Node / NodeList does not support data";
|
jtulach@678
|
4553 |
break;
|
jtulach@678
|
4554 |
|
jtulach@678
|
4555 |
case DOMException.NO_MODIFICATION_ALLOWED_ERR : // 7
|
jtulach@678
|
4556 |
msg = "NO_MODIFICATION_ALLOWED_ERR: This object cannot be modified";
|
jtulach@678
|
4557 |
break;
|
jtulach@678
|
4558 |
|
jtulach@678
|
4559 |
case DOMException.NOT_FOUND_ERR : // 8
|
jtulach@678
|
4560 |
msg = "NOT_FOUND_ERR: The item cannot be found";
|
jtulach@678
|
4561 |
break;
|
jtulach@678
|
4562 |
|
jtulach@678
|
4563 |
case DOMException.NOT_SUPPORTED_ERR : // 9
|
jtulach@678
|
4564 |
msg = "NOT_SUPPORTED_ERR: This implementation does not support function";
|
jtulach@678
|
4565 |
break;
|
jtulach@678
|
4566 |
|
jtulach@678
|
4567 |
case DOMException.INUSE_ATTRIBUTE_ERR : // 10
|
jtulach@678
|
4568 |
msg = "INUSE_ATTRIBUTE_ERR: The Attribute has already been assigned to another Element";
|
jtulach@678
|
4569 |
break;
|
jtulach@678
|
4570 |
|
jtulach@678
|
4571 |
// Introduced in DOM Level 2:
|
jtulach@678
|
4572 |
case DOMException.INVALID_STATE_ERR : // 11
|
jtulach@678
|
4573 |
msg = "INVALID_STATE_ERR: The object is no longer usable";
|
jtulach@678
|
4574 |
break;
|
jtulach@678
|
4575 |
|
jtulach@678
|
4576 |
case DOMException.SYNTAX_ERR : // 12
|
jtulach@678
|
4577 |
msg = "SYNTAX_ERR: Syntax error";
|
jtulach@678
|
4578 |
break;
|
jtulach@678
|
4579 |
|
jtulach@678
|
4580 |
case DOMException.INVALID_MODIFICATION_ERR : // 13
|
jtulach@678
|
4581 |
msg = "INVALID_MODIFICATION_ERR: Cannot change the type of the object";
|
jtulach@678
|
4582 |
break;
|
jtulach@678
|
4583 |
|
jtulach@678
|
4584 |
case DOMException.NAMESPACE_ERR : // 14
|
jtulach@678
|
4585 |
msg = "NAMESPACE_ERR: The namespace declaration is incorrect";
|
jtulach@678
|
4586 |
break;
|
jtulach@678
|
4587 |
|
jtulach@678
|
4588 |
case DOMException.INVALID_ACCESS_ERR : // 15
|
jtulach@678
|
4589 |
msg = "INVALID_ACCESS_ERR: The object does not support this function";
|
jtulach@678
|
4590 |
break;
|
jtulach@678
|
4591 |
|
jtulach@678
|
4592 |
default :
|
jtulach@678
|
4593 |
msg = "UNKNOWN: Unknown Exception Code ("+ code +")";
|
jtulach@678
|
4594 |
}
|
jtulach@678
|
4595 |
|
jtulach@678
|
4596 |
return msg;
|
jtulach@678
|
4597 |
},
|
jtulach@678
|
4598 |
toString : function(){
|
jtulach@678
|
4599 |
return "[object DOMImplementation]";
|
jtulach@678
|
4600 |
}
|
jtulach@678
|
4601 |
});
|
jtulach@678
|
4602 |
|
jtulach@678
|
4603 |
|
jtulach@678
|
4604 |
|
jtulach@678
|
4605 |
/**
|
jtulach@678
|
4606 |
* @method DOMImplementation._isNamespaceDeclaration - Return true, if attributeName is a namespace declaration
|
jtulach@678
|
4607 |
* @author Jon van Noort (jon@webarcana.com.au)
|
jtulach@678
|
4608 |
* @param attributeName : string - the attribute name
|
jtulach@678
|
4609 |
* @return : boolean
|
jtulach@678
|
4610 |
*/
|
jtulach@678
|
4611 |
function __isNamespaceDeclaration__(attributeName) {
|
jtulach@678
|
4612 |
// test if attributeName is 'xmlns'
|
jtulach@678
|
4613 |
return (attributeName.indexOf('xmlns') > -1);
|
jtulach@678
|
4614 |
}
|
jtulach@678
|
4615 |
|
jtulach@678
|
4616 |
/**
|
jtulach@678
|
4617 |
* @method DOMImplementation._isIdDeclaration - Return true, if attributeName is an id declaration
|
jtulach@678
|
4618 |
* @author Jon van Noort (jon@webarcana.com.au)
|
jtulach@678
|
4619 |
* @param attributeName : string - the attribute name
|
jtulach@678
|
4620 |
* @return : boolean
|
jtulach@678
|
4621 |
*/
|
jtulach@678
|
4622 |
function __isIdDeclaration__(attributeName) {
|
jtulach@678
|
4623 |
// test if attributeName is 'id' (case insensitive)
|
jtulach@678
|
4624 |
return attributeName?(attributeName.toLowerCase() == 'id'):false;
|
jtulach@678
|
4625 |
}
|
jtulach@678
|
4626 |
|
jtulach@678
|
4627 |
/**
|
jtulach@678
|
4628 |
* @method DOMImplementation._isValidName - Return true,
|
jtulach@678
|
4629 |
* if name contains no invalid characters
|
jtulach@678
|
4630 |
* @author Jon van Noort (jon@webarcana.com.au)
|
jtulach@678
|
4631 |
* @param name : string - the candidate name
|
jtulach@678
|
4632 |
* @return : boolean
|
jtulach@678
|
4633 |
*/
|
jtulach@678
|
4634 |
function __isValidName__(name) {
|
jtulach@678
|
4635 |
// test if name contains only valid characters
|
jtulach@678
|
4636 |
return name.match(re_validName);
|
jtulach@678
|
4637 |
}
|
jtulach@678
|
4638 |
var re_validName = /^[a-zA-Z_:][a-zA-Z0-9\.\-_:]*$/;
|
jtulach@678
|
4639 |
|
jtulach@678
|
4640 |
/**
|
jtulach@678
|
4641 |
* @method DOMImplementation._isValidString - Return true, if string does not contain any illegal chars
|
jtulach@678
|
4642 |
* All of the characters 0 through 31 and character 127 are nonprinting control characters.
|
jtulach@678
|
4643 |
* With the exception of characters 09, 10, and 13, (Ox09, Ox0A, and Ox0D)
|
jtulach@678
|
4644 |
* Note: different from _isValidName in that ValidStrings may contain spaces
|
jtulach@678
|
4645 |
* @author Jon van Noort (jon@webarcana.com.au)
|
jtulach@678
|
4646 |
* @param name : string - the candidate string
|
jtulach@678
|
4647 |
* @return : boolean
|
jtulach@678
|
4648 |
*/
|
jtulach@678
|
4649 |
function __isValidString__(name) {
|
jtulach@678
|
4650 |
// test that string does not contains invalid characters
|
jtulach@678
|
4651 |
return (name.search(re_invalidStringChars) < 0);
|
jtulach@678
|
4652 |
}
|
jtulach@678
|
4653 |
var re_invalidStringChars = /\x01|\x02|\x03|\x04|\x05|\x06|\x07|\x08|\x0B|\x0C|\x0E|\x0F|\x10|\x11|\x12|\x13|\x14|\x15|\x16|\x17|\x18|\x19|\x1A|\x1B|\x1C|\x1D|\x1E|\x1F|\x7F/;
|
jtulach@678
|
4654 |
|
jtulach@678
|
4655 |
/**
|
jtulach@678
|
4656 |
* @method DOMImplementation._parseNSName - parse the namespace name.
|
jtulach@678
|
4657 |
* if there is no colon, the
|
jtulach@678
|
4658 |
* @author Jon van Noort (jon@webarcana.com.au)
|
jtulach@678
|
4659 |
* @param qualifiedName : string - The qualified name
|
jtulach@678
|
4660 |
* @return : NSName - [
|
jtulach@678
|
4661 |
.prefix : string - The prefix part of the qname
|
jtulach@678
|
4662 |
.namespaceName : string - The namespaceURI part of the qname
|
jtulach@678
|
4663 |
]
|
jtulach@678
|
4664 |
*/
|
jtulach@678
|
4665 |
function __parseNSName__(qualifiedName) {
|
jtulach@678
|
4666 |
var resultNSName = {};
|
jtulach@678
|
4667 |
// unless the qname has a namespaceName, the prefix is the entire String
|
jtulach@678
|
4668 |
resultNSName.prefix = qualifiedName;
|
jtulach@678
|
4669 |
resultNSName.namespaceName = "";
|
jtulach@678
|
4670 |
// split on ':'
|
jtulach@678
|
4671 |
var delimPos = qualifiedName.indexOf(':');
|
jtulach@678
|
4672 |
if (delimPos > -1) {
|
jtulach@678
|
4673 |
// get prefix
|
jtulach@678
|
4674 |
resultNSName.prefix = qualifiedName.substring(0, delimPos);
|
jtulach@678
|
4675 |
// get namespaceName
|
jtulach@678
|
4676 |
resultNSName.namespaceName = qualifiedName.substring(delimPos +1, qualifiedName.length);
|
jtulach@678
|
4677 |
}
|
jtulach@678
|
4678 |
return resultNSName;
|
jtulach@678
|
4679 |
}
|
jtulach@678
|
4680 |
|
jtulach@678
|
4681 |
/**
|
jtulach@678
|
4682 |
* @method DOMImplementation._parseQName - parse the qualified name
|
jtulach@678
|
4683 |
* @author Jon van Noort (jon@webarcana.com.au)
|
jtulach@678
|
4684 |
* @param qualifiedName : string - The qualified name
|
jtulach@678
|
4685 |
* @return : QName
|
jtulach@678
|
4686 |
*/
|
jtulach@678
|
4687 |
function __parseQName__(qualifiedName) {
|
jtulach@678
|
4688 |
var resultQName = {};
|
jtulach@678
|
4689 |
// unless the qname has a prefix, the local name is the entire String
|
jtulach@678
|
4690 |
resultQName.localName = qualifiedName;
|
jtulach@678
|
4691 |
resultQName.prefix = "";
|
jtulach@678
|
4692 |
// split on ':'
|
jtulach@678
|
4693 |
var delimPos = qualifiedName.indexOf(':');
|
jtulach@678
|
4694 |
if (delimPos > -1) {
|
jtulach@678
|
4695 |
// get prefix
|
jtulach@678
|
4696 |
resultQName.prefix = qualifiedName.substring(0, delimPos);
|
jtulach@678
|
4697 |
// get localName
|
jtulach@678
|
4698 |
resultQName.localName = qualifiedName.substring(delimPos +1, qualifiedName.length);
|
jtulach@678
|
4699 |
}
|
jtulach@678
|
4700 |
return resultQName;
|
jtulach@678
|
4701 |
}
|
jtulach@678
|
4702 |
/**
|
jtulach@678
|
4703 |
* @author envjs team
|
jtulach@678
|
4704 |
*/
|
jtulach@678
|
4705 |
Notation = function() {
|
jtulach@678
|
4706 |
throw new Error("Notation Not Implemented" );
|
jtulach@678
|
4707 |
};/**
|
jtulach@678
|
4708 |
* @author thatcher
|
jtulach@678
|
4709 |
*/
|
jtulach@678
|
4710 |
Range = function(){
|
jtulach@678
|
4711 |
|
jtulach@678
|
4712 |
};
|
jtulach@678
|
4713 |
|
jtulach@678
|
4714 |
__extend__(Range.prototype, {
|
jtulach@678
|
4715 |
get startContainer(){
|
jtulach@678
|
4716 |
|
jtulach@678
|
4717 |
},
|
jtulach@678
|
4718 |
get endContainer(){
|
jtulach@678
|
4719 |
|
jtulach@678
|
4720 |
},
|
jtulach@678
|
4721 |
get startOffset(){
|
jtulach@678
|
4722 |
|
jtulach@678
|
4723 |
},
|
jtulach@678
|
4724 |
get endOffset(){
|
jtulach@678
|
4725 |
|
jtulach@678
|
4726 |
},
|
jtulach@678
|
4727 |
get collapsed(){
|
jtulach@678
|
4728 |
|
jtulach@678
|
4729 |
},
|
jtulach@678
|
4730 |
get commonAncestorContainer(){
|
jtulach@678
|
4731 |
|
jtulach@678
|
4732 |
},
|
jtulach@678
|
4733 |
setStart: function(refNode, offset){//throws RangeException
|
jtulach@678
|
4734 |
|
jtulach@678
|
4735 |
},
|
jtulach@678
|
4736 |
setEnd: function(refNode, offset){//throws RangeException
|
jtulach@678
|
4737 |
|
jtulach@678
|
4738 |
},
|
jtulach@678
|
4739 |
setStartBefore: function(refNode){//throws RangeException
|
jtulach@678
|
4740 |
|
jtulach@678
|
4741 |
},
|
jtulach@678
|
4742 |
setStartAfter: function(refNode){//throws RangeException
|
jtulach@678
|
4743 |
|
jtulach@678
|
4744 |
},
|
jtulach@678
|
4745 |
setEndBefore: function(refNode){//throws RangeException
|
jtulach@678
|
4746 |
|
jtulach@678
|
4747 |
},
|
jtulach@678
|
4748 |
setEndAfter: function(refNode){//throws RangeException
|
jtulach@678
|
4749 |
|
jtulach@678
|
4750 |
},
|
jtulach@678
|
4751 |
collapse: function(toStart){//throws RangeException
|
jtulach@678
|
4752 |
|
jtulach@678
|
4753 |
},
|
jtulach@678
|
4754 |
selectNode: function(refNode){//throws RangeException
|
jtulach@678
|
4755 |
|
jtulach@678
|
4756 |
},
|
jtulach@678
|
4757 |
selectNodeContents: function(refNode){//throws RangeException
|
jtulach@678
|
4758 |
|
jtulach@678
|
4759 |
},
|
jtulach@678
|
4760 |
compareBoundaryPoints: function(how, sourceRange){
|
jtulach@678
|
4761 |
|
jtulach@678
|
4762 |
},
|
jtulach@678
|
4763 |
deleteContents: function(){
|
jtulach@678
|
4764 |
|
jtulach@678
|
4765 |
},
|
jtulach@678
|
4766 |
extractContents: function(){
|
jtulach@678
|
4767 |
|
jtulach@678
|
4768 |
},
|
jtulach@678
|
4769 |
cloneContents: function(){
|
jtulach@678
|
4770 |
|
jtulach@678
|
4771 |
},
|
jtulach@678
|
4772 |
insertNode: function(newNode){
|
jtulach@678
|
4773 |
|
jtulach@678
|
4774 |
},
|
jtulach@678
|
4775 |
surroundContents: function(newParent){
|
jtulach@678
|
4776 |
|
jtulach@678
|
4777 |
},
|
jtulach@678
|
4778 |
cloneRange: function(){
|
jtulach@678
|
4779 |
|
jtulach@678
|
4780 |
},
|
jtulach@678
|
4781 |
toString: function(){
|
jtulach@678
|
4782 |
return '[object Range]';
|
jtulach@678
|
4783 |
},
|
jtulach@678
|
4784 |
detach: function(){
|
jtulach@678
|
4785 |
|
jtulach@678
|
4786 |
}
|
jtulach@678
|
4787 |
});
|
jtulach@678
|
4788 |
|
jtulach@678
|
4789 |
|
jtulach@678
|
4790 |
// CompareHow
|
jtulach@678
|
4791 |
Range.START_TO_START = 0;
|
jtulach@678
|
4792 |
Range.START_TO_END = 1;
|
jtulach@678
|
4793 |
Range.END_TO_END = 2;
|
jtulach@678
|
4794 |
Range.END_TO_START = 3;
|
jtulach@678
|
4795 |
|
jtulach@678
|
4796 |
/*
|
jtulach@678
|
4797 |
* Forward declarations
|
jtulach@678
|
4798 |
*/
|
jtulach@678
|
4799 |
var __isValidNamespace__;
|
jtulach@678
|
4800 |
|
jtulach@678
|
4801 |
/**
|
jtulach@678
|
4802 |
* @class Document - The Document interface represents the entire HTML
|
jtulach@678
|
4803 |
* or XML document. Conceptually, it is the root of the document tree,
|
jtulach@678
|
4804 |
* and provides the primary access to the document's data.
|
jtulach@678
|
4805 |
*
|
jtulach@678
|
4806 |
* @extends Node
|
jtulach@678
|
4807 |
* @param implementation : DOMImplementation - the creator Implementation
|
jtulach@678
|
4808 |
*/
|
jtulach@678
|
4809 |
Document = function(implementation, docParentWindow) {
|
jtulach@678
|
4810 |
Node.apply(this, arguments);
|
jtulach@678
|
4811 |
|
jtulach@678
|
4812 |
//TODO: Temporary!!! Cnage back to true!!!
|
jtulach@678
|
4813 |
this.async = true;
|
jtulach@678
|
4814 |
// The Document Type Declaration (see DocumentType) associated with this document
|
jtulach@678
|
4815 |
this.doctype = null;
|
jtulach@678
|
4816 |
// The DOMImplementation object that handles this document.
|
jtulach@678
|
4817 |
this.implementation = implementation;
|
jtulach@678
|
4818 |
|
jtulach@678
|
4819 |
this.nodeName = "#document";
|
jtulach@678
|
4820 |
// initially false, set to true by parser
|
jtulach@678
|
4821 |
this.parsing = false;
|
jtulach@678
|
4822 |
this.baseURI = 'about:blank';
|
jtulach@678
|
4823 |
|
jtulach@678
|
4824 |
this.ownerDocument = null;
|
jtulach@678
|
4825 |
|
jtulach@678
|
4826 |
this.importing = false;
|
jtulach@678
|
4827 |
};
|
jtulach@678
|
4828 |
|
jtulach@678
|
4829 |
Document.prototype = new Node();
|
jtulach@678
|
4830 |
__extend__(Document.prototype,{
|
jtulach@678
|
4831 |
get localName(){
|
jtulach@678
|
4832 |
return null;
|
jtulach@678
|
4833 |
},
|
jtulach@678
|
4834 |
get textContent(){
|
jtulach@678
|
4835 |
return null;
|
jtulach@678
|
4836 |
},
|
jtulach@678
|
4837 |
get all(){
|
jtulach@678
|
4838 |
return this.getElementsByTagName("*");
|
jtulach@678
|
4839 |
},
|
jtulach@678
|
4840 |
get documentElement(){
|
jtulach@678
|
4841 |
var i, length = this.childNodes?this.childNodes.length:0;
|
jtulach@678
|
4842 |
for(i=0;i<length;i++){
|
jtulach@678
|
4843 |
if(this.childNodes[i].nodeType === Node.ELEMENT_NODE){
|
jtulach@678
|
4844 |
return this.childNodes[i];
|
jtulach@678
|
4845 |
}
|
jtulach@678
|
4846 |
}
|
jtulach@678
|
4847 |
return null;
|
jtulach@678
|
4848 |
},
|
jtulach@678
|
4849 |
get documentURI(){
|
jtulach@678
|
4850 |
return this.baseURI;
|
jtulach@678
|
4851 |
},
|
jtulach@678
|
4852 |
createExpression: function(xpath, nsuriMap){
|
jtulach@678
|
4853 |
return new XPathExpression(xpath, nsuriMap);
|
jtulach@678
|
4854 |
},
|
jtulach@678
|
4855 |
createDocumentFragment: function() {
|
jtulach@678
|
4856 |
var node = new DocumentFragment(this);
|
jtulach@678
|
4857 |
return node;
|
jtulach@678
|
4858 |
},
|
jtulach@678
|
4859 |
createTextNode: function(data) {
|
jtulach@678
|
4860 |
var node = new Text(this);
|
jtulach@678
|
4861 |
node.data = data;
|
jtulach@678
|
4862 |
return node;
|
jtulach@678
|
4863 |
},
|
jtulach@678
|
4864 |
createComment: function(data) {
|
jtulach@678
|
4865 |
var node = new Comment(this);
|
jtulach@678
|
4866 |
node.data = data;
|
jtulach@678
|
4867 |
return node;
|
jtulach@678
|
4868 |
},
|
jtulach@678
|
4869 |
createCDATASection : function(data) {
|
jtulach@678
|
4870 |
var node = new CDATASection(this);
|
jtulach@678
|
4871 |
node.data = data;
|
jtulach@678
|
4872 |
return node;
|
jtulach@678
|
4873 |
},
|
jtulach@678
|
4874 |
createProcessingInstruction: function(target, data) {
|
jtulach@678
|
4875 |
// throw Exception if the target string contains an illegal character
|
jtulach@678
|
4876 |
if (__ownerDocument__(this).implementation.errorChecking &&
|
jtulach@678
|
4877 |
(!__isValidName__(target))) {
|
jtulach@678
|
4878 |
throw(new DOMException(DOMException.INVALID_CHARACTER_ERR));
|
jtulach@678
|
4879 |
}
|
jtulach@678
|
4880 |
|
jtulach@678
|
4881 |
var node = new ProcessingInstruction(this);
|
jtulach@678
|
4882 |
node.target = target;
|
jtulach@678
|
4883 |
node.data = data;
|
jtulach@678
|
4884 |
return node;
|
jtulach@678
|
4885 |
},
|
jtulach@678
|
4886 |
createElement: function(tagName) {
|
jtulach@678
|
4887 |
// throw Exception if the tagName string contains an illegal character
|
jtulach@678
|
4888 |
if (__ownerDocument__(this).implementation.errorChecking &&
|
jtulach@678
|
4889 |
(!__isValidName__(tagName))) {
|
jtulach@678
|
4890 |
throw(new DOMException(DOMException.INVALID_CHARACTER_ERR));
|
jtulach@678
|
4891 |
}
|
jtulach@678
|
4892 |
var node = new Element(this);
|
jtulach@678
|
4893 |
node.nodeName = tagName;
|
jtulach@678
|
4894 |
return node;
|
jtulach@678
|
4895 |
},
|
jtulach@678
|
4896 |
createElementNS : function(namespaceURI, qualifiedName) {
|
jtulach@678
|
4897 |
//we use this as a parser flag to ignore the xhtml
|
jtulach@678
|
4898 |
//namespace assumed by the parser
|
jtulach@678
|
4899 |
//console.log('creating element %s %s', namespaceURI, qualifiedName);
|
jtulach@678
|
4900 |
if(this.baseURI === 'http://envjs.com/xml' &&
|
jtulach@678
|
4901 |
namespaceURI === 'http://www.w3.org/1999/xhtml'){
|
jtulach@678
|
4902 |
return this.createElement(qualifiedName);
|
jtulach@678
|
4903 |
}
|
jtulach@678
|
4904 |
//console.log('createElementNS %s %s', namespaceURI, qualifiedName);
|
jtulach@678
|
4905 |
if (__ownerDocument__(this).implementation.errorChecking) {
|
jtulach@678
|
4906 |
// throw Exception if the Namespace is invalid
|
jtulach@678
|
4907 |
if (!__isValidNamespace__(this, namespaceURI, qualifiedName)) {
|
jtulach@678
|
4908 |
throw(new DOMException(DOMException.NAMESPACE_ERR));
|
jtulach@678
|
4909 |
}
|
jtulach@678
|
4910 |
|
jtulach@678
|
4911 |
// throw Exception if the qualifiedName string contains an illegal character
|
jtulach@678
|
4912 |
if (!__isValidName__(qualifiedName)) {
|
jtulach@678
|
4913 |
throw(new DOMException(DOMException.INVALID_CHARACTER_ERR));
|
jtulach@678
|
4914 |
}
|
jtulach@678
|
4915 |
}
|
jtulach@678
|
4916 |
var node = new Element(this);
|
jtulach@678
|
4917 |
var qname = __parseQName__(qualifiedName);
|
jtulach@678
|
4918 |
node.namespaceURI = namespaceURI;
|
jtulach@678
|
4919 |
node.prefix = qname.prefix;
|
jtulach@678
|
4920 |
node.nodeName = qualifiedName;
|
jtulach@678
|
4921 |
|
jtulach@678
|
4922 |
//console.log('created element %s %s', namespaceURI, qualifiedName);
|
jtulach@678
|
4923 |
return node;
|
jtulach@678
|
4924 |
},
|
jtulach@678
|
4925 |
createAttribute : function(name) {
|
jtulach@678
|
4926 |
//console.log('createAttribute %s ', name);
|
jtulach@678
|
4927 |
// throw Exception if the name string contains an illegal character
|
jtulach@678
|
4928 |
if (__ownerDocument__(this).implementation.errorChecking &&
|
jtulach@678
|
4929 |
(!__isValidName__(name))) {
|
jtulach@678
|
4930 |
throw(new DOMException(DOMException.INVALID_CHARACTER_ERR));
|
jtulach@678
|
4931 |
}
|
jtulach@678
|
4932 |
var node = new Attr(this);
|
jtulach@678
|
4933 |
node.nodeName = name;
|
jtulach@678
|
4934 |
return node;
|
jtulach@678
|
4935 |
},
|
jtulach@678
|
4936 |
createAttributeNS : function(namespaceURI, qualifiedName) {
|
jtulach@678
|
4937 |
//we use this as a parser flag to ignore the xhtml
|
jtulach@678
|
4938 |
//namespace assumed by the parser
|
jtulach@678
|
4939 |
if(this.baseURI === 'http://envjs.com/xml' &&
|
jtulach@678
|
4940 |
namespaceURI === 'http://www.w3.org/1999/xhtml'){
|
jtulach@678
|
4941 |
return this.createAttribute(qualifiedName);
|
jtulach@678
|
4942 |
}
|
jtulach@678
|
4943 |
//console.log('createAttributeNS %s %s', namespaceURI, qualifiedName);
|
jtulach@678
|
4944 |
// test for exceptions
|
jtulach@678
|
4945 |
if (this.implementation.errorChecking) {
|
jtulach@678
|
4946 |
// throw Exception if the Namespace is invalid
|
jtulach@678
|
4947 |
if (!__isValidNamespace__(this, namespaceURI, qualifiedName, true)) {
|
jtulach@678
|
4948 |
throw(new DOMException(DOMException.NAMESPACE_ERR));
|
jtulach@678
|
4949 |
}
|
jtulach@678
|
4950 |
|
jtulach@678
|
4951 |
// throw Exception if the qualifiedName string contains an illegal character
|
jtulach@678
|
4952 |
if (!__isValidName__(qualifiedName)) {
|
jtulach@678
|
4953 |
throw(new DOMException(DOMException.INVALID_CHARACTER_ERR));
|
jtulach@678
|
4954 |
}
|
jtulach@678
|
4955 |
}
|
jtulach@678
|
4956 |
var node = new Attr(this);
|
jtulach@678
|
4957 |
var qname = __parseQName__(qualifiedName);
|
jtulach@678
|
4958 |
node.namespaceURI = namespaceURI === '' ? null : namespaceURI;
|
jtulach@678
|
4959 |
node.prefix = qname.prefix;
|
jtulach@678
|
4960 |
node.nodeName = qualifiedName;
|
jtulach@678
|
4961 |
node.nodeValue = "";
|
jtulach@678
|
4962 |
//console.log('attribute %s %s %s', node.namespaceURI, node.prefix, node.nodeName);
|
jtulach@678
|
4963 |
return node;
|
jtulach@678
|
4964 |
},
|
jtulach@678
|
4965 |
createNamespace : function(qualifiedName) {
|
jtulach@678
|
4966 |
//console.log('createNamespace %s', qualifiedName);
|
jtulach@678
|
4967 |
// create Namespace specifying 'this' as ownerDocument
|
jtulach@678
|
4968 |
var node = new Namespace(this);
|
jtulach@678
|
4969 |
var qname = __parseQName__(qualifiedName);
|
jtulach@678
|
4970 |
|
jtulach@678
|
4971 |
// assign values to properties (and aliases)
|
jtulach@678
|
4972 |
node.prefix = qname.prefix;
|
jtulach@678
|
4973 |
node.localName = qname.localName;
|
jtulach@678
|
4974 |
node.name = qualifiedName;
|
jtulach@678
|
4975 |
node.nodeValue = "";
|
jtulach@678
|
4976 |
|
jtulach@678
|
4977 |
return node;
|
jtulach@678
|
4978 |
},
|
jtulach@678
|
4979 |
|
jtulach@678
|
4980 |
createRange: function(){
|
jtulach@678
|
4981 |
return new Range();
|
jtulach@678
|
4982 |
},
|
jtulach@678
|
4983 |
|
jtulach@678
|
4984 |
evaluate: function(xpathText, contextNode, nsuriMapper, resultType, result){
|
jtulach@678
|
4985 |
//return new XPathExpression().evaluate();
|
jtulach@678
|
4986 |
throw Error('Document.evaluate not supported yet!');
|
jtulach@678
|
4987 |
},
|
jtulach@678
|
4988 |
|
jtulach@678
|
4989 |
getElementById : function(elementId) {
|
jtulach@678
|
4990 |
var retNode = null,
|
jtulach@678
|
4991 |
node;
|
jtulach@678
|
4992 |
// loop through all Elements
|
jtulach@678
|
4993 |
var all = this.getElementsByTagName('*');
|
jtulach@678
|
4994 |
for (var i=0; i < all.length; i++) {
|
jtulach@678
|
4995 |
node = all[i];
|
jtulach@678
|
4996 |
// if id matches
|
jtulach@678
|
4997 |
if (node.id == elementId) {
|
jtulach@678
|
4998 |
//found the node
|
jtulach@678
|
4999 |
retNode = node;
|
jtulach@678
|
5000 |
break;
|
jtulach@678
|
5001 |
}
|
jtulach@678
|
5002 |
}
|
jtulach@678
|
5003 |
return retNode;
|
jtulach@678
|
5004 |
},
|
jtulach@678
|
5005 |
normalizeDocument: function(){
|
jtulach@678
|
5006 |
this.normalize();
|
jtulach@678
|
5007 |
},
|
jtulach@678
|
5008 |
get nodeType(){
|
jtulach@678
|
5009 |
return Node.DOCUMENT_NODE;
|
jtulach@678
|
5010 |
},
|
jtulach@678
|
5011 |
get xml(){
|
jtulach@678
|
5012 |
return this.documentElement.xml;
|
jtulach@678
|
5013 |
},
|
jtulach@678
|
5014 |
toString: function(){
|
jtulach@678
|
5015 |
return "[object XMLDocument]";
|
jtulach@678
|
5016 |
},
|
jtulach@678
|
5017 |
get defaultView(){
|
jtulach@678
|
5018 |
return { getComputedStyle: function(elem){
|
jtulach@678
|
5019 |
return window.getComputedStyle(elem);
|
jtulach@678
|
5020 |
}};
|
jtulach@678
|
5021 |
},
|
jtulach@678
|
5022 |
});
|
jtulach@678
|
5023 |
|
jtulach@678
|
5024 |
/*
|
jtulach@678
|
5025 |
* Helper function
|
jtulach@678
|
5026 |
*
|
jtulach@678
|
5027 |
*/
|
jtulach@678
|
5028 |
__isValidNamespace__ = function(doc, namespaceURI, qualifiedName, isAttribute) {
|
jtulach@678
|
5029 |
|
jtulach@678
|
5030 |
if (doc.importing === true) {
|
jtulach@678
|
5031 |
//we're doing an importNode operation (or a cloneNode) - in both cases, there
|
jtulach@678
|
5032 |
//is no need to perform any namespace checking since the nodes have to have been valid
|
jtulach@678
|
5033 |
//to have gotten into the DOM in the first place
|
jtulach@678
|
5034 |
return true;
|
jtulach@678
|
5035 |
}
|
jtulach@678
|
5036 |
|
jtulach@678
|
5037 |
var valid = true;
|
jtulach@678
|
5038 |
// parse QName
|
jtulach@678
|
5039 |
var qName = __parseQName__(qualifiedName);
|
jtulach@678
|
5040 |
|
jtulach@678
|
5041 |
|
jtulach@678
|
5042 |
//only check for namespaces if we're finished parsing
|
jtulach@678
|
5043 |
if (this.parsing === false) {
|
jtulach@678
|
5044 |
|
jtulach@678
|
5045 |
// if the qualifiedName is malformed
|
jtulach@678
|
5046 |
if (qName.localName.indexOf(":") > -1 ){
|
jtulach@678
|
5047 |
valid = false;
|
jtulach@678
|
5048 |
}
|
jtulach@678
|
5049 |
|
jtulach@678
|
5050 |
if ((valid) && (!isAttribute)) {
|
jtulach@678
|
5051 |
// if the namespaceURI is not null
|
jtulach@678
|
5052 |
if (!namespaceURI) {
|
jtulach@678
|
5053 |
valid = false;
|
jtulach@678
|
5054 |
}
|
jtulach@678
|
5055 |
}
|
jtulach@678
|
5056 |
|
jtulach@678
|
5057 |
// if the qualifiedName has a prefix
|
jtulach@678
|
5058 |
if ((valid) && (qName.prefix === "")) {
|
jtulach@678
|
5059 |
valid = false;
|
jtulach@678
|
5060 |
}
|
jtulach@678
|
5061 |
}
|
jtulach@678
|
5062 |
|
jtulach@678
|
5063 |
// if the qualifiedName has a prefix that is "xml" and the namespaceURI is
|
jtulach@678
|
5064 |
// different from "http://www.w3.org/XML/1998/namespace" [Namespaces].
|
jtulach@678
|
5065 |
if ((valid) && (qName.prefix === "xml") && (namespaceURI !== "http://www.w3.org/XML/1998/namespace")) {
|
jtulach@678
|
5066 |
valid = false;
|
jtulach@678
|
5067 |
}
|
jtulach@678
|
5068 |
|
jtulach@678
|
5069 |
return valid;
|
jtulach@678
|
5070 |
};
|
jtulach@678
|
5071 |
/**
|
jtulach@678
|
5072 |
*
|
jtulach@678
|
5073 |
* This file only handles XML parser.
|
jtulach@678
|
5074 |
* It is extended by parser/domparser.js (and parser/htmlparser.js)
|
jtulach@678
|
5075 |
*
|
jtulach@678
|
5076 |
* This depends on e4x, which some engines may not have.
|
jtulach@678
|
5077 |
*
|
jtulach@678
|
5078 |
* @author thatcher
|
jtulach@678
|
5079 |
*/
|
jtulach@678
|
5080 |
DOMParser = function(principle, documentURI, baseURI) {
|
jtulach@678
|
5081 |
// TODO: why/what should these 3 args do?
|
jtulach@678
|
5082 |
};
|
jtulach@678
|
5083 |
__extend__(DOMParser.prototype,{
|
jtulach@678
|
5084 |
parseFromString: function(xmlstring, mimetype){
|
jtulach@678
|
5085 |
var doc = new Document(new DOMImplementation()),
|
jtulach@678
|
5086 |
e4;
|
jtulach@678
|
5087 |
|
jtulach@678
|
5088 |
// The following are e4x directives.
|
jtulach@678
|
5089 |
// Full spec is here:
|
jtulach@678
|
5090 |
// http://www.ecma-international.org/publications/standards/Ecma-357.htm
|
jtulach@678
|
5091 |
//
|
jtulach@678
|
5092 |
// that is pretty gross, so checkout this summary
|
jtulach@678
|
5093 |
// http://rephrase.net/days/07/06/e4x
|
jtulach@678
|
5094 |
//
|
jtulach@678
|
5095 |
// also see the Mozilla Developer Center:
|
jtulach@678
|
5096 |
// https://developer.mozilla.org/en/E4X
|
jtulach@678
|
5097 |
//
|
jtulach@678
|
5098 |
XML.ignoreComments = false;
|
jtulach@678
|
5099 |
XML.ignoreProcessingInstructions = false;
|
jtulach@678
|
5100 |
XML.ignoreWhitespace = false;
|
jtulach@678
|
5101 |
|
jtulach@678
|
5102 |
// for some reason e4x can't handle initial xml declarations
|
jtulach@678
|
5103 |
// https://bugzilla.mozilla.org/show_bug.cgi?id=336551
|
jtulach@678
|
5104 |
// The official workaround is the big regexp below
|
jtulach@678
|
5105 |
// but simpler one seems to be ok
|
jtulach@678
|
5106 |
// xmlstring = xmlstring.replace(/^<\?xml\s+version\s*=\s*(["'])[^\1]+\1[^?]*\?>/, "");
|
jtulach@678
|
5107 |
//
|
jtulach@678
|
5108 |
xmlstring = xmlstring.replace(/<\?xml.*\?>/);
|
jtulach@678
|
5109 |
|
jtulach@678
|
5110 |
e4 = new XMLList(xmlstring);
|
jtulach@678
|
5111 |
|
jtulach@678
|
5112 |
__toDomNode__(e4, doc, doc);
|
jtulach@678
|
5113 |
|
jtulach@678
|
5114 |
//console.log('xml \n %s', doc.documentElement.xml);
|
jtulach@678
|
5115 |
return doc;
|
jtulach@678
|
5116 |
}
|
jtulach@678
|
5117 |
});
|
jtulach@678
|
5118 |
|
jtulach@678
|
5119 |
var __toDomNode__ = function(e4, parent, doc){
|
jtulach@678
|
5120 |
var xnode,
|
jtulach@678
|
5121 |
domnode,
|
jtulach@678
|
5122 |
children,
|
jtulach@678
|
5123 |
target,
|
jtulach@678
|
5124 |
value,
|
jtulach@678
|
5125 |
length,
|
jtulach@678
|
5126 |
element,
|
jtulach@678
|
5127 |
kind,
|
jtulach@678
|
5128 |
item;
|
jtulach@678
|
5129 |
//console.log('converting e4x node list \n %s', e4)
|
jtulach@678
|
5130 |
|
jtulach@678
|
5131 |
// not using the for each(item in e4) since some engines can't
|
jtulach@678
|
5132 |
// handle the syntax (i.e. says syntax error)
|
jtulach@678
|
5133 |
//
|
jtulach@678
|
5134 |
// for each(xnode in e4) {
|
jtulach@678
|
5135 |
for (item in e4) {
|
jtulach@678
|
5136 |
// NO do not do this if (e4.hasOwnProperty(item)) {
|
jtulach@678
|
5137 |
// breaks spidermonkey
|
jtulach@678
|
5138 |
xnode = e4[item];
|
jtulach@678
|
5139 |
|
jtulach@678
|
5140 |
kind = xnode.nodeKind();
|
jtulach@678
|
5141 |
//console.log('treating node kind %s', kind);
|
jtulach@678
|
5142 |
switch(kind){
|
jtulach@678
|
5143 |
case 'element':
|
jtulach@678
|
5144 |
// add node
|
jtulach@678
|
5145 |
//console.log('creating element %s %s', xnode.localName(), xnode.namespace());
|
jtulach@678
|
5146 |
if(xnode.namespace() && (xnode.namespace()+'') !== ''){
|
jtulach@678
|
5147 |
//console.log('createElementNS %s %s',xnode.namespace()+'', xnode.localName() );
|
jtulach@678
|
5148 |
domnode = doc.createElementNS(xnode.namespace()+'', xnode.localName());
|
jtulach@678
|
5149 |
}else{
|
jtulach@678
|
5150 |
domnode = doc.createElement(xnode.name()+'');
|
jtulach@678
|
5151 |
}
|
jtulach@678
|
5152 |
parent.appendChild(domnode);
|
jtulach@678
|
5153 |
|
jtulach@678
|
5154 |
// add attributes
|
jtulach@678
|
5155 |
__toDomNode__(xnode.attributes(), domnode, doc);
|
jtulach@678
|
5156 |
|
jtulach@678
|
5157 |
// add children
|
jtulach@678
|
5158 |
children = xnode.children();
|
jtulach@678
|
5159 |
length = children.length();
|
jtulach@678
|
5160 |
//console.log('recursing? %s', length ? 'yes' : 'no');
|
jtulach@678
|
5161 |
if (length > 0) {
|
jtulach@678
|
5162 |
__toDomNode__(children, domnode, doc);
|
jtulach@678
|
5163 |
}
|
jtulach@678
|
5164 |
break;
|
jtulach@678
|
5165 |
case 'attribute':
|
jtulach@678
|
5166 |
// console.log('setting attribute %s %s %s',
|
jtulach@678
|
5167 |
// xnode.localName(), xnode.namespace(), xnode.valueOf());
|
jtulach@678
|
5168 |
|
jtulach@678
|
5169 |
//
|
jtulach@678
|
5170 |
// cross-platform alert. The original code used
|
jtulach@678
|
5171 |
// xnode.text() to get the attribute value
|
jtulach@678
|
5172 |
// This worked in Rhino, but did not in Spidermonkey
|
jtulach@678
|
5173 |
// valueOf seemed to work in both
|
jtulach@678
|
5174 |
//
|
jtulach@678
|
5175 |
if(xnode.namespace() && xnode.namespace().prefix){
|
jtulach@678
|
5176 |
//console.log("%s", xnode.namespace().prefix);
|
jtulach@678
|
5177 |
parent.setAttributeNS(xnode.namespace()+'',
|
jtulach@678
|
5178 |
xnode.namespace().prefix+':'+xnode.localName(),
|
jtulach@678
|
5179 |
xnode.valueOf());
|
jtulach@678
|
5180 |
}else if((xnode.name()+'').match('http://www.w3.org/2000/xmlns/::')){
|
jtulach@678
|
5181 |
if(xnode.localName()!=='xmlns'){
|
jtulach@678
|
5182 |
parent.setAttributeNS('http://www.w3.org/2000/xmlns/',
|
jtulach@678
|
5183 |
'xmlns:'+xnode.localName(),
|
jtulach@678
|
5184 |
xnode.valueOf());
|
jtulach@678
|
5185 |
}
|
jtulach@678
|
5186 |
}else{
|
jtulach@678
|
5187 |
parent.setAttribute(xnode.localName()+'', xnode.valueOf());
|
jtulach@678
|
5188 |
}
|
jtulach@678
|
5189 |
break;
|
jtulach@678
|
5190 |
case 'text':
|
jtulach@678
|
5191 |
//console.log('creating text node : %s', xnode);
|
jtulach@678
|
5192 |
domnode = doc.createTextNode(xnode+'');
|
jtulach@678
|
5193 |
parent.appendChild(domnode);
|
jtulach@678
|
5194 |
break;
|
jtulach@678
|
5195 |
case 'comment':
|
jtulach@678
|
5196 |
//console.log('creating comment node : %s', xnode);
|
jtulach@678
|
5197 |
value = xnode+'';
|
jtulach@678
|
5198 |
domnode = doc.createComment(value.substring(4,value.length-3));
|
jtulach@678
|
5199 |
parent.appendChild(domnode);
|
jtulach@678
|
5200 |
break;
|
jtulach@678
|
5201 |
case 'processing-instruction':
|
jtulach@678
|
5202 |
//console.log('creating processing-instruction node : %s', xnode);
|
jtulach@678
|
5203 |
value = xnode+'';
|
jtulach@678
|
5204 |
target = value.split(' ')[0].substring(2);
|
jtulach@678
|
5205 |
value = value.split(' ').splice(1).join(' ').replace('?>','');
|
jtulach@678
|
5206 |
//console.log('creating processing-instruction data : %s', value);
|
jtulach@678
|
5207 |
domnode = doc.createProcessingInstruction(target, value);
|
jtulach@678
|
5208 |
parent.appendChild(domnode);
|
jtulach@678
|
5209 |
break;
|
jtulach@678
|
5210 |
default:
|
jtulach@678
|
5211 |
console.log('e4x DOM ERROR');
|
jtulach@678
|
5212 |
throw new Error("Assertion failed in xml parser");
|
jtulach@678
|
5213 |
}
|
jtulach@678
|
5214 |
}
|
jtulach@678
|
5215 |
};
|
jtulach@678
|
5216 |
/**
|
jtulach@678
|
5217 |
* @author envjs team
|
jtulach@678
|
5218 |
* @class XMLSerializer
|
jtulach@678
|
5219 |
*/
|
jtulach@678
|
5220 |
|
jtulach@678
|
5221 |
XMLSerializer = function() {};
|
jtulach@678
|
5222 |
|
jtulach@678
|
5223 |
__extend__(XMLSerializer.prototype, {
|
jtulach@678
|
5224 |
serializeToString: function(node){
|
jtulach@678
|
5225 |
return node.xml;
|
jtulach@678
|
5226 |
},
|
jtulach@678
|
5227 |
toString : function(){
|
jtulach@678
|
5228 |
return "[object XMLSerializer]";
|
jtulach@678
|
5229 |
}
|
jtulach@678
|
5230 |
});
|
jtulach@678
|
5231 |
|
jtulach@678
|
5232 |
/**
|
jtulach@678
|
5233 |
* @author john resig & the envjs team
|
jtulach@678
|
5234 |
* @uri http://www.envjs.com/
|
jtulach@678
|
5235 |
* @copyright 2008-2010
|
jtulach@678
|
5236 |
* @license MIT
|
jtulach@678
|
5237 |
*/
|
jtulach@678
|
5238 |
//CLOSURE_END
|
jtulach@678
|
5239 |
}());
|
jtulach@678
|
5240 |
/*
|
jtulach@678
|
5241 |
* Envjs event.1.2.13
|
jtulach@678
|
5242 |
* Pure JavaScript Browser Environment
|
jtulach@678
|
5243 |
* By John Resig <http://ejohn.org/> and the Envjs Team
|
jtulach@678
|
5244 |
* Copyright 2008-2010 John Resig, under the MIT License
|
jtulach@678
|
5245 |
*
|
jtulach@678
|
5246 |
* This file simply provides the global definitions we need to
|
jtulach@678
|
5247 |
* be able to correctly implement to core browser DOM Event interfaces.
|
jtulach@678
|
5248 |
*/
|
jtulach@678
|
5249 |
var Event,
|
jtulach@678
|
5250 |
MouseEvent,
|
jtulach@678
|
5251 |
UIEvent,
|
jtulach@678
|
5252 |
KeyboardEvent,
|
jtulach@678
|
5253 |
MutationEvent,
|
jtulach@678
|
5254 |
DocumentEvent,
|
jtulach@678
|
5255 |
EventTarget,
|
jtulach@678
|
5256 |
EventException,
|
jtulach@678
|
5257 |
//nonstandard but very useful for implementing mutation events
|
jtulach@678
|
5258 |
//among other things like general profiling
|
jtulach@678
|
5259 |
Aspect;
|
jtulach@678
|
5260 |
/*
|
jtulach@678
|
5261 |
* Envjs event.1.2.13
|
jtulach@678
|
5262 |
* Pure JavaScript Browser Environment
|
jtulach@678
|
5263 |
* By John Resig <http://ejohn.org/> and the Envjs Team
|
jtulach@678
|
5264 |
* Copyright 2008-2010 John Resig, under the MIT License
|
jtulach@678
|
5265 |
*/
|
jtulach@678
|
5266 |
|
jtulach@678
|
5267 |
//CLOSURE_START
|
jtulach@678
|
5268 |
(function(){
|
jtulach@678
|
5269 |
|
jtulach@678
|
5270 |
|
jtulach@678
|
5271 |
|
jtulach@678
|
5272 |
|
jtulach@678
|
5273 |
|
jtulach@678
|
5274 |
/**
|
jtulach@678
|
5275 |
* @author john resig
|
jtulach@678
|
5276 |
*/
|
jtulach@678
|
5277 |
// Helper method for extending one object with another.
|
jtulach@678
|
5278 |
function __extend__(a,b) {
|
jtulach@678
|
5279 |
for ( var i in b ) {
|
jtulach@678
|
5280 |
var g = b.__lookupGetter__(i), s = b.__lookupSetter__(i);
|
jtulach@678
|
5281 |
if ( g || s ) {
|
jtulach@678
|
5282 |
if ( g ) { a.__defineGetter__(i, g); }
|
jtulach@678
|
5283 |
if ( s ) { a.__defineSetter__(i, s); }
|
jtulach@678
|
5284 |
} else {
|
jtulach@678
|
5285 |
a[i] = b[i];
|
jtulach@678
|
5286 |
}
|
jtulach@678
|
5287 |
} return a;
|
jtulach@678
|
5288 |
}
|
jtulach@678
|
5289 |
|
jtulach@678
|
5290 |
/**
|
jtulach@678
|
5291 |
* @author john resig
|
jtulach@678
|
5292 |
*/
|
jtulach@678
|
5293 |
//from jQuery
|
jtulach@678
|
5294 |
function __setArray__( target, array ) {
|
jtulach@678
|
5295 |
// Resetting the length to 0, then using the native Array push
|
jtulach@678
|
5296 |
// is a super-fast way to populate an object with array-like properties
|
jtulach@678
|
5297 |
target.length = 0;
|
jtulach@678
|
5298 |
Array.prototype.push.apply( target, array );
|
jtulach@678
|
5299 |
}
|
jtulach@678
|
5300 |
/**
|
jtulach@678
|
5301 |
* Borrowed with love from:
|
jtulach@678
|
5302 |
*
|
jtulach@678
|
5303 |
* jQuery AOP - jQuery plugin to add features of aspect-oriented programming (AOP) to jQuery.
|
jtulach@678
|
5304 |
* http://jquery-aop.googlecode.com/
|
jtulach@678
|
5305 |
*
|
jtulach@678
|
5306 |
* Licensed under the MIT license:
|
jtulach@678
|
5307 |
* http://www.opensource.org/licenses/mit-license.php
|
jtulach@678
|
5308 |
*
|
jtulach@678
|
5309 |
* Version: 1.1
|
jtulach@678
|
5310 |
*/
|
jtulach@678
|
5311 |
(function() {
|
jtulach@678
|
5312 |
|
jtulach@678
|
5313 |
var _after = 1;
|
jtulach@678
|
5314 |
var _before = 2;
|
jtulach@678
|
5315 |
var _around = 3;
|
jtulach@678
|
5316 |
var _intro = 4;
|
jtulach@678
|
5317 |
var _regexEnabled = true;
|
jtulach@678
|
5318 |
|
jtulach@678
|
5319 |
/**
|
jtulach@678
|
5320 |
* Private weaving function.
|
jtulach@678
|
5321 |
*/
|
jtulach@678
|
5322 |
var weaveOne = function(source, method, advice) {
|
jtulach@678
|
5323 |
|
jtulach@678
|
5324 |
var old = source[method];
|
jtulach@678
|
5325 |
|
jtulach@678
|
5326 |
var aspect;
|
jtulach@678
|
5327 |
if (advice.type == _after)
|
jtulach@678
|
5328 |
aspect = function() {
|
jtulach@678
|
5329 |
var returnValue = old.apply(this, arguments);
|
jtulach@678
|
5330 |
return advice.value.apply(this, [returnValue, method]);
|
jtulach@678
|
5331 |
};
|
jtulach@678
|
5332 |
else if (advice.type == _before)
|
jtulach@678
|
5333 |
aspect = function() {
|
jtulach@678
|
5334 |
advice.value.apply(this, [arguments, method]);
|
jtulach@678
|
5335 |
return old.apply(this, arguments);
|
jtulach@678
|
5336 |
};
|
jtulach@678
|
5337 |
else if (advice.type == _intro)
|
jtulach@678
|
5338 |
aspect = function() {
|
jtulach@678
|
5339 |
return advice.value.apply(this, arguments);
|
jtulach@678
|
5340 |
};
|
jtulach@678
|
5341 |
else if (advice.type == _around) {
|
jtulach@678
|
5342 |
aspect = function() {
|
jtulach@678
|
5343 |
var invocation = { object: this, args: arguments };
|
jtulach@678
|
5344 |
return advice.value.apply(invocation.object, [{ arguments: invocation.args, method: method, proceed :
|
jtulach@678
|
5345 |
function() {
|
jtulach@678
|
5346 |
return old.apply(invocation.object, invocation.args);
|
jtulach@678
|
5347 |
}
|
jtulach@678
|
5348 |
}] );
|
jtulach@678
|
5349 |
};
|
jtulach@678
|
5350 |
}
|
jtulach@678
|
5351 |
|
jtulach@678
|
5352 |
aspect.unweave = function() {
|
jtulach@678
|
5353 |
source[method] = old;
|
jtulach@678
|
5354 |
pointcut = source = aspect = old = null;
|
jtulach@678
|
5355 |
};
|
jtulach@678
|
5356 |
|
jtulach@678
|
5357 |
source[method] = aspect;
|
jtulach@678
|
5358 |
|
jtulach@678
|
5359 |
return aspect;
|
jtulach@678
|
5360 |
|
jtulach@678
|
5361 |
};
|
jtulach@678
|
5362 |
|
jtulach@678
|
5363 |
|
jtulach@678
|
5364 |
/**
|
jtulach@678
|
5365 |
* Private weaver and pointcut parser.
|
jtulach@678
|
5366 |
*/
|
jtulach@678
|
5367 |
var weave = function(pointcut, advice)
|
jtulach@678
|
5368 |
{
|
jtulach@678
|
5369 |
|
jtulach@678
|
5370 |
var source = (typeof(pointcut.target.prototype) != 'undefined') ? pointcut.target.prototype : pointcut.target;
|
jtulach@678
|
5371 |
var advices = [];
|
jtulach@678
|
5372 |
|
jtulach@678
|
5373 |
// If it's not an introduction and no method was found, try with regex...
|
jtulach@678
|
5374 |
if (advice.type != _intro && typeof(source[pointcut.method]) == 'undefined')
|
jtulach@678
|
5375 |
{
|
jtulach@678
|
5376 |
|
jtulach@678
|
5377 |
for (var method in source)
|
jtulach@678
|
5378 |
{
|
jtulach@678
|
5379 |
if (source[method] != null && source[method] instanceof Function && method.match(pointcut.method))
|
jtulach@678
|
5380 |
{
|
jtulach@678
|
5381 |
advices[advices.length] = weaveOne(source, method, advice);
|
jtulach@678
|
5382 |
}
|
jtulach@678
|
5383 |
}
|
jtulach@678
|
5384 |
|
jtulach@678
|
5385 |
if (advices.length == 0)
|
jtulach@678
|
5386 |
throw 'No method: ' + pointcut.method;
|
jtulach@678
|
5387 |
|
jtulach@678
|
5388 |
}
|
jtulach@678
|
5389 |
else
|
jtulach@678
|
5390 |
{
|
jtulach@678
|
5391 |
// Return as an array of one element
|
jtulach@678
|
5392 |
advices[0] = weaveOne(source, pointcut.method, advice);
|
jtulach@678
|
5393 |
}
|
jtulach@678
|
5394 |
|
jtulach@678
|
5395 |
return _regexEnabled ? advices : advices[0];
|
jtulach@678
|
5396 |
|
jtulach@678
|
5397 |
};
|
jtulach@678
|
5398 |
|
jtulach@678
|
5399 |
Aspect =
|
jtulach@678
|
5400 |
{
|
jtulach@678
|
5401 |
/**
|
jtulach@678
|
5402 |
* Creates an advice after the defined point-cut. The advice will be executed after the point-cut method
|
jtulach@678
|
5403 |
* has completed execution successfully, and will receive one parameter with the result of the execution.
|
jtulach@678
|
5404 |
* This function returns an array of weaved aspects (Function).
|
jtulach@678
|
5405 |
*
|
jtulach@678
|
5406 |
* @example jQuery.aop.after( {target: window, method: 'MyGlobalMethod'}, function(result) { alert('Returned: ' + result); } );
|
jtulach@678
|
5407 |
* @result Array<Function>
|
jtulach@678
|
5408 |
*
|
jtulach@678
|
5409 |
* @example jQuery.aop.after( {target: String, method: 'indexOf'}, function(index) { alert('Result found at: ' + index + ' on:' + this); } );
|
jtulach@678
|
5410 |
* @result Array<Function>
|
jtulach@678
|
5411 |
*
|
jtulach@678
|
5412 |
* @name after
|
jtulach@678
|
5413 |
* @param Map pointcut Definition of the point-cut to apply the advice. A point-cut is the definition of the object/s and method/s to be weaved.
|
jtulach@678
|
5414 |
* @option Object target Target object to be weaved.
|
jtulach@678
|
5415 |
* @option String method Name of the function to be weaved. Regex are supported, but not on built-in objects.
|
jtulach@678
|
5416 |
* @param Function advice Function containing the code that will get called after the execution of the point-cut. It receives one parameter
|
jtulach@678
|
5417 |
* with the result of the point-cut's execution.
|
jtulach@678
|
5418 |
*
|
jtulach@678
|
5419 |
* @type Array<Function>
|
jtulach@678
|
5420 |
* @cat Plugins/General
|
jtulach@678
|
5421 |
*/
|
jtulach@678
|
5422 |
after : function(pointcut, advice)
|
jtulach@678
|
5423 |
{
|
jtulach@678
|
5424 |
return weave( pointcut, { type: _after, value: advice } );
|
jtulach@678
|
5425 |
},
|
jtulach@678
|
5426 |
|
jtulach@678
|
5427 |
/**
|
jtulach@678
|
5428 |
* Creates an advice before the defined point-cut. The advice will be executed before the point-cut method
|
jtulach@678
|
5429 |
* but cannot modify the behavior of the method, or prevent its execution.
|
jtulach@678
|
5430 |
* This function returns an array of weaved aspects (Function).
|
jtulach@678
|
5431 |
*
|
jtulach@678
|
5432 |
* @example jQuery.aop.before( {target: window, method: 'MyGlobalMethod'}, function() { alert('About to execute MyGlobalMethod'); } );
|
jtulach@678
|
5433 |
* @result Array<Function>
|
jtulach@678
|
5434 |
*
|
jtulach@678
|
5435 |
* @example jQuery.aop.before( {target: String, method: 'indexOf'}, function(index) { alert('About to execute String.indexOf on: ' + this); } );
|
jtulach@678
|
5436 |
* @result Array<Function>
|
jtulach@678
|
5437 |
*
|
jtulach@678
|
5438 |
* @name before
|
jtulach@678
|
5439 |
* @param Map pointcut Definition of the point-cut to apply the advice. A point-cut is the definition of the object/s and method/s to be weaved.
|
jtulach@678
|
5440 |
* @option Object target Target object to be weaved.
|
jtulach@678
|
5441 |
* @option String method Name of the function to be weaved. Regex are supported, but not on built-in objects.
|
jtulach@678
|
5442 |
* @param Function advice Function containing the code that will get called before the execution of the point-cut.
|
jtulach@678
|
5443 |
*
|
jtulach@678
|
5444 |
* @type Array<Function>
|
jtulach@678
|
5445 |
* @cat Plugins/General
|
jtulach@678
|
5446 |
*/
|
jtulach@678
|
5447 |
before : function(pointcut, advice)
|
jtulach@678
|
5448 |
{
|
jtulach@678
|
5449 |
return weave( pointcut, { type: _before, value: advice } );
|
jtulach@678
|
5450 |
},
|
jtulach@678
|
5451 |
|
jtulach@678
|
5452 |
|
jtulach@678
|
5453 |
/**
|
jtulach@678
|
5454 |
* Creates an advice 'around' the defined point-cut. This type of advice can control the point-cut method execution by calling
|
jtulach@678
|
5455 |
* the functions '.proceed()' on the 'invocation' object, and also, can modify the arguments collection before sending them to the function call.
|
jtulach@678
|
5456 |
* This function returns an array of weaved aspects (Function).
|
jtulach@678
|
5457 |
*
|
jtulach@678
|
5458 |
* @example jQuery.aop.around( {target: window, method: 'MyGlobalMethod'}, function(invocation) {
|
jtulach@678
|
5459 |
* alert('# of Arguments: ' + invocation.arguments.length);
|
jtulach@678
|
5460 |
* return invocation.proceed();
|
jtulach@678
|
5461 |
* } );
|
jtulach@678
|
5462 |
* @result Array<Function>
|
jtulach@678
|
5463 |
*
|
jtulach@678
|
5464 |
* @example jQuery.aop.around( {target: String, method: 'indexOf'}, function(invocation) {
|
jtulach@678
|
5465 |
* alert('Searching: ' + invocation.arguments[0] + ' on: ' + this);
|
jtulach@678
|
5466 |
* return invocation.proceed();
|
jtulach@678
|
5467 |
* } );
|
jtulach@678
|
5468 |
* @result Array<Function>
|
jtulach@678
|
5469 |
*
|
jtulach@678
|
5470 |
* @example jQuery.aop.around( {target: window, method: /Get(\d+)/}, function(invocation) {
|
jtulach@678
|
5471 |
* alert('Executing ' + invocation.method);
|
jtulach@678
|
5472 |
* return invocation.proceed();
|
jtulach@678
|
5473 |
* } );
|
jtulach@678
|
5474 |
* @desc Matches all global methods starting with 'Get' and followed by a number.
|
jtulach@678
|
5475 |
* @result Array<Function>
|
jtulach@678
|
5476 |
*
|
jtulach@678
|
5477 |
*
|
jtulach@678
|
5478 |
* @name around
|
jtulach@678
|
5479 |
* @param Map pointcut Definition of the point-cut to apply the advice. A point-cut is the definition of the object/s and method/s to be weaved.
|
jtulach@678
|
5480 |
* @option Object target Target object to be weaved.
|
jtulach@678
|
5481 |
* @option String method Name of the function to be weaved. Regex are supported, but not on built-in objects.
|
jtulach@678
|
5482 |
* @param Function advice Function containing the code that will get called around the execution of the point-cut. This advice will be called with one
|
jtulach@678
|
5483 |
* argument containing one function '.proceed()', the collection of arguments '.arguments', and the matched method name '.method'.
|
jtulach@678
|
5484 |
*
|
jtulach@678
|
5485 |
* @type Array<Function>
|
jtulach@678
|
5486 |
* @cat Plugins/General
|
jtulach@678
|
5487 |
*/
|
jtulach@678
|
5488 |
around : function(pointcut, advice)
|
jtulach@678
|
5489 |
{
|
jtulach@678
|
5490 |
return weave( pointcut, { type: _around, value: advice } );
|
jtulach@678
|
5491 |
},
|
jtulach@678
|
5492 |
|
jtulach@678
|
5493 |
/**
|
jtulach@678
|
5494 |
* Creates an introduction on the defined point-cut. This type of advice replaces any existing methods with the same
|
jtulach@678
|
5495 |
* name. To restore them, just unweave it.
|
jtulach@678
|
5496 |
* This function returns an array with only one weaved aspect (Function).
|
jtulach@678
|
5497 |
*
|
jtulach@678
|
5498 |
* @example jQuery.aop.introduction( {target: window, method: 'MyGlobalMethod'}, function(result) { alert('Returned: ' + result); } );
|
jtulach@678
|
5499 |
* @result Array<Function>
|
jtulach@678
|
5500 |
*
|
jtulach@678
|
5501 |
* @example jQuery.aop.introduction( {target: String, method: 'log'}, function() { alert('Console: ' + this); } );
|
jtulach@678
|
5502 |
* @result Array<Function>
|
jtulach@678
|
5503 |
*
|
jtulach@678
|
5504 |
* @name introduction
|
jtulach@678
|
5505 |
* @param Map pointcut Definition of the point-cut to apply the advice. A point-cut is the definition of the object/s and method/s to be weaved.
|
jtulach@678
|
5506 |
* @option Object target Target object to be weaved.
|
jtulach@678
|
5507 |
* @option String method Name of the function to be weaved.
|
jtulach@678
|
5508 |
* @param Function advice Function containing the code that will be executed on the point-cut.
|
jtulach@678
|
5509 |
*
|
jtulach@678
|
5510 |
* @type Array<Function>
|
jtulach@678
|
5511 |
* @cat Plugins/General
|
jtulach@678
|
5512 |
*/
|
jtulach@678
|
5513 |
introduction : function(pointcut, advice)
|
jtulach@678
|
5514 |
{
|
jtulach@678
|
5515 |
return weave( pointcut, { type: _intro, value: advice } );
|
jtulach@678
|
5516 |
},
|
jtulach@678
|
5517 |
|
jtulach@678
|
5518 |
/**
|
jtulach@678
|
5519 |
* Configures global options.
|
jtulach@678
|
5520 |
*
|
jtulach@678
|
5521 |
* @name setup
|
jtulach@678
|
5522 |
* @param Map settings Configuration options.
|
jtulach@678
|
5523 |
* @option Boolean regexMatch Enables/disables regex matching of method names.
|
jtulach@678
|
5524 |
*
|
jtulach@678
|
5525 |
* @example jQuery.aop.setup( { regexMatch: false } );
|
jtulach@678
|
5526 |
* @desc Disable regex matching.
|
jtulach@678
|
5527 |
*
|
jtulach@678
|
5528 |
* @type Void
|
jtulach@678
|
5529 |
* @cat Plugins/General
|
jtulach@678
|
5530 |
*/
|
jtulach@678
|
5531 |
setup: function(settings)
|
jtulach@678
|
5532 |
{
|
jtulach@678
|
5533 |
_regexEnabled = settings.regexMatch;
|
jtulach@678
|
5534 |
}
|
jtulach@678
|
5535 |
};
|
jtulach@678
|
5536 |
|
jtulach@678
|
5537 |
})();
|
jtulach@678
|
5538 |
|
jtulach@678
|
5539 |
|
jtulach@678
|
5540 |
|
jtulach@678
|
5541 |
|
jtulach@678
|
5542 |
/**
|
jtulach@678
|
5543 |
* @name EventTarget
|
jtulach@678
|
5544 |
* @w3c:domlevel 2
|
jtulach@678
|
5545 |
* @uri -//TODO: paste dom event level 2 w3c spc uri here
|
jtulach@678
|
5546 |
*/
|
jtulach@678
|
5547 |
EventTarget = function(){};
|
jtulach@678
|
5548 |
EventTarget.prototype.addEventListener = function(type, fn, phase){
|
jtulach@678
|
5549 |
__addEventListener__(this, type, fn, phase);
|
jtulach@678
|
5550 |
};
|
jtulach@678
|
5551 |
EventTarget.prototype.removeEventListener = function(type, fn){
|
jtulach@678
|
5552 |
__removeEventListener__(this, type, fn);
|
jtulach@678
|
5553 |
};
|
jtulach@678
|
5554 |
EventTarget.prototype.dispatchEvent = function(event, bubbles){
|
jtulach@678
|
5555 |
__dispatchEvent__(this, event, bubbles);
|
jtulach@678
|
5556 |
};
|
jtulach@678
|
5557 |
|
jtulach@678
|
5558 |
__extend__(Node.prototype, EventTarget.prototype);
|
jtulach@678
|
5559 |
|
jtulach@678
|
5560 |
|
jtulach@678
|
5561 |
var $events = [{}];
|
jtulach@678
|
5562 |
|
jtulach@678
|
5563 |
function __addEventListener__(target, type, fn, phase){
|
jtulach@678
|
5564 |
phase = !!phase?"CAPTURING":"BUBBLING";
|
jtulach@678
|
5565 |
if ( !target.uuid ) {
|
jtulach@678
|
5566 |
//console.log('event uuid %s %s', target, target.uuid);
|
jtulach@678
|
5567 |
target.uuid = $events.length+'';
|
jtulach@678
|
5568 |
}
|
jtulach@678
|
5569 |
if ( !$events[target.uuid] ) {
|
jtulach@678
|
5570 |
//console.log('creating listener for target: %s %s', target, target.uuid);
|
jtulach@678
|
5571 |
$events[target.uuid] = {};
|
jtulach@678
|
5572 |
}
|
jtulach@678
|
5573 |
if ( !$events[target.uuid][type] ){
|
jtulach@678
|
5574 |
//console.log('creating listener for type: %s %s %s', target, target.uuid, type);
|
jtulach@678
|
5575 |
$events[target.uuid][type] = {
|
jtulach@678
|
5576 |
CAPTURING:[],
|
jtulach@678
|
5577 |
BUBBLING:[]
|
jtulach@678
|
5578 |
};
|
jtulach@678
|
5579 |
}
|
jtulach@678
|
5580 |
if ( $events[target.uuid][type][phase].indexOf( fn ) < 0 ){
|
jtulach@678
|
5581 |
//console.log('adding event listener %s %s %s %s %s %s', target, target.uuid, type, phase,
|
jtulach@678
|
5582 |
// $events[target.uuid][type][phase].length, $events[target.uuid][type][phase].indexOf( fn ));
|
jtulach@678
|
5583 |
//console.log('creating listener for function: %s %s %s', target, target.uuid, phase);
|
jtulach@678
|
5584 |
$events[target.uuid][type][phase].push( fn );
|
jtulach@678
|
5585 |
//console.log('adding event listener %s %s %s %s %s %s', target, target.uuid, type, phase,
|
jtulach@678
|
5586 |
// $events[target.uuid][type][phase].length, $events[target.uuid][type][phase].indexOf( fn ));
|
jtulach@678
|
5587 |
}
|
jtulach@678
|
5588 |
//console.log('registered event listeners %s', $events.length);
|
jtulach@678
|
5589 |
}
|
jtulach@678
|
5590 |
|
jtulach@678
|
5591 |
function __removeEventListener__(target, type, fn, phase){
|
jtulach@678
|
5592 |
|
jtulach@678
|
5593 |
phase = !!phase?"CAPTURING":"BUBBLING";
|
jtulach@678
|
5594 |
if ( !target.uuid ) {
|
jtulach@678
|
5595 |
return;
|
jtulach@678
|
5596 |
}
|
jtulach@678
|
5597 |
if ( !$events[target.uuid] ) {
|
jtulach@678
|
5598 |
return;
|
jtulach@678
|
5599 |
}
|
jtulach@678
|
5600 |
if(type == '*'){
|
jtulach@678
|
5601 |
//used to clean all event listeners for a given node
|
jtulach@678
|
5602 |
//console.log('cleaning all event listeners for node %s %s',target, target.uuid);
|
jtulach@678
|
5603 |
delete $events[target.uuid];
|
jtulach@678
|
5604 |
return;
|
jtulach@678
|
5605 |
}else if ( !$events[target.uuid][type] ){
|
jtulach@678
|
5606 |
return;
|
jtulach@678
|
5607 |
}
|
jtulach@678
|
5608 |
$events[target.uuid][type][phase] =
|
jtulach@678
|
5609 |
$events[target.uuid][type][phase].filter(function(f){
|
jtulach@678
|
5610 |
//console.log('removing event listener %s %s %s %s', target, type, phase, fn);
|
jtulach@678
|
5611 |
return f != fn;
|
jtulach@678
|
5612 |
});
|
jtulach@678
|
5613 |
}
|
jtulach@678
|
5614 |
|
jtulach@678
|
5615 |
var __eventuuid__ = 0;
|
jtulach@678
|
5616 |
function __dispatchEvent__(target, event, bubbles){
|
jtulach@678
|
5617 |
|
jtulach@678
|
5618 |
if (!event.uuid) {
|
jtulach@678
|
5619 |
event.uuid = __eventuuid__++;
|
jtulach@678
|
5620 |
}
|
jtulach@678
|
5621 |
//the window scope defines the $event object, for IE(^^^) compatibility;
|
jtulach@678
|
5622 |
//$event = event;
|
jtulach@678
|
5623 |
//console.log('dispatching event %s', event.uuid);
|
jtulach@678
|
5624 |
if (bubbles === undefined || bubbles === null) {
|
jtulach@678
|
5625 |
bubbles = true;
|
jtulach@678
|
5626 |
}
|
jtulach@678
|
5627 |
|
jtulach@678
|
5628 |
if (!event.target) {
|
jtulach@678
|
5629 |
event.target = target;
|
jtulach@678
|
5630 |
}
|
jtulach@678
|
5631 |
|
jtulach@678
|
5632 |
//console.log('dispatching? %s %s %s', target, event.type, bubbles);
|
jtulach@678
|
5633 |
if ( event.type && (target.nodeType || target === window )) {
|
jtulach@678
|
5634 |
|
jtulach@678
|
5635 |
//console.log('dispatching event %s %s %s', target, event.type, bubbles);
|
jtulach@678
|
5636 |
__captureEvent__(target, event);
|
jtulach@678
|
5637 |
|
jtulach@678
|
5638 |
event.eventPhase = Event.AT_TARGET;
|
jtulach@678
|
5639 |
if ( target.uuid && $events[target.uuid] && $events[target.uuid][event.type] ) {
|
jtulach@678
|
5640 |
event.currentTarget = target;
|
jtulach@678
|
5641 |
//console.log('dispatching %s %s %s %s', target, event.type,
|
jtulach@678
|
5642 |
// $events[target.uuid][event.type]['CAPTURING'].length);
|
jtulach@678
|
5643 |
$events[target.uuid][event.type].CAPTURING.forEach(function(fn){
|
jtulach@678
|
5644 |
//console.log('AT_TARGET (CAPTURING) event %s', fn);
|
jtulach@678
|
5645 |
var returnValue = fn( event );
|
jtulach@678
|
5646 |
//console.log('AT_TARGET (CAPTURING) return value %s', returnValue);
|
jtulach@678
|
5647 |
if(returnValue === false){
|
jtulach@678
|
5648 |
event.stopPropagation();
|
jtulach@678
|
5649 |
}
|
jtulach@678
|
5650 |
});
|
jtulach@678
|
5651 |
//console.log('dispatching %s %s %s %s', target, event.type,
|
jtulach@678
|
5652 |
// $events[target.uuid][event.type]['BUBBLING'].length);
|
jtulach@678
|
5653 |
$events[target.uuid][event.type].BUBBLING.forEach(function(fn){
|
jtulach@678
|
5654 |
//console.log('AT_TARGET (BUBBLING) event %s', fn);
|
jtulach@678
|
5655 |
var returnValue = fn( event );
|
jtulach@678
|
5656 |
//console.log('AT_TARGET (BUBBLING) return value %s', returnValue);
|
jtulach@678
|
5657 |
if(returnValue === false){
|
jtulach@678
|
5658 |
event.stopPropagation();
|
jtulach@678
|
5659 |
}
|
jtulach@678
|
5660 |
});
|
jtulach@678
|
5661 |
}
|
jtulach@678
|
5662 |
if (target["on" + event.type]) {
|
jtulach@678
|
5663 |
target["on" + event.type](event);
|
jtulach@678
|
5664 |
}
|
jtulach@678
|
5665 |
if (bubbles && !event.cancelled){
|
jtulach@678
|
5666 |
__bubbleEvent__(target, event);
|
jtulach@678
|
5667 |
}
|
jtulach@678
|
5668 |
if(!event._preventDefault){
|
jtulach@678
|
5669 |
//At this point I'm guessing that just HTMLEvents are concerned
|
jtulach@678
|
5670 |
//with default behavior being executed in a browser but I could be
|
jtulach@678
|
5671 |
//wrong as usual. The goal is much more to filter at this point
|
jtulach@678
|
5672 |
//what events have no need to be handled
|
jtulach@678
|
5673 |
//console.log('triggering default behavior for %s', event.type);
|
jtulach@678
|
5674 |
if(event.type in Envjs.defaultEventBehaviors){
|
jtulach@678
|
5675 |
Envjs.defaultEventBehaviors[event.type](event);
|
jtulach@678
|
5676 |
}
|
jtulach@678
|
5677 |
}
|
jtulach@678
|
5678 |
//console.log('deleting event %s', event.uuid);
|
jtulach@678
|
5679 |
event.target = null;
|
jtulach@678
|
5680 |
event = null;
|
jtulach@678
|
5681 |
}else{
|
jtulach@678
|
5682 |
throw new EventException(EventException.UNSPECIFIED_EVENT_TYPE_ERR);
|
jtulach@678
|
5683 |
}
|
jtulach@678
|
5684 |
}
|
jtulach@678
|
5685 |
|
jtulach@678
|
5686 |
function __captureEvent__(target, event){
|
jtulach@678
|
5687 |
var ancestorStack = [],
|
jtulach@678
|
5688 |
parent = target.parentNode;
|
jtulach@678
|
5689 |
|
jtulach@678
|
5690 |
event.eventPhase = Event.CAPTURING_PHASE;
|
jtulach@678
|
5691 |
while(parent){
|
jtulach@678
|
5692 |
if(parent.uuid && $events[parent.uuid] && $events[parent.uuid][event.type]){
|
jtulach@678
|
5693 |
ancestorStack.push(parent);
|
jtulach@678
|
5694 |
}
|
jtulach@678
|
5695 |
parent = parent.parentNode;
|
jtulach@678
|
5696 |
}
|
jtulach@678
|
5697 |
while(ancestorStack.length && !event.cancelled){
|
jtulach@678
|
5698 |
event.currentTarget = ancestorStack.pop();
|
jtulach@678
|
5699 |
if($events[event.currentTarget.uuid] && $events[event.currentTarget.uuid][event.type]){
|
jtulach@678
|
5700 |
$events[event.currentTarget.uuid][event.type].CAPTURING.forEach(function(fn){
|
jtulach@678
|
5701 |
var returnValue = fn( event );
|
jtulach@678
|
5702 |
if(returnValue === false){
|
jtulach@678
|
5703 |
event.stopPropagation();
|
jtulach@678
|
5704 |
}
|
jtulach@678
|
5705 |
});
|
jtulach@678
|
5706 |
}
|
jtulach@678
|
5707 |
}
|
jtulach@678
|
5708 |
}
|
jtulach@678
|
5709 |
|
jtulach@678
|
5710 |
function __bubbleEvent__(target, event){
|
jtulach@678
|
5711 |
var parent = target.parentNode;
|
jtulach@678
|
5712 |
event.eventPhase = Event.BUBBLING_PHASE;
|
jtulach@678
|
5713 |
while(parent){
|
jtulach@678
|
5714 |
if(parent.uuid && $events[parent.uuid] && $events[parent.uuid][event.type] ){
|
jtulach@678
|
5715 |
event.currentTarget = parent;
|
jtulach@678
|
5716 |
$events[event.currentTarget.uuid][event.type].BUBBLING.forEach(function(fn){
|
jtulach@678
|
5717 |
var returnValue = fn( event );
|
jtulach@678
|
5718 |
if(returnValue === false){
|
jtulach@678
|
5719 |
event.stopPropagation();
|
jtulach@678
|
5720 |
}
|
jtulach@678
|
5721 |
});
|
jtulach@678
|
5722 |
}
|
jtulach@678
|
5723 |
parent = parent.parentNode;
|
jtulach@678
|
5724 |
}
|
jtulach@678
|
5725 |
}
|
jtulach@678
|
5726 |
|
jtulach@678
|
5727 |
/**
|
jtulach@678
|
5728 |
* @class Event
|
jtulach@678
|
5729 |
*/
|
jtulach@678
|
5730 |
Event = function(options){
|
jtulach@678
|
5731 |
// event state is kept read-only by forcing
|
jtulach@678
|
5732 |
// a new object for each event. This may not
|
jtulach@678
|
5733 |
// be appropriate in the long run and we'll
|
jtulach@678
|
5734 |
// have to decide if we simply dont adhere to
|
jtulach@678
|
5735 |
// the read-only restriction of the specification
|
jtulach@678
|
5736 |
this._bubbles = true;
|
jtulach@678
|
5737 |
this._cancelable = true;
|
jtulach@678
|
5738 |
this._cancelled = false;
|
jtulach@678
|
5739 |
this._currentTarget = null;
|
jtulach@678
|
5740 |
this._target = null;
|
jtulach@678
|
5741 |
this._eventPhase = Event.AT_TARGET;
|
jtulach@678
|
5742 |
this._timeStamp = new Date().getTime();
|
jtulach@678
|
5743 |
this._preventDefault = false;
|
jtulach@678
|
5744 |
this._stopPropogation = false;
|
jtulach@678
|
5745 |
};
|
jtulach@678
|
5746 |
|
jtulach@678
|
5747 |
__extend__(Event.prototype,{
|
jtulach@678
|
5748 |
get bubbles(){return this._bubbles;},
|
jtulach@678
|
5749 |
get cancelable(){return this._cancelable;},
|
jtulach@678
|
5750 |
get currentTarget(){return this._currentTarget;},
|
jtulach@678
|
5751 |
set currentTarget(currentTarget){ this._currentTarget = currentTarget; },
|
jtulach@678
|
5752 |
get eventPhase(){return this._eventPhase;},
|
jtulach@678
|
5753 |
set eventPhase(eventPhase){this._eventPhase = eventPhase;},
|
jtulach@678
|
5754 |
get target(){return this._target;},
|
jtulach@678
|
5755 |
set target(target){ this._target = target;},
|
jtulach@678
|
5756 |
get timeStamp(){return this._timeStamp;},
|
jtulach@678
|
5757 |
get type(){return this._type;},
|
jtulach@678
|
5758 |
initEvent: function(type, bubbles, cancelable){
|
jtulach@678
|
5759 |
this._type=type?type:'';
|
jtulach@678
|
5760 |
this._bubbles=!!bubbles;
|
jtulach@678
|
5761 |
this._cancelable=!!cancelable;
|
jtulach@678
|
5762 |
},
|
jtulach@678
|
5763 |
preventDefault: function(){
|
jtulach@678
|
5764 |
this._preventDefault = true;
|
jtulach@678
|
5765 |
},
|
jtulach@678
|
5766 |
stopPropagation: function(){
|
jtulach@678
|
5767 |
if(this._cancelable){
|
jtulach@678
|
5768 |
this._cancelled = true;
|
jtulach@678
|
5769 |
this._bubbles = false;
|
jtulach@678
|
5770 |
}
|
jtulach@678
|
5771 |
},
|
jtulach@678
|
5772 |
get cancelled(){
|
jtulach@678
|
5773 |
return this._cancelled;
|
jtulach@678
|
5774 |
},
|
jtulach@678
|
5775 |
toString: function(){
|
jtulach@678
|
5776 |
return '[object Event]';
|
jtulach@678
|
5777 |
}
|
jtulach@678
|
5778 |
});
|
jtulach@678
|
5779 |
|
jtulach@678
|
5780 |
__extend__(Event,{
|
jtulach@678
|
5781 |
CAPTURING_PHASE : 1,
|
jtulach@678
|
5782 |
AT_TARGET : 2,
|
jtulach@678
|
5783 |
BUBBLING_PHASE : 3
|
jtulach@678
|
5784 |
});
|
jtulach@678
|
5785 |
|
jtulach@678
|
5786 |
|
jtulach@678
|
5787 |
|
jtulach@678
|
5788 |
/**
|
jtulach@678
|
5789 |
* @name UIEvent
|
jtulach@678
|
5790 |
* @param {Object} options
|
jtulach@678
|
5791 |
*/
|
jtulach@678
|
5792 |
UIEvent = function(options) {
|
jtulach@678
|
5793 |
this._view = null;
|
jtulach@678
|
5794 |
this._detail = 0;
|
jtulach@678
|
5795 |
};
|
jtulach@678
|
5796 |
|
jtulach@678
|
5797 |
UIEvent.prototype = new Event();
|
jtulach@678
|
5798 |
__extend__(UIEvent.prototype,{
|
jtulach@678
|
5799 |
get view(){
|
jtulach@678
|
5800 |
return this._view;
|
jtulach@678
|
5801 |
},
|
jtulach@678
|
5802 |
get detail(){
|
jtulach@678
|
5803 |
return this._detail;
|
jtulach@678
|
5804 |
},
|
jtulach@678
|
5805 |
initUIEvent: function(type, bubbles, cancelable, windowObject, detail){
|
jtulach@678
|
5806 |
this.initEvent(type, bubbles, cancelable);
|
jtulach@678
|
5807 |
this._detail = 0;
|
jtulach@678
|
5808 |
this._view = windowObject;
|
jtulach@678
|
5809 |
}
|
jtulach@678
|
5810 |
});
|
jtulach@678
|
5811 |
|
jtulach@678
|
5812 |
var $onblur,
|
jtulach@678
|
5813 |
$onfocus,
|
jtulach@678
|
5814 |
$onresize;
|
jtulach@678
|
5815 |
|
jtulach@678
|
5816 |
|
jtulach@678
|
5817 |
/**
|
jtulach@678
|
5818 |
* @name MouseEvent
|
jtulach@678
|
5819 |
* @w3c:domlevel 2
|
jtulach@678
|
5820 |
* @uri http://www.w3.org/TR/2000/REC-DOM-Level-2-Events-20001113/events.html
|
jtulach@678
|
5821 |
*/
|
jtulach@678
|
5822 |
MouseEvent = function(options) {
|
jtulach@678
|
5823 |
this._screenX= 0;
|
jtulach@678
|
5824 |
this._screenY= 0;
|
jtulach@678
|
5825 |
this._clientX= 0;
|
jtulach@678
|
5826 |
this._clientY= 0;
|
jtulach@678
|
5827 |
this._ctrlKey= false;
|
jtulach@678
|
5828 |
this._metaKey= false;
|
jtulach@678
|
5829 |
this._altKey= false;
|
jtulach@678
|
5830 |
this._button= null;
|
jtulach@678
|
5831 |
this._relatedTarget= null;
|
jtulach@678
|
5832 |
};
|
jtulach@678
|
5833 |
MouseEvent.prototype = new UIEvent();
|
jtulach@678
|
5834 |
__extend__(MouseEvent.prototype,{
|
jtulach@678
|
5835 |
get screenX(){
|
jtulach@678
|
5836 |
return this._screenX;
|
jtulach@678
|
5837 |
},
|
jtulach@678
|
5838 |
get screenY(){
|
jtulach@678
|
5839 |
return this._screenY;
|
jtulach@678
|
5840 |
},
|
jtulach@678
|
5841 |
get clientX(){
|
jtulach@678
|
5842 |
return this._clientX;
|
jtulach@678
|
5843 |
},
|
jtulach@678
|
5844 |
get clientY(){
|
jtulach@678
|
5845 |
return this._clientY;
|
jtulach@678
|
5846 |
},
|
jtulach@678
|
5847 |
get ctrlKey(){
|
jtulach@678
|
5848 |
return this._ctrlKey;
|
jtulach@678
|
5849 |
},
|
jtulach@678
|
5850 |
get altKey(){
|
jtulach@678
|
5851 |
return this._altKey;
|
jtulach@678
|
5852 |
},
|
jtulach@678
|
5853 |
get shiftKey(){
|
jtulach@678
|
5854 |
return this._shiftKey;
|
jtulach@678
|
5855 |
},
|
jtulach@678
|
5856 |
get metaKey(){
|
jtulach@678
|
5857 |
return this._metaKey;
|
jtulach@678
|
5858 |
},
|
jtulach@678
|
5859 |
get button(){
|
jtulach@678
|
5860 |
return this._button;
|
jtulach@678
|
5861 |
},
|
jtulach@678
|
5862 |
get relatedTarget(){
|
jtulach@678
|
5863 |
return this._relatedTarget;
|
jtulach@678
|
5864 |
},
|
jtulach@678
|
5865 |
initMouseEvent: function(type, bubbles, cancelable, windowObject, detail,
|
jtulach@678
|
5866 |
screenX, screenY, clientX, clientY, ctrlKey, altKey, shiftKey,
|
jtulach@678
|
5867 |
metaKey, button, relatedTarget){
|
jtulach@678
|
5868 |
this.initUIEvent(type, bubbles, cancelable, windowObject, detail);
|
jtulach@678
|
5869 |
this._screenX = screenX;
|
jtulach@678
|
5870 |
this._screenY = screenY;
|
jtulach@678
|
5871 |
this._clientX = clientX;
|
jtulach@678
|
5872 |
this._clientY = clientY;
|
jtulach@678
|
5873 |
this._ctrlKey = ctrlKey;
|
jtulach@678
|
5874 |
this._altKey = altKey;
|
jtulach@678
|
5875 |
this._shiftKey = shiftKey;
|
jtulach@678
|
5876 |
this._metaKey = metaKey;
|
jtulach@678
|
5877 |
this._button = button;
|
jtulach@678
|
5878 |
this._relatedTarget = relatedTarget;
|
jtulach@678
|
5879 |
}
|
jtulach@678
|
5880 |
});
|
jtulach@678
|
5881 |
|
jtulach@678
|
5882 |
/**
|
jtulach@678
|
5883 |
* Interface KeyboardEvent (introduced in DOM Level 3)
|
jtulach@678
|
5884 |
*/
|
jtulach@678
|
5885 |
KeyboardEvent = function(options) {
|
jtulach@678
|
5886 |
this._keyIdentifier = 0;
|
jtulach@678
|
5887 |
this._keyLocation = 0;
|
jtulach@678
|
5888 |
this._ctrlKey = false;
|
jtulach@678
|
5889 |
this._metaKey = false;
|
jtulach@678
|
5890 |
this._altKey = false;
|
jtulach@678
|
5891 |
this._metaKey = false;
|
jtulach@678
|
5892 |
};
|
jtulach@678
|
5893 |
KeyboardEvent.prototype = new UIEvent();
|
jtulach@678
|
5894 |
|
jtulach@678
|
5895 |
__extend__(KeyboardEvent.prototype,{
|
jtulach@678
|
5896 |
|
jtulach@678
|
5897 |
get ctrlKey(){
|
jtulach@678
|
5898 |
return this._ctrlKey;
|
jtulach@678
|
5899 |
},
|
jtulach@678
|
5900 |
get altKey(){
|
jtulach@678
|
5901 |
return this._altKey;
|
jtulach@678
|
5902 |
},
|
jtulach@678
|
5903 |
get shiftKey(){
|
jtulach@678
|
5904 |
return this._shiftKey;
|
jtulach@678
|
5905 |
},
|
jtulach@678
|
5906 |
get metaKey(){
|
jtulach@678
|
5907 |
return this._metaKey;
|
jtulach@678
|
5908 |
},
|
jtulach@678
|
5909 |
get button(){
|
jtulach@678
|
5910 |
return this._button;
|
jtulach@678
|
5911 |
},
|
jtulach@678
|
5912 |
get relatedTarget(){
|
jtulach@678
|
5913 |
return this._relatedTarget;
|
jtulach@678
|
5914 |
},
|
jtulach@678
|
5915 |
getModifiersState: function(keyIdentifier){
|
jtulach@678
|
5916 |
|
jtulach@678
|
5917 |
},
|
jtulach@678
|
5918 |
initMouseEvent: function(type, bubbles, cancelable, windowObject,
|
jtulach@678
|
5919 |
keyIdentifier, keyLocation, modifiersList, repeat){
|
jtulach@678
|
5920 |
this.initUIEvent(type, bubbles, cancelable, windowObject, 0);
|
jtulach@678
|
5921 |
this._keyIdentifier = keyIdentifier;
|
jtulach@678
|
5922 |
this._keyLocation = keyLocation;
|
jtulach@678
|
5923 |
this._modifiersList = modifiersList;
|
jtulach@678
|
5924 |
this._repeat = repeat;
|
jtulach@678
|
5925 |
}
|
jtulach@678
|
5926 |
});
|
jtulach@678
|
5927 |
|
jtulach@678
|
5928 |
KeyboardEvent.DOM_KEY_LOCATION_STANDARD = 0;
|
jtulach@678
|
5929 |
KeyboardEvent.DOM_KEY_LOCATION_LEFT = 1;
|
jtulach@678
|
5930 |
KeyboardEvent.DOM_KEY_LOCATION_RIGHT = 2;
|
jtulach@678
|
5931 |
KeyboardEvent.DOM_KEY_LOCATION_NUMPAD = 3;
|
jtulach@678
|
5932 |
KeyboardEvent.DOM_KEY_LOCATION_MOBILE = 4;
|
jtulach@678
|
5933 |
KeyboardEvent.DOM_KEY_LOCATION_JOYSTICK = 5;
|
jtulach@678
|
5934 |
|
jtulach@678
|
5935 |
|
jtulach@678
|
5936 |
|
jtulach@678
|
5937 |
//We dont fire mutation events until someone has registered for them
|
jtulach@678
|
5938 |
var __supportedMutations__ = /DOMSubtreeModified|DOMNodeInserted|DOMNodeRemoved|DOMAttrModified|DOMCharacterDataModified/;
|
jtulach@678
|
5939 |
|
jtulach@678
|
5940 |
var __fireMutationEvents__ = Aspect.before({
|
jtulach@678
|
5941 |
target: EventTarget,
|
jtulach@678
|
5942 |
method: 'addEventListener'
|
jtulach@678
|
5943 |
}, function(target, type){
|
jtulach@678
|
5944 |
if(type && type.match(__supportedMutations__)){
|
jtulach@678
|
5945 |
//unweaving removes the __addEventListener__ aspect
|
jtulach@678
|
5946 |
__fireMutationEvents__.unweave();
|
jtulach@678
|
5947 |
// These two methods are enough to cover all dom 2 manipulations
|
jtulach@678
|
5948 |
Aspect.around({
|
jtulach@678
|
5949 |
target: Node,
|
jtulach@678
|
5950 |
method:"removeChild"
|
jtulach@678
|
5951 |
}, function(invocation){
|
jtulach@678
|
5952 |
var event,
|
jtulach@678
|
5953 |
node = invocation.arguments[0];
|
jtulach@678
|
5954 |
event = node.ownerDocument.createEvent('MutationEvents');
|
jtulach@678
|
5955 |
event.initEvent('DOMNodeRemoved', true, false, node.parentNode, null, null, null, null);
|
jtulach@678
|
5956 |
node.dispatchEvent(event, false);
|
jtulach@678
|
5957 |
return invocation.proceed();
|
jtulach@678
|
5958 |
|
jtulach@678
|
5959 |
});
|
jtulach@678
|
5960 |
Aspect.around({
|
jtulach@678
|
5961 |
target: Node,
|
jtulach@678
|
5962 |
method:"appendChild"
|
jtulach@678
|
5963 |
}, function(invocation) {
|
jtulach@678
|
5964 |
var event,
|
jtulach@678
|
5965 |
node = invocation.proceed();
|
jtulach@678
|
5966 |
event = node.ownerDocument.createEvent('MutationEvents');
|
jtulach@678
|
5967 |
event.initEvent('DOMNodeInserted', true, false, node.parentNode, null, null, null, null);
|
jtulach@678
|
5968 |
node.dispatchEvent(event, false);
|
jtulach@678
|
5969 |
return node;
|
jtulach@678
|
5970 |
});
|
jtulach@678
|
5971 |
}
|
jtulach@678
|
5972 |
});
|
jtulach@678
|
5973 |
|
jtulach@678
|
5974 |
/**
|
jtulach@678
|
5975 |
* @name MutationEvent
|
jtulach@678
|
5976 |
* @param {Object} options
|
jtulach@678
|
5977 |
*/
|
jtulach@678
|
5978 |
MutationEvent = function(options) {
|
jtulach@678
|
5979 |
this._cancelable = false;
|
jtulach@678
|
5980 |
this._timeStamp = 0;
|
jtulach@678
|
5981 |
};
|
jtulach@678
|
5982 |
|
jtulach@678
|
5983 |
MutationEvent.prototype = new Event();
|
jtulach@678
|
5984 |
__extend__(MutationEvent.prototype,{
|
jtulach@678
|
5985 |
get relatedNode(){
|
jtulach@678
|
5986 |
return this._relatedNode;
|
jtulach@678
|
5987 |
},
|
jtulach@678
|
5988 |
get prevValue(){
|
jtulach@678
|
5989 |
return this._prevValue;
|
jtulach@678
|
5990 |
},
|
jtulach@678
|
5991 |
get newValue(){
|
jtulach@678
|
5992 |
return this._newValue;
|
jtulach@678
|
5993 |
},
|
jtulach@678
|
5994 |
get attrName(){
|
jtulach@678
|
5995 |
return this._attrName;
|
jtulach@678
|
5996 |
},
|
jtulach@678
|
5997 |
get attrChange(){
|
jtulach@678
|
5998 |
return this._attrChange;
|
jtulach@678
|
5999 |
},
|
jtulach@678
|
6000 |
initMutationEvent: function( type, bubbles, cancelable,
|
jtulach@678
|
6001 |
relatedNode, prevValue, newValue, attrName, attrChange ){
|
jtulach@678
|
6002 |
this._relatedNode = relatedNode;
|
jtulach@678
|
6003 |
this._prevValue = prevValue;
|
jtulach@678
|
6004 |
this._newValue = newValue;
|
jtulach@678
|
6005 |
this._attrName = attrName;
|
jtulach@678
|
6006 |
this._attrChange = attrChange;
|
jtulach@678
|
6007 |
switch(type){
|
jtulach@678
|
6008 |
case "DOMSubtreeModified":
|
jtulach@678
|
6009 |
this.initEvent(type, true, false);
|
jtulach@678
|
6010 |
break;
|
jtulach@678
|
6011 |
case "DOMNodeInserted":
|
jtulach@678
|
6012 |
this.initEvent(type, true, false);
|
jtulach@678
|
6013 |
break;
|
jtulach@678
|
6014 |
case "DOMNodeRemoved":
|
jtulach@678
|
6015 |
this.initEvent(type, true, false);
|
jtulach@678
|
6016 |
break;
|
jtulach@678
|
6017 |
case "DOMNodeRemovedFromDocument":
|
jtulach@678
|
6018 |
this.initEvent(type, false, false);
|
jtulach@678
|
6019 |
break;
|
jtulach@678
|
6020 |
case "DOMNodeInsertedIntoDocument":
|
jtulach@678
|
6021 |
this.initEvent(type, false, false);
|
jtulach@678
|
6022 |
break;
|
jtulach@678
|
6023 |
case "DOMAttrModified":
|
jtulach@678
|
6024 |
this.initEvent(type, true, false);
|
jtulach@678
|
6025 |
break;
|
jtulach@678
|
6026 |
case "DOMCharacterDataModified":
|
jtulach@678
|
6027 |
this.initEvent(type, true, false);
|
jtulach@678
|
6028 |
break;
|
jtulach@678
|
6029 |
default:
|
jtulach@678
|
6030 |
this.initEvent(type, bubbles, cancelable);
|
jtulach@678
|
6031 |
}
|
jtulach@678
|
6032 |
}
|
jtulach@678
|
6033 |
});
|
jtulach@678
|
6034 |
|
jtulach@678
|
6035 |
// constants
|
jtulach@678
|
6036 |
MutationEvent.ADDITION = 0;
|
jtulach@678
|
6037 |
MutationEvent.MODIFICATION = 1;
|
jtulach@678
|
6038 |
MutationEvent.REMOVAL = 2;
|
jtulach@678
|
6039 |
|
jtulach@678
|
6040 |
|
jtulach@678
|
6041 |
/**
|
jtulach@678
|
6042 |
* @name EventException
|
jtulach@678
|
6043 |
*/
|
jtulach@678
|
6044 |
EventException = function(code) {
|
jtulach@678
|
6045 |
this.code = code;
|
jtulach@678
|
6046 |
};
|
jtulach@678
|
6047 |
EventException.UNSPECIFIED_EVENT_TYPE_ERR = 0;
|
jtulach@678
|
6048 |
/**
|
jtulach@678
|
6049 |
*
|
jtulach@678
|
6050 |
* DOM Level 2: http://www.w3.org/TR/DOM-Level-2-Events/events.html
|
jtulach@678
|
6051 |
* DOM Level 3: http://www.w3.org/TR/DOM-Level-3-Events/
|
jtulach@678
|
6052 |
*
|
jtulach@678
|
6053 |
* interface DocumentEvent {
|
jtulach@678
|
6054 |
* Event createEvent (in DOMString eventType)
|
jtulach@678
|
6055 |
* raises (DOMException);
|
jtulach@678
|
6056 |
* };
|
jtulach@678
|
6057 |
*
|
jtulach@678
|
6058 |
* Firefox (3.6) exposes DocumentEvent
|
jtulach@678
|
6059 |
* Safari (4) does NOT.
|
jtulach@678
|
6060 |
*/
|
jtulach@678
|
6061 |
|
jtulach@678
|
6062 |
/**
|
jtulach@678
|
6063 |
* TODO: Not sure we need a full prototype. We not just an regular object?
|
jtulach@678
|
6064 |
*/
|
jtulach@678
|
6065 |
DocumentEvent = function(){};
|
jtulach@678
|
6066 |
DocumentEvent.prototype.__EventMap__ = {
|
jtulach@678
|
6067 |
// Safari4: singular and plural forms accepted
|
jtulach@678
|
6068 |
// Firefox3.6: singular and plural forms accepted
|
jtulach@678
|
6069 |
'Event' : Event,
|
jtulach@678
|
6070 |
'Events' : Event,
|
jtulach@678
|
6071 |
'UIEvent' : UIEvent,
|
jtulach@678
|
6072 |
'UIEvents' : UIEvent,
|
jtulach@678
|
6073 |
'MouseEvent' : MouseEvent,
|
jtulach@678
|
6074 |
'MouseEvents' : MouseEvent,
|
jtulach@678
|
6075 |
'MutationEvent' : MutationEvent,
|
jtulach@678
|
6076 |
'MutationEvents' : MutationEvent,
|
jtulach@678
|
6077 |
|
jtulach@678
|
6078 |
// Safari4: accepts HTMLEvents, but not HTMLEvent
|
jtulach@678
|
6079 |
// Firefox3.6: accepts HTMLEvents, but not HTMLEvent
|
jtulach@678
|
6080 |
'HTMLEvent' : Event,
|
jtulach@678
|
6081 |
'HTMLEvents' : Event,
|
jtulach@678
|
6082 |
|
jtulach@678
|
6083 |
// Safari4: both not accepted
|
jtulach@678
|
6084 |
// Firefox3.6, only KeyEvents is accepted
|
jtulach@678
|
6085 |
'KeyEvent' : KeyboardEvent,
|
jtulach@678
|
6086 |
'KeyEvents' : KeyboardEvent,
|
jtulach@678
|
6087 |
|
jtulach@678
|
6088 |
// Safari4: both accepted
|
jtulach@678
|
6089 |
// Firefox3.6: none accepted
|
jtulach@678
|
6090 |
'KeyboardEvent' : KeyboardEvent,
|
jtulach@678
|
6091 |
'KeyboardEvents' : KeyboardEvent
|
jtulach@678
|
6092 |
};
|
jtulach@678
|
6093 |
|
jtulach@678
|
6094 |
DocumentEvent.prototype.createEvent = function(eventType) {
|
jtulach@678
|
6095 |
var Clazz = this.__EventMap__[eventType];
|
jtulach@678
|
6096 |
if (Clazz) {
|
jtulach@678
|
6097 |
return new Clazz();
|
jtulach@678
|
6098 |
}
|
jtulach@678
|
6099 |
throw(new DOMException(DOMException.NOT_SUPPORTED_ERR));
|
jtulach@678
|
6100 |
};
|
jtulach@678
|
6101 |
|
jtulach@678
|
6102 |
__extend__(Document.prototype, DocumentEvent.prototype);
|
jtulach@678
|
6103 |
|
jtulach@678
|
6104 |
/**
|
jtulach@678
|
6105 |
* @author john resig & the envjs team
|
jtulach@678
|
6106 |
* @uri http://www.envjs.com/
|
jtulach@678
|
6107 |
* @copyright 2008-2010
|
jtulach@678
|
6108 |
* @license MIT
|
jtulach@678
|
6109 |
*/
|
jtulach@678
|
6110 |
//CLOSURE_END
|
jtulach@678
|
6111 |
}());
|
jtulach@678
|
6112 |
|
jtulach@678
|
6113 |
/*
|
jtulach@678
|
6114 |
* Envjs timer.1.2.13
|
jtulach@678
|
6115 |
* Pure JavaScript Browser Environment
|
jtulach@678
|
6116 |
* By John Resig <http://ejohn.org/> and the Envjs Team
|
jtulach@678
|
6117 |
* Copyright 2008-2010 John Resig, under the MIT License
|
jtulach@678
|
6118 |
*
|
jtulach@678
|
6119 |
* Parts of the implementation were originally written by:\
|
jtulach@678
|
6120 |
* Steven Parkes
|
jtulach@678
|
6121 |
*
|
jtulach@678
|
6122 |
* requires Envjs.wait, Envjs.sleep, Envjs.WAIT_INTERVAL
|
jtulach@678
|
6123 |
*/
|
jtulach@678
|
6124 |
var setTimeout,
|
jtulach@678
|
6125 |
clearTimeout,
|
jtulach@678
|
6126 |
setInterval,
|
jtulach@678
|
6127 |
clearInterval;
|
jtulach@678
|
6128 |
|
jtulach@678
|
6129 |
/*
|
jtulach@678
|
6130 |
* Envjs timer.1.2.13
|
jtulach@678
|
6131 |
* Pure JavaScript Browser Environment
|
jtulach@678
|
6132 |
* By John Resig <http://ejohn.org/> and the Envjs Team
|
jtulach@678
|
6133 |
* Copyright 2008-2010 John Resig, under the MIT License
|
jtulach@678
|
6134 |
*/
|
jtulach@678
|
6135 |
|
jtulach@678
|
6136 |
//CLOSURE_START
|
jtulach@678
|
6137 |
(function(){
|
jtulach@678
|
6138 |
|
jtulach@678
|
6139 |
|
jtulach@678
|
6140 |
|
jtulach@678
|
6141 |
|
jtulach@678
|
6142 |
/*
|
jtulach@678
|
6143 |
* timer.js
|
jtulach@678
|
6144 |
* implementation provided by Steven Parkes
|
jtulach@678
|
6145 |
*/
|
jtulach@678
|
6146 |
|
jtulach@678
|
6147 |
//private
|
jtulach@678
|
6148 |
var $timers = [],
|
jtulach@678
|
6149 |
EVENT_LOOP_RUNNING = false;
|
jtulach@678
|
6150 |
|
jtulach@678
|
6151 |
$timers.lock = function(fn){
|
jtulach@678
|
6152 |
Envjs.sync(fn)();
|
jtulach@678
|
6153 |
};
|
jtulach@678
|
6154 |
|
jtulach@678
|
6155 |
//private internal class
|
jtulach@678
|
6156 |
var Timer = function(fn, interval){
|
jtulach@678
|
6157 |
this.fn = fn;
|
jtulach@678
|
6158 |
this.interval = interval;
|
jtulach@678
|
6159 |
this.at = Date.now() + interval;
|
jtulach@678
|
6160 |
// allows for calling wait() from callbacks
|
jtulach@678
|
6161 |
this.running = false;
|
jtulach@678
|
6162 |
};
|
jtulach@678
|
6163 |
|
jtulach@678
|
6164 |
Timer.prototype.start = function(){};
|
jtulach@678
|
6165 |
Timer.prototype.stop = function(){};
|
jtulach@678
|
6166 |
|
jtulach@678
|
6167 |
//static
|
jtulach@678
|
6168 |
Timer.normalize = function(time) {
|
jtulach@678
|
6169 |
time = time*1;
|
jtulach@678
|
6170 |
if ( isNaN(time) || time < 0 ) {
|
jtulach@678
|
6171 |
time = 0;
|
jtulach@678
|
6172 |
}
|
jtulach@678
|
6173 |
|
jtulach@678
|
6174 |
if ( EVENT_LOOP_RUNNING && time < Timer.MIN_TIME ) {
|
jtulach@678
|
6175 |
time = Timer.MIN_TIME;
|
jtulach@678
|
6176 |
}
|
jtulach@678
|
6177 |
return time;
|
jtulach@678
|
6178 |
};
|
jtulach@678
|
6179 |
// html5 says this should be at least 4, but the parser is using
|
jtulach@678
|
6180 |
// a setTimeout for the SAX stuff which messes up the world
|
jtulach@678
|
6181 |
Timer.MIN_TIME = /* 4 */ 0;
|
jtulach@678
|
6182 |
|
jtulach@678
|
6183 |
/**
|
jtulach@678
|
6184 |
* @function setTimeout
|
jtulach@678
|
6185 |
* @param {Object} fn
|
jtulach@678
|
6186 |
* @param {Object} time
|
jtulach@678
|
6187 |
*/
|
jtulach@678
|
6188 |
setTimeout = function(fn, time){
|
jtulach@678
|
6189 |
var num;
|
jtulach@678
|
6190 |
time = Timer.normalize(time);
|
jtulach@678
|
6191 |
$timers.lock(function(){
|
jtulach@678
|
6192 |
num = $timers.length+1;
|
jtulach@678
|
6193 |
var tfn;
|
jtulach@678
|
6194 |
if (typeof fn == 'string') {
|
jtulach@678
|
6195 |
tfn = function() {
|
jtulach@678
|
6196 |
try {
|
jtulach@678
|
6197 |
// eval in global scope
|
jtulach@678
|
6198 |
eval(fn, null);
|
jtulach@678
|
6199 |
// } catch (e) {
|
jtulach@678
|
6200 |
// console.log('timer error %s %s', fn, e);
|
jtulach@678
|
6201 |
} finally {
|
jtulach@678
|
6202 |
clearInterval(num);
|
jtulach@678
|
6203 |
}
|
jtulach@678
|
6204 |
};
|
jtulach@678
|
6205 |
} else {
|
jtulach@678
|
6206 |
tfn = function() {
|
jtulach@678
|
6207 |
try {
|
jtulach@678
|
6208 |
fn();
|
jtulach@678
|
6209 |
// } catch (e) {
|
jtulach@678
|
6210 |
// console.log('timer error %s %s', fn, e);
|
jtulach@678
|
6211 |
} finally {
|
jtulach@678
|
6212 |
clearInterval(num);
|
jtulach@678
|
6213 |
}
|
jtulach@678
|
6214 |
};
|
jtulach@678
|
6215 |
}
|
jtulach@678
|
6216 |
//console.log("Creating timer number %s", num);
|
jtulach@678
|
6217 |
$timers[num] = new Timer(tfn, time);
|
jtulach@678
|
6218 |
$timers[num].start();
|
jtulach@678
|
6219 |
});
|
jtulach@678
|
6220 |
return num;
|
jtulach@678
|
6221 |
};
|
jtulach@678
|
6222 |
|
jtulach@678
|
6223 |
/**
|
jtulach@678
|
6224 |
* @function setInterval
|
jtulach@678
|
6225 |
* @param {Object} fn
|
jtulach@678
|
6226 |
* @param {Object} time
|
jtulach@678
|
6227 |
*/
|
jtulach@678
|
6228 |
setInterval = function(fn, time){
|
jtulach@678
|
6229 |
//console.log('setting interval %s %s', time, fn.toString().substring(0,64));
|
jtulach@678
|
6230 |
time = Timer.normalize(time);
|
jtulach@678
|
6231 |
if ( time < 10 ) {
|
jtulach@678
|
6232 |
time = 10;
|
jtulach@678
|
6233 |
}
|
jtulach@678
|
6234 |
if (typeof fn == 'string') {
|
jtulach@678
|
6235 |
var fnstr = fn;
|
jtulach@678
|
6236 |
fn = function() {
|
jtulach@678
|
6237 |
eval(fnstr);
|
jtulach@678
|
6238 |
};
|
jtulach@678
|
6239 |
}
|
jtulach@678
|
6240 |
var num;
|
jtulach@678
|
6241 |
$timers.lock(function(){
|
jtulach@678
|
6242 |
num = $timers.length+1;
|
jtulach@678
|
6243 |
//Envjs.debug("Creating timer number "+num);
|
jtulach@678
|
6244 |
$timers[num] = new Timer(fn, time);
|
jtulach@678
|
6245 |
$timers[num].start();
|
jtulach@678
|
6246 |
});
|
jtulach@678
|
6247 |
return num;
|
jtulach@678
|
6248 |
};
|
jtulach@678
|
6249 |
|
jtulach@678
|
6250 |
/**
|
jtulach@678
|
6251 |
* clearInterval
|
jtulach@678
|
6252 |
* @param {Object} num
|
jtulach@678
|
6253 |
*/
|
jtulach@678
|
6254 |
clearInterval = clearTimeout = function(num){
|
jtulach@678
|
6255 |
//console.log("clearing interval "+num);
|
jtulach@678
|
6256 |
$timers.lock(function(){
|
jtulach@678
|
6257 |
if ( $timers[num] ) {
|
jtulach@678
|
6258 |
$timers[num].stop();
|
jtulach@678
|
6259 |
delete $timers[num];
|
jtulach@678
|
6260 |
}
|
jtulach@678
|
6261 |
});
|
jtulach@678
|
6262 |
};
|
jtulach@678
|
6263 |
|
jtulach@678
|
6264 |
// wait === null/undefined: execute any timers as they fire,
|
jtulach@678
|
6265 |
// waiting until there are none left
|
jtulach@678
|
6266 |
// wait(n) (n > 0): execute any timers as they fire until there
|
jtulach@678
|
6267 |
// are none left waiting at least n ms but no more, even if there
|
jtulach@678
|
6268 |
// are future events/current threads
|
jtulach@678
|
6269 |
// wait(0): execute any immediately runnable timers and return
|
jtulach@678
|
6270 |
// wait(-n): keep sleeping until the next event is more than n ms
|
jtulach@678
|
6271 |
// in the future
|
jtulach@678
|
6272 |
//
|
jtulach@678
|
6273 |
// TODO: make a priority queue ...
|
jtulach@678
|
6274 |
|
jtulach@678
|
6275 |
Envjs.wait = function(wait) {
|
jtulach@678
|
6276 |
//console.log('wait %s', wait);
|
jtulach@678
|
6277 |
var delta_wait,
|
jtulach@678
|
6278 |
start = Date.now(),
|
jtulach@678
|
6279 |
was_running = EVENT_LOOP_RUNNING;
|
jtulach@678
|
6280 |
|
jtulach@678
|
6281 |
if (wait < 0) {
|
jtulach@678
|
6282 |
delta_wait = -wait;
|
jtulach@678
|
6283 |
wait = 0;
|
jtulach@678
|
6284 |
}
|
jtulach@678
|
6285 |
EVENT_LOOP_RUNNING = true;
|
jtulach@678
|
6286 |
if (wait !== 0 && wait !== null && wait !== undefined){
|
jtulach@678
|
6287 |
wait += Date.now();
|
jtulach@678
|
6288 |
}
|
jtulach@678
|
6289 |
|
jtulach@678
|
6290 |
var earliest,
|
jtulach@678
|
6291 |
timer,
|
jtulach@678
|
6292 |
sleep,
|
jtulach@678
|
6293 |
index,
|
jtulach@678
|
6294 |
goal,
|
jtulach@678
|
6295 |
now,
|
jtulach@678
|
6296 |
nextfn;
|
jtulach@678
|
6297 |
|
jtulach@678
|
6298 |
for (;;) {
|
jtulach@678
|
6299 |
//console.log('timer loop');
|
jtulach@678
|
6300 |
earliest = sleep = goal = now = nextfn = null;
|
jtulach@678
|
6301 |
$timers.lock(function(){
|
jtulach@678
|
6302 |
for(index in $timers){
|
jtulach@678
|
6303 |
if( isNaN(index*0) ) {
|
jtulach@678
|
6304 |
continue;
|
jtulach@678
|
6305 |
}
|
jtulach@678
|
6306 |
timer = $timers[index];
|
jtulach@678
|
6307 |
// determine timer with smallest run-at time that is
|
jtulach@678
|
6308 |
// not already running
|
jtulach@678
|
6309 |
if( !timer.running && ( !earliest || timer.at < earliest.at) ) {
|
jtulach@678
|
6310 |
earliest = timer;
|
jtulach@678
|
6311 |
}
|
jtulach@678
|
6312 |
}
|
jtulach@678
|
6313 |
});
|
jtulach@678
|
6314 |
//next sleep time
|
jtulach@678
|
6315 |
sleep = earliest && earliest.at - Date.now();
|
jtulach@678
|
6316 |
if ( earliest && sleep <= 0 ) {
|
jtulach@678
|
6317 |
nextfn = earliest.fn;
|
jtulach@678
|
6318 |
try {
|
jtulach@678
|
6319 |
//console.log('running stack %s', nextfn.toString().substring(0,64));
|
jtulach@678
|
6320 |
earliest.running = true;
|
jtulach@678
|
6321 |
nextfn();
|
jtulach@678
|
6322 |
// } catch (e) {
|
jtulach@678
|
6323 |
// console.log('timer error %s %s', nextfn, e);
|
jtulach@678
|
6324 |
} finally {
|
jtulach@678
|
6325 |
earliest.running = false;
|
jtulach@678
|
6326 |
}
|
jtulach@678
|
6327 |
goal = earliest.at + earliest.interval;
|
jtulach@678
|
6328 |
now = Date.now();
|
jtulach@678
|
6329 |
if ( goal < now ) {
|
jtulach@678
|
6330 |
earliest.at = now;
|
jtulach@678
|
6331 |
} else {
|
jtulach@678
|
6332 |
earliest.at = goal;
|
jtulach@678
|
6333 |
}
|
jtulach@678
|
6334 |
continue;
|
jtulach@678
|
6335 |
}
|
jtulach@678
|
6336 |
|
jtulach@678
|
6337 |
// bunch of subtle cases here ...
|
jtulach@678
|
6338 |
if ( !earliest ) {
|
jtulach@678
|
6339 |
// no events in the queue (but maybe XHR will bring in events, so ...
|
jtulach@678
|
6340 |
if ( !wait || wait < Date.now() ) {
|
jtulach@678
|
6341 |
// Loop ends if there are no events and a wait hasn't been
|
jtulach@678
|
6342 |
// requested or has expired
|
jtulach@678
|
6343 |
break;
|
jtulach@678
|
6344 |
}
|
jtulach@678
|
6345 |
// no events, but a wait requested: fall through to sleep
|
jtulach@678
|
6346 |
} else {
|
jtulach@678
|
6347 |
// there are events in the queue, but they aren't firable now
|
jtulach@678
|
6348 |
/*if ( delta_wait && sleep <= delta_wait ) {
|
jtulach@678
|
6349 |
//TODO: why waste a check on a tight
|
jtulach@678
|
6350 |
// loop if it just falls through?
|
jtulach@678
|
6351 |
// if they will happen within the next delta, fall through to sleep
|
jtulach@678
|
6352 |
} else */if ( wait === 0 || ( wait > 0 && wait < Date.now () ) ) {
|
jtulach@678
|
6353 |
// loop ends even if there are events but the user
|
jtulach@678
|
6354 |
// specifcally asked not to wait too long
|
jtulach@678
|
6355 |
break;
|
jtulach@678
|
6356 |
}
|
jtulach@678
|
6357 |
// there are events and the user wants to wait: fall through to sleep
|
jtulach@678
|
6358 |
}
|
jtulach@678
|
6359 |
|
jtulach@678
|
6360 |
// Related to ajax threads ... hopefully can go away ..
|
jtulach@678
|
6361 |
var interval = Envjs.WAIT_INTERVAL || 100;
|
jtulach@678
|
6362 |
if ( !sleep || sleep > interval ) {
|
jtulach@678
|
6363 |
sleep = interval;
|
jtulach@678
|
6364 |
}
|
jtulach@678
|
6365 |
//console.log('sleeping %s', sleep);
|
jtulach@678
|
6366 |
Envjs.sleep(sleep);
|
jtulach@678
|
6367 |
|
jtulach@678
|
6368 |
}
|
jtulach@678
|
6369 |
EVENT_LOOP_RUNNING = was_running;
|
jtulach@678
|
6370 |
};
|
jtulach@678
|
6371 |
|
jtulach@678
|
6372 |
|
jtulach@678
|
6373 |
/**
|
jtulach@678
|
6374 |
* @author john resig & the envjs team
|
jtulach@678
|
6375 |
* @uri http://www.envjs.com/
|
jtulach@678
|
6376 |
* @copyright 2008-2010
|
jtulach@678
|
6377 |
* @license MIT
|
jtulach@678
|
6378 |
*/
|
jtulach@678
|
6379 |
//CLOSURE_END
|
jtulach@678
|
6380 |
}());
|
jtulach@678
|
6381 |
/*
|
jtulach@678
|
6382 |
* Pure JavaScript Browser Environment
|
jtulach@678
|
6383 |
* By John Resig <http://ejohn.org/> and the Envjs Team
|
jtulach@678
|
6384 |
* Copyright 2008-2010 John Resig, under the MIT License
|
jtulach@678
|
6385 |
*
|
jtulach@678
|
6386 |
* This file simply provides the global definitions we need to
|
jtulach@678
|
6387 |
* be able to correctly implement to core browser DOM HTML interfaces.
|
jtulach@678
|
6388 |
*/
|
jtulach@678
|
6389 |
var HTMLDocument,
|
jtulach@678
|
6390 |
HTMLElement,
|
jtulach@678
|
6391 |
HTMLCollection,
|
jtulach@678
|
6392 |
HTMLAnchorElement,
|
jtulach@678
|
6393 |
HTMLAreaElement,
|
jtulach@678
|
6394 |
HTMLBaseElement,
|
jtulach@678
|
6395 |
HTMLQuoteElement,
|
jtulach@678
|
6396 |
HTMLBodyElement,
|
jtulach@678
|
6397 |
HTMLBRElement,
|
jtulach@678
|
6398 |
HTMLButtonElement,
|
jtulach@678
|
6399 |
HTMLCanvasElement,
|
jtulach@678
|
6400 |
HTMLTableColElement,
|
jtulach@678
|
6401 |
HTMLModElement,
|
jtulach@678
|
6402 |
HTMLDivElement,
|
jtulach@678
|
6403 |
HTMLDListElement,
|
jtulach@678
|
6404 |
HTMLFieldSetElement,
|
jtulach@678
|
6405 |
HTMLFormElement,
|
jtulach@678
|
6406 |
HTMLFrameElement,
|
jtulach@678
|
6407 |
HTMLFrameSetElement,
|
jtulach@678
|
6408 |
HTMLHeadElement,
|
jtulach@678
|
6409 |
HTMLHeadingElement,
|
jtulach@678
|
6410 |
HTMLHRElement,
|
jtulach@678
|
6411 |
HTMLHtmlElement,
|
jtulach@678
|
6412 |
HTMLIFrameElement,
|
jtulach@678
|
6413 |
HTMLImageElement,
|
jtulach@678
|
6414 |
HTMLInputElement,
|
jtulach@678
|
6415 |
HTMLLabelElement,
|
jtulach@678
|
6416 |
HTMLLegendElement,
|
jtulach@678
|
6417 |
HTMLLIElement,
|
jtulach@678
|
6418 |
HTMLLinkElement,
|
jtulach@678
|
6419 |
HTMLMapElement,
|
jtulach@678
|
6420 |
HTMLMetaElement,
|
jtulach@678
|
6421 |
HTMLObjectElement,
|
jtulach@678
|
6422 |
HTMLOListElement,
|
jtulach@678
|
6423 |
HTMLOptGroupElement,
|
jtulach@678
|
6424 |
HTMLOptionElement,
|
jtulach@678
|
6425 |
HTMLParagraphElement,
|
jtulach@678
|
6426 |
HTMLParamElement,
|
jtulach@678
|
6427 |
HTMLPreElement,
|
jtulach@678
|
6428 |
HTMLScriptElement,
|
jtulach@678
|
6429 |
HTMLSelectElement,
|
jtulach@678
|
6430 |
HTMLSpanElement,
|
jtulach@678
|
6431 |
HTMLStyleElement,
|
jtulach@678
|
6432 |
HTMLTableElement,
|
jtulach@678
|
6433 |
HTMLTableSectionElement,
|
jtulach@678
|
6434 |
HTMLTableCellElement,
|
jtulach@678
|
6435 |
HTMLTableDataCellElement,
|
jtulach@678
|
6436 |
HTMLTableHeaderCellElement,
|
jtulach@678
|
6437 |
HTMLTableRowElement,
|
jtulach@678
|
6438 |
HTMLTextAreaElement,
|
jtulach@678
|
6439 |
HTMLTitleElement,
|
jtulach@678
|
6440 |
HTMLUListElement,
|
jtulach@678
|
6441 |
HTMLUnknownElement,
|
jtulach@678
|
6442 |
Image,
|
jtulach@678
|
6443 |
Option,
|
jtulach@678
|
6444 |
__loadImage__,
|
jtulach@678
|
6445 |
__loadLink__;
|
jtulach@678
|
6446 |
|
jtulach@678
|
6447 |
/*
|
jtulach@678
|
6448 |
* Envjs html.1.2.13
|
jtulach@678
|
6449 |
* Pure JavaScript Browser Environment
|
jtulach@678
|
6450 |
* By John Resig <http://ejohn.org/> and the Envjs Team
|
jtulach@678
|
6451 |
* Copyright 2008-2010 John Resig, under the MIT License
|
jtulach@678
|
6452 |
*/
|
jtulach@678
|
6453 |
|
jtulach@678
|
6454 |
//CLOSURE_START
|
jtulach@678
|
6455 |
(function(){
|
jtulach@678
|
6456 |
|
jtulach@678
|
6457 |
|
jtulach@678
|
6458 |
|
jtulach@678
|
6459 |
|
jtulach@678
|
6460 |
|
jtulach@678
|
6461 |
/**
|
jtulach@678
|
6462 |
* @author ariel flesler
|
jtulach@678
|
6463 |
* http://flesler.blogspot.com/2008/11/fast-trim-function-for-javascript.html
|
jtulach@678
|
6464 |
* @param {Object} str
|
jtulach@678
|
6465 |
*/
|
jtulach@678
|
6466 |
function __trim__( str ){
|
jtulach@678
|
6467 |
return (str || "").replace( /^\s+|\s+$/g, "" );
|
jtulach@678
|
6468 |
}
|
jtulach@678
|
6469 |
|
jtulach@678
|
6470 |
|
jtulach@678
|
6471 |
/**
|
jtulach@678
|
6472 |
* @author john resig
|
jtulach@678
|
6473 |
*/
|
jtulach@678
|
6474 |
// Helper method for extending one object with another.
|
jtulach@678
|
6475 |
function __extend__(a,b) {
|
jtulach@678
|
6476 |
for ( var i in b ) {
|
jtulach@678
|
6477 |
var g = b.__lookupGetter__(i), s = b.__lookupSetter__(i);
|
jtulach@678
|
6478 |
if ( g || s ) {
|
jtulach@678
|
6479 |
if ( g ) { a.__defineGetter__(i, g); }
|
jtulach@678
|
6480 |
if ( s ) { a.__defineSetter__(i, s); }
|
jtulach@678
|
6481 |
} else {
|
jtulach@678
|
6482 |
a[i] = b[i];
|
jtulach@678
|
6483 |
}
|
jtulach@678
|
6484 |
} return a;
|
jtulach@678
|
6485 |
}
|
jtulach@678
|
6486 |
|
jtulach@678
|
6487 |
/**
|
jtulach@678
|
6488 |
* @author john resig
|
jtulach@678
|
6489 |
*/
|
jtulach@678
|
6490 |
//from jQuery
|
jtulach@678
|
6491 |
function __setArray__( target, array ) {
|
jtulach@678
|
6492 |
// Resetting the length to 0, then using the native Array push
|
jtulach@678
|
6493 |
// is a super-fast way to populate an object with array-like properties
|
jtulach@678
|
6494 |
target.length = 0;
|
jtulach@678
|
6495 |
Array.prototype.push.apply( target, array );
|
jtulach@678
|
6496 |
}
|
jtulach@678
|
6497 |
|
jtulach@678
|
6498 |
/**
|
jtulach@678
|
6499 |
* @class HTMLDocument
|
jtulach@678
|
6500 |
* The Document interface represents the entire HTML or XML document.
|
jtulach@678
|
6501 |
* Conceptually, it is the root of the document tree, and provides
|
jtulach@678
|
6502 |
* the primary access to the document's data.
|
jtulach@678
|
6503 |
*
|
jtulach@678
|
6504 |
* @extends Document
|
jtulach@678
|
6505 |
*/
|
jtulach@678
|
6506 |
HTMLDocument = function(implementation, ownerWindow, referrer) {
|
jtulach@678
|
6507 |
Document.apply(this, arguments);
|
jtulach@678
|
6508 |
this.referrer = referrer || '';
|
jtulach@678
|
6509 |
this.baseURI = "about:blank";
|
jtulach@678
|
6510 |
this.ownerWindow = ownerWindow;
|
jtulach@678
|
6511 |
};
|
jtulach@678
|
6512 |
|
jtulach@678
|
6513 |
HTMLDocument.prototype = new Document();
|
jtulach@678
|
6514 |
|
jtulach@678
|
6515 |
__extend__(HTMLDocument.prototype, {
|
jtulach@678
|
6516 |
createElement: function(tagName){
|
jtulach@678
|
6517 |
var node;
|
jtulach@678
|
6518 |
tagName = tagName.toUpperCase();
|
jtulach@678
|
6519 |
// create Element specifying 'this' as ownerDocument
|
jtulach@678
|
6520 |
// This is an html document so we need to use explicit interfaces per the
|
jtulach@678
|
6521 |
//TODO: would be much faster as a big switch
|
jtulach@678
|
6522 |
switch(tagName){
|
jtulach@678
|
6523 |
case "A":
|
jtulach@678
|
6524 |
node = new HTMLAnchorElement(this);break;
|
jtulach@678
|
6525 |
case "AREA":
|
jtulach@678
|
6526 |
node = new HTMLAreaElement(this);break;
|
jtulach@678
|
6527 |
case "BASE":
|
jtulach@678
|
6528 |
node = new HTMLBaseElement(this);break;
|
jtulach@678
|
6529 |
case "BLOCKQUOTE":
|
jtulach@678
|
6530 |
node = new HTMLQuoteElement(this);break;
|
jtulach@678
|
6531 |
case "CANVAS":
|
jtulach@678
|
6532 |
node = new HTMLCanvasElement(this);break;
|
jtulach@678
|
6533 |
case "Q":
|
jtulach@678
|
6534 |
node = new HTMLQuoteElement(this);break;
|
jtulach@678
|
6535 |
case "BODY":
|
jtulach@678
|
6536 |
node = new HTMLBodyElement(this);break;
|
jtulach@678
|
6537 |
case "BR":
|
jtulach@678
|
6538 |
node = new HTMLBRElement(this);break;
|
jtulach@678
|
6539 |
case "BUTTON":
|
jtulach@678
|
6540 |
node = new HTMLButtonElement(this);break;
|
jtulach@678
|
6541 |
case "CAPTION":
|
jtulach@678
|
6542 |
node = new HTMLElement(this);break;
|
jtulach@678
|
6543 |
case "COL":
|
jtulach@678
|
6544 |
node = new HTMLTableColElement(this);break;
|
jtulach@678
|
6545 |
case "COLGROUP":
|
jtulach@678
|
6546 |
node = new HTMLTableColElement(this);break;
|
jtulach@678
|
6547 |
case "DEL":
|
jtulach@678
|
6548 |
node = new HTMLModElement(this);break;
|
jtulach@678
|
6549 |
case "INS":
|
jtulach@678
|
6550 |
node = new HTMLModElement(this);break;
|
jtulach@678
|
6551 |
case "DIV":
|
jtulach@678
|
6552 |
node = new HTMLDivElement(this);break;
|
jtulach@678
|
6553 |
case "DL":
|
jtulach@678
|
6554 |
node = new HTMLDListElement(this);break;
|
jtulach@678
|
6555 |
case "DT":
|
jtulach@678
|
6556 |
node = new HTMLElement(this); break;
|
jtulach@678
|
6557 |
case "FIELDSET":
|
jtulach@678
|
6558 |
node = new HTMLFieldSetElement(this);break;
|
jtulach@678
|
6559 |
case "FORM":
|
jtulach@678
|
6560 |
node = new HTMLFormElement(this);break;
|
jtulach@678
|
6561 |
case "FRAME":
|
jtulach@678
|
6562 |
node = new HTMLFrameElement(this);break;
|
jtulach@678
|
6563 |
case "H1":
|
jtulach@678
|
6564 |
node = new HTMLHeadingElement(this);break;
|
jtulach@678
|
6565 |
case "H2":
|
jtulach@678
|
6566 |
node = new HTMLHeadingElement(this);break;
|
jtulach@678
|
6567 |
case "H3":
|
jtulach@678
|
6568 |
node = new HTMLHeadingElement(this);break;
|
jtulach@678
|
6569 |
case "H4":
|
jtulach@678
|
6570 |
node = new HTMLHeadingElement(this);break;
|
jtulach@678
|
6571 |
case "H5":
|
jtulach@678
|
6572 |
node = new HTMLHeadingElement(this);break;
|
jtulach@678
|
6573 |
case "H6":
|
jtulach@678
|
6574 |
node = new HTMLHeadingElement(this);break;
|
jtulach@678
|
6575 |
case "HEAD":
|
jtulach@678
|
6576 |
node = new HTMLHeadElement(this);break;
|
jtulach@678
|
6577 |
case "HR":
|
jtulach@678
|
6578 |
node = new HTMLHRElement(this);break;
|
jtulach@678
|
6579 |
case "HTML":
|
jtulach@678
|
6580 |
node = new HTMLHtmlElement(this);break;
|
jtulach@678
|
6581 |
case "IFRAME":
|
jtulach@678
|
6582 |
node = new HTMLIFrameElement(this);break;
|
jtulach@678
|
6583 |
case "IMG":
|
jtulach@678
|
6584 |
node = new HTMLImageElement(this);break;
|
jtulach@678
|
6585 |
case "INPUT":
|
jtulach@678
|
6586 |
node = new HTMLInputElement(this);break;
|
jtulach@678
|
6587 |
case "LABEL":
|
jtulach@678
|
6588 |
node = new HTMLLabelElement(this);break;
|
jtulach@678
|
6589 |
case "LEGEND":
|
jtulach@678
|
6590 |
node = new HTMLLegendElement(this);break;
|
jtulach@678
|
6591 |
case "LI":
|
jtulach@678
|
6592 |
node = new HTMLLIElement(this);break;
|
jtulach@678
|
6593 |
case "LINK":
|
jtulach@678
|
6594 |
node = new HTMLLinkElement(this);break;
|
jtulach@678
|
6595 |
case "MAP":
|
jtulach@678
|
6596 |
node = new HTMLMapElement(this);break;
|
jtulach@678
|
6597 |
case "META":
|
jtulach@678
|
6598 |
node = new HTMLMetaElement(this);break;
|
jtulach@678
|
6599 |
case "NOSCRIPT":
|
jtulach@678
|
6600 |
node = new HTMLElement(this);break;
|
jtulach@678
|
6601 |
case "OBJECT":
|
jtulach@678
|
6602 |
node = new HTMLObjectElement(this);break;
|
jtulach@678
|
6603 |
case "OPTGROUP":
|
jtulach@678
|
6604 |
node = new HTMLOptGroupElement(this);break;
|
jtulach@678
|
6605 |
case "OL":
|
jtulach@678
|
6606 |
node = new HTMLOListElement(this); break;
|
jtulach@678
|
6607 |
case "OPTION":
|
jtulach@678
|
6608 |
node = new HTMLOptionElement(this);break;
|
jtulach@678
|
6609 |
case "P":
|
jtulach@678
|
6610 |
node = new HTMLParagraphElement(this);break;
|
jtulach@678
|
6611 |
case "PARAM":
|
jtulach@678
|
6612 |
node = new HTMLParamElement(this);break;
|
jtulach@678
|
6613 |
case "PRE":
|
jtulach@678
|
6614 |
node = new HTMLPreElement(this);break;
|
jtulach@678
|
6615 |
case "SCRIPT":
|
jtulach@678
|
6616 |
node = new HTMLScriptElement(this);break;
|
jtulach@678
|
6617 |
case "SELECT":
|
jtulach@678
|
6618 |
node = new HTMLSelectElement(this);break;
|
jtulach@678
|
6619 |
case "SMALL":
|
jtulach@678
|
6620 |
node = new HTMLElement(this);break;
|
jtulach@678
|
6621 |
case "SPAN":
|
jtulach@678
|
6622 |
node = new HTMLSpanElement(this);break;
|
jtulach@678
|
6623 |
case "STRONG":
|
jtulach@678
|
6624 |
node = new HTMLElement(this);break;
|
jtulach@678
|
6625 |
case "STYLE":
|
jtulach@678
|
6626 |
node = new HTMLStyleElement(this);break;
|
jtulach@678
|
6627 |
case "TABLE":
|
jtulach@678
|
6628 |
node = new HTMLTableElement(this);break;
|
jtulach@678
|
6629 |
case "TBODY":
|
jtulach@678
|
6630 |
node = new HTMLTableSectionElement(this);break;
|
jtulach@678
|
6631 |
case "TFOOT":
|
jtulach@678
|
6632 |
node = new HTMLTableSectionElement(this);break;
|
jtulach@678
|
6633 |
case "THEAD":
|
jtulach@678
|
6634 |
node = new HTMLTableSectionElement(this);break;
|
jtulach@678
|
6635 |
case "TD":
|
jtulach@678
|
6636 |
node = new HTMLTableDataCellElement(this);break;
|
jtulach@678
|
6637 |
case "TH":
|
jtulach@678
|
6638 |
node = new HTMLTableHeaderCellElement(this);break;
|
jtulach@678
|
6639 |
case "TEXTAREA":
|
jtulach@678
|
6640 |
node = new HTMLTextAreaElement(this);break;
|
jtulach@678
|
6641 |
case "TITLE":
|
jtulach@678
|
6642 |
node = new HTMLTitleElement(this);break;
|
jtulach@678
|
6643 |
case "TR":
|
jtulach@678
|
6644 |
node = new HTMLTableRowElement(this);break;
|
jtulach@678
|
6645 |
case "UL":
|
jtulach@678
|
6646 |
node = new HTMLUListElement(this);break;
|
jtulach@678
|
6647 |
default:
|
jtulach@678
|
6648 |
node = new HTMLUnknownElement(this);
|
jtulach@678
|
6649 |
}
|
jtulach@678
|
6650 |
// assign values to properties (and aliases)
|
jtulach@678
|
6651 |
node.nodeName = tagName;
|
jtulach@678
|
6652 |
return node;
|
jtulach@678
|
6653 |
},
|
jtulach@678
|
6654 |
createElementNS : function (uri, local) {
|
jtulach@678
|
6655 |
//print('createElementNS :'+uri+" "+local);
|
jtulach@678
|
6656 |
if(!uri){
|
jtulach@678
|
6657 |
return this.createElement(local);
|
jtulach@678
|
6658 |
}else if ("http://www.w3.org/1999/xhtml" == uri) {
|
jtulach@678
|
6659 |
return this.createElement(local);
|
jtulach@678
|
6660 |
} else if ("http://www.w3.org/1998/Math/MathML" == uri) {
|
jtulach@678
|
6661 |
return this.createElement(local);
|
jtulach@678
|
6662 |
} else {
|
jtulach@678
|
6663 |
return Document.prototype.createElementNS.apply(this,[uri, local]);
|
jtulach@678
|
6664 |
}
|
jtulach@678
|
6665 |
},
|
jtulach@678
|
6666 |
get anchors(){
|
jtulach@678
|
6667 |
return new HTMLCollection(this.getElementsByTagName('a'));
|
jtulach@678
|
6668 |
},
|
jtulach@678
|
6669 |
get applets(){
|
jtulach@678
|
6670 |
return new HTMLCollection(this.getElementsByTagName('applet'));
|
jtulach@678
|
6671 |
},
|
jtulach@678
|
6672 |
get documentElement(){
|
jtulach@678
|
6673 |
var html = Document.prototype.__lookupGetter__('documentElement').apply(this,[]);
|
jtulach@678
|
6674 |
if( html === null){
|
jtulach@678
|
6675 |
html = this.createElement('html');
|
jtulach@678
|
6676 |
this.appendChild(html);
|
jtulach@678
|
6677 |
html.appendChild(this.createElement('head'));
|
jtulach@678
|
6678 |
html.appendChild(this.createElement('body'));
|
jtulach@678
|
6679 |
}
|
jtulach@678
|
6680 |
return html;
|
jtulach@678
|
6681 |
},
|
jtulach@678
|
6682 |
//document.head is non-standard
|
jtulach@678
|
6683 |
get head(){
|
jtulach@678
|
6684 |
//console.log('get head');
|
jtulach@678
|
6685 |
if (!this.documentElement) {
|
jtulach@678
|
6686 |
this.appendChild(this.createElement('html'));
|
jtulach@678
|
6687 |
}
|
jtulach@678
|
6688 |
var element = this.documentElement,
|
jtulach@678
|
6689 |
length = element.childNodes.length,
|
jtulach@678
|
6690 |
i;
|
jtulach@678
|
6691 |
//check for the presence of the head element in this html doc
|
jtulach@678
|
6692 |
for(i=0;i<length;i++){
|
jtulach@678
|
6693 |
if(element.childNodes[i].nodeType === Node.ELEMENT_NODE){
|
jtulach@678
|
6694 |
if(element.childNodes[i].tagName.toLowerCase() === 'head'){
|
jtulach@678
|
6695 |
return element.childNodes[i];
|
jtulach@678
|
6696 |
}
|
jtulach@678
|
6697 |
}
|
jtulach@678
|
6698 |
}
|
jtulach@678
|
6699 |
//no head? ugh bad news html.. I guess we'll force the issue?
|
jtulach@678
|
6700 |
var head = element.appendChild(this.createElement('head'));
|
jtulach@678
|
6701 |
return head;
|
jtulach@678
|
6702 |
},
|
jtulach@678
|
6703 |
get title(){
|
jtulach@678
|
6704 |
//console.log('get title');
|
jtulach@678
|
6705 |
if (!this.documentElement) {
|
jtulach@678
|
6706 |
this.appendChild(this.createElement('html'));
|
jtulach@678
|
6707 |
}
|
jtulach@678
|
6708 |
var title,
|
jtulach@678
|
6709 |
head = this.head,
|
jtulach@678
|
6710 |
length = head.childNodes.length,
|
jtulach@678
|
6711 |
i;
|
jtulach@678
|
6712 |
//check for the presence of the title element in this head element
|
jtulach@678
|
6713 |
for(i=0;i<length;i++){
|
jtulach@678
|
6714 |
if(head.childNodes[i].nodeType === Node.ELEMENT_NODE){
|
jtulach@678
|
6715 |
if(head.childNodes[i].tagName.toLowerCase() === 'title'){
|
jtulach@678
|
6716 |
return head.childNodes[i].textContent;
|
jtulach@678
|
6717 |
}
|
jtulach@678
|
6718 |
}
|
jtulach@678
|
6719 |
}
|
jtulach@678
|
6720 |
//no title? ugh bad news html.. I guess we'll force the issue?
|
jtulach@678
|
6721 |
title = head.appendChild(this.createElement('title'));
|
jtulach@678
|
6722 |
return title.appendChild(this.createTextNode('Untitled Document')).nodeValue;
|
jtulach@678
|
6723 |
},
|
jtulach@678
|
6724 |
set title(titleStr){
|
jtulach@678
|
6725 |
//console.log('set title %s', titleStr);
|
jtulach@678
|
6726 |
if (!this.documentElement) {
|
jtulach@678
|
6727 |
this.appendChild(this.createElement('html'));
|
jtulach@678
|
6728 |
}
|
jtulach@678
|
6729 |
var title = this.title;
|
jtulach@678
|
6730 |
title.textContent = titleStr;
|
jtulach@678
|
6731 |
},
|
jtulach@678
|
6732 |
|
jtulach@678
|
6733 |
get body(){
|
jtulach@678
|
6734 |
//console.log('get body');
|
jtulach@678
|
6735 |
if (!this.documentElement) {
|
jtulach@678
|
6736 |
this.appendChild(this.createElement('html'));
|
jtulach@678
|
6737 |
}
|
jtulach@678
|
6738 |
var body,
|
jtulach@678
|
6739 |
element = this.documentElement,
|
jtulach@678
|
6740 |
length = element.childNodes.length,
|
jtulach@678
|
6741 |
i;
|
jtulach@678
|
6742 |
//check for the presence of the head element in this html doc
|
jtulach@678
|
6743 |
for(i=0;i<length;i++){
|
jtulach@678
|
6744 |
if(element.childNodes[i].nodeType === Node.ELEMENT_NODE){
|
jtulach@678
|
6745 |
if(element.childNodes[i].tagName.toLowerCase() === 'body'){
|
jtulach@678
|
6746 |
return element.childNodes[i];
|
jtulach@678
|
6747 |
}
|
jtulach@678
|
6748 |
}
|
jtulach@678
|
6749 |
}
|
jtulach@678
|
6750 |
//no head? ugh bad news html.. I guess we'll force the issue?
|
jtulach@678
|
6751 |
return element.appendChild(this.createElement('body'));
|
jtulach@678
|
6752 |
},
|
jtulach@678
|
6753 |
set body(x){console.log('set body');/**in firefox this is a benevolent do nothing*/},
|
jtulach@678
|
6754 |
get cookie(){
|
jtulach@678
|
6755 |
return Envjs.getCookies(this.location+'');
|
jtulach@678
|
6756 |
},
|
jtulach@678
|
6757 |
set cookie(cookie){
|
jtulach@678
|
6758 |
return Envjs.setCookie(this.location+'', cookie);
|
jtulach@678
|
6759 |
},
|
jtulach@678
|
6760 |
|
jtulach@678
|
6761 |
/**
|
jtulach@678
|
6762 |
* document.location
|
jtulach@678
|
6763 |
*
|
jtulach@678
|
6764 |
* should be identical to window.location
|
jtulach@678
|
6765 |
*
|
jtulach@678
|
6766 |
* HTML5:
|
jtulach@678
|
6767 |
* http://dev.w3.org/html5/spec/Overview.html#the-location-interface
|
jtulach@678
|
6768 |
*
|
jtulach@678
|
6769 |
* Mozilla MDC:
|
jtulach@678
|
6770 |
* https://developer.mozilla.org/en/DOM/document.location
|
jtulach@678
|
6771 |
*
|
jtulach@678
|
6772 |
*/
|
jtulach@678
|
6773 |
get location() {
|
jtulach@678
|
6774 |
if (this.ownerWindow) {
|
jtulach@678
|
6775 |
return this.ownerWindow.location;
|
jtulach@678
|
6776 |
} else {
|
jtulach@678
|
6777 |
return this.baseURI;
|
jtulach@678
|
6778 |
}
|
jtulach@678
|
6779 |
},
|
jtulach@678
|
6780 |
set location(url) {
|
jtulach@678
|
6781 |
this.baseURI = url;
|
jtulach@678
|
6782 |
if (this.ownerWindow) {
|
jtulach@678
|
6783 |
this.ownerWindow.location = url;
|
jtulach@678
|
6784 |
}
|
jtulach@678
|
6785 |
},
|
jtulach@678
|
6786 |
|
jtulach@678
|
6787 |
/**
|
jtulach@678
|
6788 |
* document.URL (read-only)
|
jtulach@678
|
6789 |
*
|
jtulach@678
|
6790 |
* HTML DOM Level 2:
|
jtulach@678
|
6791 |
* http://www.w3.org/TR/DOM-Level-2-HTML/html.html#ID-46183437
|
jtulach@678
|
6792 |
*
|
jtulach@678
|
6793 |
* HTML5:
|
jtulach@678
|
6794 |
* http://dev.w3.org/html5/spec/Overview.html#dom-document-url
|
jtulach@678
|
6795 |
*
|
jtulach@678
|
6796 |
* Mozilla MDC:
|
jtulach@678
|
6797 |
* https://developer.mozilla.org/en/DOM/document.URL
|
jtulach@678
|
6798 |
*/
|
jtulach@678
|
6799 |
get URL() {
|
jtulach@678
|
6800 |
return this.location;
|
jtulach@678
|
6801 |
},
|
jtulach@678
|
6802 |
set URL(url) {
|
jtulach@678
|
6803 |
this.location = url;
|
jtulach@678
|
6804 |
},
|
jtulach@678
|
6805 |
|
jtulach@678
|
6806 |
/**
|
jtulach@678
|
6807 |
* document.domain
|
jtulach@678
|
6808 |
*
|
jtulach@678
|
6809 |
* HTML5 Spec:
|
jtulach@678
|
6810 |
* http://dev.w3.org/html5/spec/Overview.html#dom-document-domain
|
jtulach@678
|
6811 |
*
|
jtulach@678
|
6812 |
* Mozilla MDC:
|
jtulach@678
|
6813 |
* https://developer.mozilla.org/en/DOM/document.domain
|
jtulach@678
|
6814 |
*
|
jtulach@678
|
6815 |
*/
|
jtulach@678
|
6816 |
get domain(){
|
jtulach@678
|
6817 |
var HOSTNAME = new RegExp('\/\/([^\:\/]+)'),
|
jtulach@678
|
6818 |
matches = HOSTNAME.exec(this.baseURI);
|
jtulach@678
|
6819 |
return matches&&matches.length>1?matches[1]:"";
|
jtulach@678
|
6820 |
},
|
jtulach@678
|
6821 |
set domain(value){
|
jtulach@678
|
6822 |
var i,
|
jtulach@678
|
6823 |
domainParts = this.domain.split('.').reverse(),
|
jtulach@678
|
6824 |
newDomainParts = value.split('.').reverse();
|
jtulach@678
|
6825 |
if(newDomainParts.length > 1){
|
jtulach@678
|
6826 |
for(i=0;i<newDomainParts.length;i++){
|
jtulach@678
|
6827 |
if(!(newDomainParts[i] === domainParts[i])){
|
jtulach@678
|
6828 |
return;
|
jtulach@678
|
6829 |
}
|
jtulach@678
|
6830 |
}
|
jtulach@678
|
6831 |
this.baseURI = this.baseURI.replace(domainParts.join('.'), value);
|
jtulach@678
|
6832 |
}
|
jtulach@678
|
6833 |
},
|
jtulach@678
|
6834 |
|
jtulach@678
|
6835 |
get forms(){
|
jtulach@678
|
6836 |
return new HTMLCollection(this.getElementsByTagName('form'));
|
jtulach@678
|
6837 |
},
|
jtulach@678
|
6838 |
get images(){
|
jtulach@678
|
6839 |
return new HTMLCollection(this.getElementsByTagName('img'));
|
jtulach@678
|
6840 |
},
|
jtulach@678
|
6841 |
get lastModified(){
|
jtulach@678
|
6842 |
/* TODO */
|
jtulach@678
|
6843 |
return this._lastModified;
|
jtulach@678
|
6844 |
},
|
jtulach@678
|
6845 |
get links(){
|
jtulach@678
|
6846 |
return new HTMLCollection(this.getElementsByTagName('a'));
|
jtulach@678
|
6847 |
},
|
jtulach@678
|
6848 |
getElementsByName : function(name){
|
jtulach@678
|
6849 |
//returns a real Array + the NodeList
|
jtulach@678
|
6850 |
var retNodes = __extend__([],new NodeList(this, this.documentElement)),
|
jtulach@678
|
6851 |
node;
|
jtulach@678
|
6852 |
// loop through all Elements
|
jtulach@678
|
6853 |
var all = this.getElementsByTagName('*');
|
jtulach@678
|
6854 |
for (var i=0; i < all.length; i++) {
|
jtulach@678
|
6855 |
node = all[i];
|
jtulach@678
|
6856 |
if (node.nodeType === Node.ELEMENT_NODE &&
|
jtulach@678
|
6857 |
node.getAttribute('name') == name) {
|
jtulach@678
|
6858 |
retNodes.push(node);
|
jtulach@678
|
6859 |
}
|
jtulach@678
|
6860 |
}
|
jtulach@678
|
6861 |
return retNodes;
|
jtulach@678
|
6862 |
},
|
jtulach@678
|
6863 |
toString: function(){
|
jtulach@678
|
6864 |
return "[object HTMLDocument]";
|
jtulach@678
|
6865 |
},
|
jtulach@678
|
6866 |
get innerHTML(){
|
jtulach@678
|
6867 |
return this.documentElement.outerHTML;
|
jtulach@678
|
6868 |
}
|
jtulach@678
|
6869 |
});
|
jtulach@678
|
6870 |
|
jtulach@678
|
6871 |
|
jtulach@678
|
6872 |
|
jtulach@678
|
6873 |
Aspect.around({
|
jtulach@678
|
6874 |
target: Node,
|
jtulach@678
|
6875 |
method:"appendChild"
|
jtulach@678
|
6876 |
}, function(invocation) {
|
jtulach@678
|
6877 |
var event,
|
jtulach@678
|
6878 |
okay,
|
jtulach@678
|
6879 |
node = invocation.proceed(),
|
jtulach@678
|
6880 |
doc = node.ownerDocument;
|
jtulach@678
|
6881 |
|
jtulach@678
|
6882 |
//console.log('element appended: %s %s %s', node+'', node.nodeName, node.namespaceURI);
|
jtulach@678
|
6883 |
if((node.nodeType !== Node.ELEMENT_NODE)){
|
jtulach@678
|
6884 |
//for now we are only handling element insertions. probably
|
jtulach@678
|
6885 |
//we will need to handle text node changes to script tags and
|
jtulach@678
|
6886 |
//changes to src attributes
|
jtulach@678
|
6887 |
return node;
|
jtulach@678
|
6888 |
}
|
jtulach@678
|
6889 |
//console.log('appended html element %s %s %s',
|
jtulach@678
|
6890 |
// node.namespaceURI, node.nodeName, node);
|
jtulach@678
|
6891 |
switch(doc.parsing){
|
jtulach@678
|
6892 |
case true:
|
jtulach@678
|
6893 |
//handled by parser if included
|
jtulach@678
|
6894 |
//console.log('html document in parse mode');
|
jtulach@678
|
6895 |
break;
|
jtulach@678
|
6896 |
case false:
|
jtulach@678
|
6897 |
switch(node.namespaceURI){
|
jtulach@678
|
6898 |
case null:
|
jtulach@678
|
6899 |
//fall through
|
jtulach@678
|
6900 |
case "":
|
jtulach@678
|
6901 |
//fall through
|
jtulach@678
|
6902 |
case "http://www.w3.org/1999/xhtml":
|
jtulach@678
|
6903 |
switch(node.tagName.toLowerCase()){
|
jtulach@678
|
6904 |
case 'style':
|
jtulach@678
|
6905 |
document.styleSheets.push(CSSStyleSheet(node));
|
jtulach@678
|
6906 |
break;
|
jtulach@678
|
6907 |
case 'script':
|
jtulach@678
|
6908 |
if((this.nodeName.toLowerCase() === 'head')){
|
jtulach@678
|
6909 |
try{
|
jtulach@678
|
6910 |
okay = Envjs.loadLocalScript(node, null);
|
jtulach@678
|
6911 |
//console.log('loaded script? %s %s', node.uuid, okay);
|
jtulach@678
|
6912 |
// only fire event if we actually had something to load
|
jtulach@678
|
6913 |
if (node.src && node.src.length > 0){
|
jtulach@678
|
6914 |
event = doc.createEvent('HTMLEvents');
|
jtulach@678
|
6915 |
event.initEvent( okay ? "load" : "error", false, false );
|
jtulach@678
|
6916 |
node.dispatchEvent( event, false );
|
jtulach@678
|
6917 |
}
|
jtulach@678
|
6918 |
}catch(e){
|
jtulach@678
|
6919 |
console.log('error loading html element %s %e', node, e.toString());
|
jtulach@678
|
6920 |
}
|
jtulach@678
|
6921 |
}
|
jtulach@678
|
6922 |
break;
|
jtulach@678
|
6923 |
case 'frame':
|
jtulach@678
|
6924 |
case 'iframe':
|
jtulach@678
|
6925 |
node.contentWindow = { };
|
jtulach@678
|
6926 |
node.contentDocument = new HTMLDocument(new DOMImplementation(), node.contentWindow);
|
jtulach@678
|
6927 |
node.contentWindow.document = node.contentDocument;
|
jtulach@678
|
6928 |
try{
|
jtulach@678
|
6929 |
Window;
|
jtulach@678
|
6930 |
}catch(e){
|
jtulach@678
|
6931 |
node.contentDocument.addEventListener('DOMContentLoaded', function(){
|
jtulach@678
|
6932 |
event = node.contentDocument.createEvent('HTMLEvents');
|
jtulach@678
|
6933 |
event.initEvent("load", false, false);
|
jtulach@678
|
6934 |
node.dispatchEvent( event, false );
|
jtulach@678
|
6935 |
});
|
jtulach@678
|
6936 |
}
|
jtulach@678
|
6937 |
try{
|
jtulach@678
|
6938 |
if (node.src && node.src.length > 0){
|
jtulach@678
|
6939 |
//console.log("getting content document for (i)frame from %s", node.src);
|
jtulach@678
|
6940 |
Envjs.loadFrame(node, Envjs.uri(node.src));
|
jtulach@678
|
6941 |
event = node.contentDocument.createEvent('HTMLEvents');
|
jtulach@678
|
6942 |
event.initEvent("load", false, false);
|
jtulach@678
|
6943 |
node.dispatchEvent( event, false );
|
jtulach@678
|
6944 |
}else{
|
jtulach@678
|
6945 |
//I dont like this being here:
|
jtulach@678
|
6946 |
//TODO: better mix-in strategy so the try/catch isnt required
|
jtulach@678
|
6947 |
try{
|
jtulach@678
|
6948 |
if(Window){
|
jtulach@678
|
6949 |
Envjs.loadFrame(node);
|
jtulach@678
|
6950 |
//console.log('src/html/document.js: triggering frame load');
|
jtulach@678
|
6951 |
event = node.contentDocument.createEvent('HTMLEvents');
|
jtulach@678
|
6952 |
event.initEvent("load", false, false);
|
jtulach@678
|
6953 |
node.dispatchEvent( event, false );
|
jtulach@678
|
6954 |
}
|
jtulach@678
|
6955 |
}catch(e){}
|
jtulach@678
|
6956 |
}
|
jtulach@678
|
6957 |
}catch(e){
|
jtulach@678
|
6958 |
console.log('error loading html element %s %e', node, e.toString());
|
jtulach@678
|
6959 |
}
|
jtulach@678
|
6960 |
break;
|
jtulach@678
|
6961 |
|
jtulach@678
|
6962 |
case 'link':
|
jtulach@678
|
6963 |
if (node.href && node.href.length > 0) {
|
jtulach@678
|
6964 |
__loadLink__(node, node.href);
|
jtulach@678
|
6965 |
}
|
jtulach@678
|
6966 |
break;
|
jtulach@678
|
6967 |
/*
|
jtulach@678
|
6968 |
case 'img':
|
jtulach@678
|
6969 |
if (node.src && node.src.length > 0){
|
jtulach@678
|
6970 |
// don't actually load anything, so we're "done" immediately:
|
jtulach@678
|
6971 |
event = doc.createEvent('HTMLEvents');
|
jtulach@678
|
6972 |
event.initEvent("load", false, false);
|
jtulach@678
|
6973 |
node.dispatchEvent( event, false );
|
jtulach@678
|
6974 |
}
|
jtulach@678
|
6975 |
break;
|
jtulach@678
|
6976 |
*/
|
jtulach@678
|
6977 |
case 'option':
|
jtulach@678
|
6978 |
node._updateoptions();
|
jtulach@678
|
6979 |
break;
|
jtulach@678
|
6980 |
default:
|
jtulach@678
|
6981 |
if(node.getAttribute('onload')){
|
jtulach@678
|
6982 |
console.log('calling attribute onload %s | %s', node.onload, node.tagName);
|
jtulach@678
|
6983 |
node.onload();
|
jtulach@678
|
6984 |
}
|
jtulach@678
|
6985 |
break;
|
jtulach@678
|
6986 |
}//switch on name
|
jtulach@678
|
6987 |
default:
|
jtulach@678
|
6988 |
break;
|
jtulach@678
|
6989 |
}//switch on ns
|
jtulach@678
|
6990 |
break;
|
jtulach@678
|
6991 |
default:
|
jtulach@678
|
6992 |
// console.log('element appended: %s %s', node+'', node.namespaceURI);
|
jtulach@678
|
6993 |
}//switch on doc.parsing
|
jtulach@678
|
6994 |
return node;
|
jtulach@678
|
6995 |
|
jtulach@678
|
6996 |
});
|
jtulach@678
|
6997 |
|
jtulach@678
|
6998 |
Aspect.around({
|
jtulach@678
|
6999 |
target: Node,
|
jtulach@678
|
7000 |
method:"removeChild"
|
jtulach@678
|
7001 |
}, function(invocation) {
|
jtulach@678
|
7002 |
var event,
|
jtulach@678
|
7003 |
okay,
|
jtulach@678
|
7004 |
node = invocation.proceed(),
|
jtulach@678
|
7005 |
doc = node.ownerDocument;
|
jtulach@678
|
7006 |
if((node.nodeType !== Node.ELEMENT_NODE)){
|
jtulach@678
|
7007 |
//for now we are only handling element insertions. probably we will need
|
jtulach@678
|
7008 |
//to handle text node changes to script tags and changes to src
|
jtulach@678
|
7009 |
//attributes
|
jtulach@678
|
7010 |
if(node.nodeType !== Node.DOCUMENT_NODE && node.uuid){
|
jtulach@678
|
7011 |
//console.log('removing event listeners, %s', node, node.uuid);
|
jtulach@678
|
7012 |
node.removeEventListener('*', null, null);
|
jtulach@678
|
7013 |
}
|
jtulach@678
|
7014 |
return node;
|
jtulach@678
|
7015 |
}
|
jtulach@678
|
7016 |
//console.log('appended html element %s %s %s', node.namespaceURI, node.nodeName, node);
|
jtulach@678
|
7017 |
|
jtulach@678
|
7018 |
switch(doc.parsing){
|
jtulach@678
|
7019 |
case true:
|
jtulach@678
|
7020 |
//handled by parser if included
|
jtulach@678
|
7021 |
break;
|
jtulach@678
|
7022 |
case false:
|
jtulach@678
|
7023 |
switch(node.namespaceURI){
|
jtulach@678
|
7024 |
case null:
|
jtulach@678
|
7025 |
//fall through
|
jtulach@678
|
7026 |
case "":
|
jtulach@678
|
7027 |
//fall through
|
jtulach@678
|
7028 |
case "http://www.w3.org/1999/xhtml":
|
jtulach@678
|
7029 |
//this is interesting dillema since our event engine is
|
jtulach@678
|
7030 |
//storing the registered events in an array accessed
|
jtulach@678
|
7031 |
//by the uuid property of the node. unforunately this
|
jtulach@678
|
7032 |
//means listeners hang out way after(forever ;)) the node
|
jtulach@678
|
7033 |
//has been removed and gone out of scope.
|
jtulach@678
|
7034 |
//console.log('removing event listeners, %s', node, node.uuid);
|
jtulach@678
|
7035 |
node.removeEventListener('*', null, null);
|
jtulach@678
|
7036 |
switch(node.tagName.toLowerCase()){
|
jtulach@678
|
7037 |
case 'frame':
|
jtulach@678
|
7038 |
case 'iframe':
|
jtulach@678
|
7039 |
try{
|
jtulach@678
|
7040 |
//console.log('removing iframe document');
|
jtulach@678
|
7041 |
try{
|
jtulach@678
|
7042 |
Envjs.unloadFrame(node);
|
jtulach@678
|
7043 |
}catch(e){
|
jtulach@678
|
7044 |
console.log('error freeing resources from frame %s', e);
|
jtulach@678
|
7045 |
}
|
jtulach@678
|
7046 |
node.contentWindow = null;
|
jtulach@678
|
7047 |
node.contentDocument = null;
|
jtulach@678
|
7048 |
}catch(e){
|
jtulach@678
|
7049 |
console.log('error unloading html element %s %e', node, e.toString());
|
jtulach@678
|
7050 |
}
|
jtulach@678
|
7051 |
break;
|
jtulach@678
|
7052 |
default:
|
jtulach@678
|
7053 |
break;
|
jtulach@678
|
7054 |
}//switch on name
|
jtulach@678
|
7055 |
default:
|
jtulach@678
|
7056 |
break;
|
jtulach@678
|
7057 |
}//switch on ns
|
jtulach@678
|
7058 |
break;
|
jtulach@678
|
7059 |
default:
|
jtulach@678
|
7060 |
console.log('element appended: %s %s', node+'', node.namespaceURI);
|
jtulach@678
|
7061 |
}//switch on doc.parsing
|
jtulach@678
|
7062 |
return node;
|
jtulach@678
|
7063 |
|
jtulach@678
|
7064 |
});
|
jtulach@678
|
7065 |
|
jtulach@678
|
7066 |
|
jtulach@678
|
7067 |
|
jtulach@678
|
7068 |
/**
|
jtulach@678
|
7069 |
* Named Element Support
|
jtulach@678
|
7070 |
*
|
jtulach@678
|
7071 |
*
|
jtulach@678
|
7072 |
*/
|
jtulach@678
|
7073 |
|
jtulach@678
|
7074 |
/*
|
jtulach@678
|
7075 |
*
|
jtulach@678
|
7076 |
* @returns 'name' if the node has a appropriate name
|
jtulach@678
|
7077 |
* null if node does not have a name
|
jtulach@678
|
7078 |
*/
|
jtulach@678
|
7079 |
|
jtulach@678
|
7080 |
var __isNamedElement__ = function(node) {
|
jtulach@678
|
7081 |
if (node.nodeType !== Node.ELEMENT_NODE) {
|
jtulach@678
|
7082 |
return null;
|
jtulach@678
|
7083 |
}
|
jtulach@678
|
7084 |
var tagName = node.tagName.toLowerCase();
|
jtulach@678
|
7085 |
var nodename = null;
|
jtulach@678
|
7086 |
|
jtulach@678
|
7087 |
switch (tagName) {
|
jtulach@678
|
7088 |
case 'embed':
|
jtulach@678
|
7089 |
case 'form':
|
jtulach@678
|
7090 |
case 'iframe':
|
jtulach@678
|
7091 |
nodename = node.getAttribute('name');
|
jtulach@678
|
7092 |
break;
|
jtulach@678
|
7093 |
case 'applet':
|
jtulach@678
|
7094 |
nodename = node.id;
|
jtulach@678
|
7095 |
break;
|
jtulach@678
|
7096 |
case 'object':
|
jtulach@678
|
7097 |
// TODO: object needs to be 'fallback free'
|
jtulach@678
|
7098 |
nodename = node.id;
|
jtulach@678
|
7099 |
break;
|
jtulach@678
|
7100 |
case 'img':
|
jtulach@678
|
7101 |
nodename = node.id;
|
jtulach@678
|
7102 |
if (!nodename || ! node.getAttribute('name')) {
|
jtulach@678
|
7103 |
nodename = null;
|
jtulach@678
|
7104 |
}
|
jtulach@678
|
7105 |
break;
|
jtulach@678
|
7106 |
}
|
jtulach@678
|
7107 |
return (nodename) ? nodename : null;
|
jtulach@678
|
7108 |
};
|
jtulach@678
|
7109 |
|
jtulach@678
|
7110 |
|
jtulach@678
|
7111 |
var __addNamedMap__ = function(target, node) {
|
jtulach@678
|
7112 |
var nodename = __isNamedElement__(node);
|
jtulach@678
|
7113 |
if (nodename) {
|
jtulach@678
|
7114 |
target.__defineGetter__(nodename, function() {
|
jtulach@678
|
7115 |
return node;
|
jtulach@678
|
7116 |
});
|
jtulach@678
|
7117 |
}
|
jtulach@678
|
7118 |
};
|
jtulach@678
|
7119 |
|
jtulach@678
|
7120 |
var __removeNamedMap__ = function(target, node) {
|
jtulach@678
|
7121 |
if (!node) {
|
jtulach@678
|
7122 |
return;
|
jtulach@678
|
7123 |
}
|
jtulach@678
|
7124 |
var nodename = __isNamedElement__(node);
|
jtulach@678
|
7125 |
if (nodename) {
|
jtulach@678
|
7126 |
delete target[nodename];
|
jtulach@678
|
7127 |
}
|
jtulach@678
|
7128 |
};
|
jtulach@678
|
7129 |
|
jtulach@678
|
7130 |
/**
|
jtulach@678
|
7131 |
* @name HTMLEvents
|
jtulach@678
|
7132 |
* @w3c:domlevel 2
|
jtulach@678
|
7133 |
* @uri http://www.w3.org/TR/2000/REC-DOM-Level-2-Events-20001113/events.html
|
jtulach@678
|
7134 |
*/
|
jtulach@678
|
7135 |
|
jtulach@678
|
7136 |
var __eval__ = function(script, node){
|
jtulach@678
|
7137 |
if (!script == ""){
|
jtulach@678
|
7138 |
// don't assemble environment if no script...
|
jtulach@678
|
7139 |
try{
|
jtulach@678
|
7140 |
eval(script);
|
jtulach@678
|
7141 |
}catch(e){
|
jtulach@678
|
7142 |
console.log('error evaluating %s', e);
|
jtulach@678
|
7143 |
}
|
jtulach@678
|
7144 |
}
|
jtulach@678
|
7145 |
};
|
jtulach@678
|
7146 |
|
jtulach@678
|
7147 |
var HTMLEvents= function(){};
|
jtulach@678
|
7148 |
HTMLEvents.prototype = {
|
jtulach@678
|
7149 |
onload: function(event){
|
jtulach@678
|
7150 |
__eval__(this.getAttribute('onload')||'', this);
|
jtulach@678
|
7151 |
},
|
jtulach@678
|
7152 |
onunload: function(event){
|
jtulach@678
|
7153 |
__eval__(this.getAttribute('onunload')||'', this);
|
jtulach@678
|
7154 |
},
|
jtulach@678
|
7155 |
onabort: function(event){
|
jtulach@678
|
7156 |
__eval__(this.getAttribute('onabort')||'', this);
|
jtulach@678
|
7157 |
},
|
jtulach@678
|
7158 |
onerror: function(event){
|
jtulach@678
|
7159 |
__eval__(this.getAttribute('onerror')||'', this);
|
jtulach@678
|
7160 |
},
|
jtulach@678
|
7161 |
onselect: function(event){
|
jtulach@678
|
7162 |
__eval__(this.getAttribute('onselect')||'', this);
|
jtulach@678
|
7163 |
},
|
jtulach@678
|
7164 |
onchange: function(event){
|
jtulach@678
|
7165 |
__eval__(this.getAttribute('onchange')||'', this);
|
jtulach@678
|
7166 |
},
|
jtulach@678
|
7167 |
onsubmit: function(event){
|
jtulach@678
|
7168 |
if (__eval__(this.getAttribute('onsubmit')||'', this)) {
|
jtulach@678
|
7169 |
this.submit();
|
jtulach@678
|
7170 |
}
|
jtulach@678
|
7171 |
},
|
jtulach@678
|
7172 |
onreset: function(event){
|
jtulach@678
|
7173 |
__eval__(this.getAttribute('onreset')||'', this);
|
jtulach@678
|
7174 |
},
|
jtulach@678
|
7175 |
onfocus: function(event){
|
jtulach@678
|
7176 |
__eval__(this.getAttribute('onfocus')||'', this);
|
jtulach@678
|
7177 |
},
|
jtulach@678
|
7178 |
onblur: function(event){
|
jtulach@678
|
7179 |
__eval__(this.getAttribute('onblur')||'', this);
|
jtulach@678
|
7180 |
},
|
jtulach@678
|
7181 |
onresize: function(event){
|
jtulach@678
|
7182 |
__eval__(this.getAttribute('onresize')||'', this);
|
jtulach@678
|
7183 |
},
|
jtulach@678
|
7184 |
onscroll: function(event){
|
jtulach@678
|
7185 |
__eval__(this.getAttribute('onscroll')||'', this);
|
jtulach@678
|
7186 |
}
|
jtulach@678
|
7187 |
};
|
jtulach@678
|
7188 |
|
jtulach@678
|
7189 |
//HTMLDocument, HTMLFramesetElement, HTMLObjectElement
|
jtulach@678
|
7190 |
var __load__ = function(element){
|
jtulach@678
|
7191 |
var event = new Event('HTMLEvents');
|
jtulach@678
|
7192 |
event.initEvent("load", false, false);
|
jtulach@678
|
7193 |
element.dispatchEvent(event);
|
jtulach@678
|
7194 |
return event;
|
jtulach@678
|
7195 |
};
|
jtulach@678
|
7196 |
|
jtulach@678
|
7197 |
//HTMLFramesetElement, HTMLBodyElement
|
jtulach@678
|
7198 |
var __unload__ = function(element){
|
jtulach@678
|
7199 |
var event = new Event('HTMLEvents');
|
jtulach@678
|
7200 |
event.initEvent("unload", false, false);
|
jtulach@678
|
7201 |
element.dispatchEvent(event);
|
jtulach@678
|
7202 |
return event;
|
jtulach@678
|
7203 |
};
|
jtulach@678
|
7204 |
|
jtulach@678
|
7205 |
//HTMLObjectElement
|
jtulach@678
|
7206 |
var __abort__ = function(element){
|
jtulach@678
|
7207 |
var event = new Event('HTMLEvents');
|
jtulach@678
|
7208 |
event.initEvent("abort", true, false);
|
jtulach@678
|
7209 |
element.dispatchEvent(event);
|
jtulach@678
|
7210 |
return event;
|
jtulach@678
|
7211 |
};
|
jtulach@678
|
7212 |
|
jtulach@678
|
7213 |
//HTMLFramesetElement, HTMLObjectElement, HTMLBodyElement
|
jtulach@678
|
7214 |
var __error__ = function(element){
|
jtulach@678
|
7215 |
var event = new Event('HTMLEvents');
|
jtulach@678
|
7216 |
event.initEvent("error", true, false);
|
jtulach@678
|
7217 |
element.dispatchEvent(event);
|
jtulach@678
|
7218 |
return event;
|
jtulach@678
|
7219 |
};
|
jtulach@678
|
7220 |
|
jtulach@678
|
7221 |
//HTMLInputElement, HTMLTextAreaElement
|
jtulach@678
|
7222 |
var __select__ = function(element){
|
jtulach@678
|
7223 |
var event = new Event('HTMLEvents');
|
jtulach@678
|
7224 |
event.initEvent("select", true, false);
|
jtulach@678
|
7225 |
element.dispatchEvent(event);
|
jtulach@678
|
7226 |
return event;
|
jtulach@678
|
7227 |
};
|
jtulach@678
|
7228 |
|
jtulach@678
|
7229 |
//HTMLInputElement, HTMLSelectElement, HTMLTextAreaElement
|
jtulach@678
|
7230 |
var __change__ = function(element){
|
jtulach@678
|
7231 |
var event = new Event('HTMLEvents');
|
jtulach@678
|
7232 |
event.initEvent("change", true, false);
|
jtulach@678
|
7233 |
element.dispatchEvent(event);
|
jtulach@678
|
7234 |
return event;
|
jtulach@678
|
7235 |
};
|
jtulach@678
|
7236 |
|
jtulach@678
|
7237 |
//HtmlFormElement
|
jtulach@678
|
7238 |
var __submit__ = function(element){
|
jtulach@678
|
7239 |
var event = new Event('HTMLEvents');
|
jtulach@678
|
7240 |
event.initEvent("submit", true, true);
|
jtulach@678
|
7241 |
element.dispatchEvent(event);
|
jtulach@678
|
7242 |
return event;
|
jtulach@678
|
7243 |
};
|
jtulach@678
|
7244 |
|
jtulach@678
|
7245 |
//HtmlFormElement
|
jtulach@678
|
7246 |
var __reset__ = function(element){
|
jtulach@678
|
7247 |
var event = new Event('HTMLEvents');
|
jtulach@678
|
7248 |
event.initEvent("reset", false, false);
|
jtulach@678
|
7249 |
element.dispatchEvent(event);
|
jtulach@678
|
7250 |
return event;
|
jtulach@678
|
7251 |
};
|
jtulach@678
|
7252 |
|
jtulach@678
|
7253 |
//LABEL, INPUT, SELECT, TEXTAREA, and BUTTON
|
jtulach@678
|
7254 |
var __focus__ = function(element){
|
jtulach@678
|
7255 |
var event = new Event('HTMLEvents');
|
jtulach@678
|
7256 |
event.initEvent("focus", false, false);
|
jtulach@678
|
7257 |
element.dispatchEvent(event);
|
jtulach@678
|
7258 |
return event;
|
jtulach@678
|
7259 |
};
|
jtulach@678
|
7260 |
|
jtulach@678
|
7261 |
//LABEL, INPUT, SELECT, TEXTAREA, and BUTTON
|
jtulach@678
|
7262 |
var __blur__ = function(element){
|
jtulach@678
|
7263 |
var event = new Event('HTMLEvents');
|
jtulach@678
|
7264 |
event.initEvent("blur", false, false);
|
jtulach@678
|
7265 |
element.dispatchEvent(event);
|
jtulach@678
|
7266 |
return event;
|
jtulach@678
|
7267 |
};
|
jtulach@678
|
7268 |
|
jtulach@678
|
7269 |
//Window
|
jtulach@678
|
7270 |
var __resize__ = function(element){
|
jtulach@678
|
7271 |
var event = new Event('HTMLEvents');
|
jtulach@678
|
7272 |
event.initEvent("resize", true, false);
|
jtulach@678
|
7273 |
element.dispatchEvent(event);
|
jtulach@678
|
7274 |
return event;
|
jtulach@678
|
7275 |
};
|
jtulach@678
|
7276 |
|
jtulach@678
|
7277 |
//Window
|
jtulach@678
|
7278 |
var __scroll__ = function(element){
|
jtulach@678
|
7279 |
var event = new Event('HTMLEvents');
|
jtulach@678
|
7280 |
event.initEvent("scroll", true, false);
|
jtulach@678
|
7281 |
element.dispatchEvent(event);
|
jtulach@678
|
7282 |
return event;
|
jtulach@678
|
7283 |
};
|
jtulach@678
|
7284 |
|
jtulach@678
|
7285 |
/**
|
jtulach@678
|
7286 |
* @name KeyboardEvents
|
jtulach@678
|
7287 |
* @w3c:domlevel 2
|
jtulach@678
|
7288 |
* @uri http://www.w3.org/TR/2000/REC-DOM-Level-2-Events-20001113/events.html
|
jtulach@678
|
7289 |
*/
|
jtulach@678
|
7290 |
var KeyboardEvents= function(){};
|
jtulach@678
|
7291 |
KeyboardEvents.prototype = {
|
jtulach@678
|
7292 |
onkeydown: function(event){
|
jtulach@678
|
7293 |
__eval__(this.getAttribute('onkeydown')||'', this);
|
jtulach@678
|
7294 |
},
|
jtulach@678
|
7295 |
onkeypress: function(event){
|
jtulach@678
|
7296 |
__eval__(this.getAttribute('onkeypress')||'', this);
|
jtulach@678
|
7297 |
},
|
jtulach@678
|
7298 |
onkeyup: function(event){
|
jtulach@678
|
7299 |
__eval__(this.getAttribute('onkeyup')||'', this);
|
jtulach@678
|
7300 |
}
|
jtulach@678
|
7301 |
};
|
jtulach@678
|
7302 |
|
jtulach@678
|
7303 |
|
jtulach@678
|
7304 |
var __registerKeyboardEventAttrs__ = function(elm){
|
jtulach@678
|
7305 |
if(elm.hasAttribute('onkeydown')){
|
jtulach@678
|
7306 |
elm.addEventListener('keydown', elm.onkeydown, false);
|
jtulach@678
|
7307 |
}
|
jtulach@678
|
7308 |
if(elm.hasAttribute('onkeypress')){
|
jtulach@678
|
7309 |
elm.addEventListener('keypress', elm.onkeypress, false);
|
jtulach@678
|
7310 |
}
|
jtulach@678
|
7311 |
if(elm.hasAttribute('onkeyup')){
|
jtulach@678
|
7312 |
elm.addEventListener('keyup', elm.onkeyup, false);
|
jtulach@678
|
7313 |
}
|
jtulach@678
|
7314 |
return elm;
|
jtulach@678
|
7315 |
};
|
jtulach@678
|
7316 |
|
jtulach@678
|
7317 |
//HTMLInputElement, HTMLSelectElement, HTMLTextAreaElement
|
jtulach@678
|
7318 |
var __keydown__ = function(element){
|
jtulach@678
|
7319 |
var event = new Event('KeyboardEvents');
|
jtulach@678
|
7320 |
event.initEvent("keydown", false, false);
|
jtulach@678
|
7321 |
element.dispatchEvent(event);
|
jtulach@678
|
7322 |
};
|
jtulach@678
|
7323 |
|
jtulach@678
|
7324 |
//HTMLInputElement, HTMLSelectElement, HTMLTextAreaElement
|
jtulach@678
|
7325 |
var __keypress__ = function(element){
|
jtulach@678
|
7326 |
var event = new Event('KeyboardEvents');
|
jtulach@678
|
7327 |
event.initEvent("keypress", false, false);
|
jtulach@678
|
7328 |
element.dispatchEvent(event);
|
jtulach@678
|
7329 |
};
|
jtulach@678
|
7330 |
|
jtulach@678
|
7331 |
//HTMLInputElement, HTMLSelectElement, HTMLTextAreaElement
|
jtulach@678
|
7332 |
var __keyup__ = function(element){
|
jtulach@678
|
7333 |
var event = new Event('KeyboardEvents');
|
jtulach@678
|
7334 |
event.initEvent("keyup", false, false);
|
jtulach@678
|
7335 |
element.dispatchEvent(event);
|
jtulach@678
|
7336 |
};
|
jtulach@678
|
7337 |
|
jtulach@678
|
7338 |
/**
|
jtulach@678
|
7339 |
* @name MaouseEvents
|
jtulach@678
|
7340 |
* @w3c:domlevel 2
|
jtulach@678
|
7341 |
* @uri http://www.w3.org/TR/2000/REC-DOM-Level-2-Events-20001113/events.html
|
jtulach@678
|
7342 |
*/
|
jtulach@678
|
7343 |
var MouseEvents= function(){};
|
jtulach@678
|
7344 |
MouseEvents.prototype = {
|
jtulach@678
|
7345 |
onclick: function(event){
|
jtulach@678
|
7346 |
__eval__(this.getAttribute('onclick')||'', this);
|
jtulach@678
|
7347 |
},
|
jtulach@678
|
7348 |
ondblclick: function(event){
|
jtulach@678
|
7349 |
__eval__(this.getAttribute('ondblclick')||'', this);
|
jtulach@678
|
7350 |
},
|
jtulach@678
|
7351 |
onmousedown: function(event){
|
jtulach@678
|
7352 |
__eval__(this.getAttribute('onmousedown')||'', this);
|
jtulach@678
|
7353 |
},
|
jtulach@678
|
7354 |
onmousemove: function(event){
|
jtulach@678
|
7355 |
__eval__(this.getAttribute('onmousemove')||'', this);
|
jtulach@678
|
7356 |
},
|
jtulach@678
|
7357 |
onmouseout: function(event){
|
jtulach@678
|
7358 |
__eval__(this.getAttribute('onmouseout')||'', this);
|
jtulach@678
|
7359 |
},
|
jtulach@678
|
7360 |
onmouseover: function(event){
|
jtulach@678
|
7361 |
__eval__(this.getAttribute('onmouseover')||'', this);
|
jtulach@678
|
7362 |
},
|
jtulach@678
|
7363 |
onmouseup: function(event){
|
jtulach@678
|
7364 |
__eval__(this.getAttribute('onmouseup')||'', this);
|
jtulach@678
|
7365 |
}
|
jtulach@678
|
7366 |
};
|
jtulach@678
|
7367 |
|
jtulach@678
|
7368 |
var __registerMouseEventAttrs__ = function(elm){
|
jtulach@678
|
7369 |
if(elm.hasAttribute('onclick')){
|
jtulach@678
|
7370 |
elm.addEventListener('click', elm.onclick, false);
|
jtulach@678
|
7371 |
}
|
jtulach@678
|
7372 |
if(elm.hasAttribute('ondblclick')){
|
jtulach@678
|
7373 |
elm.addEventListener('dblclick', elm.ondblclick, false);
|
jtulach@678
|
7374 |
}
|
jtulach@678
|
7375 |
if(elm.hasAttribute('onmousedown')){
|
jtulach@678
|
7376 |
elm.addEventListener('mousedown', elm.onmousedown, false);
|
jtulach@678
|
7377 |
}
|
jtulach@678
|
7378 |
if(elm.hasAttribute('onmousemove')){
|
jtulach@678
|
7379 |
elm.addEventListener('mousemove', elm.onmousemove, false);
|
jtulach@678
|
7380 |
}
|
jtulach@678
|
7381 |
if(elm.hasAttribute('onmouseout')){
|
jtulach@678
|
7382 |
elm.addEventListener('mouseout', elm.onmouseout, false);
|
jtulach@678
|
7383 |
}
|
jtulach@678
|
7384 |
if(elm.hasAttribute('onmouseover')){
|
jtulach@678
|
7385 |
elm.addEventListener('mouseover', elm.onmouseover, false);
|
jtulach@678
|
7386 |
}
|
jtulach@678
|
7387 |
if(elm.hasAttribute('onmouseup')){
|
jtulach@678
|
7388 |
elm.addEventListener('mouseup', elm.onmouseup, false);
|
jtulach@678
|
7389 |
}
|
jtulach@678
|
7390 |
return elm;
|
jtulach@678
|
7391 |
};
|
jtulach@678
|
7392 |
|
jtulach@678
|
7393 |
|
jtulach@678
|
7394 |
var __click__ = function(element){
|
jtulach@678
|
7395 |
var event = new Event('MouseEvents');
|
jtulach@678
|
7396 |
event.initEvent("click", true, true, null, 0,
|
jtulach@678
|
7397 |
0, 0, 0, 0, false, false, false,
|
jtulach@678
|
7398 |
false, null, null);
|
jtulach@678
|
7399 |
element.dispatchEvent(event);
|
jtulach@678
|
7400 |
};
|
jtulach@678
|
7401 |
var __mousedown__ = function(element){
|
jtulach@678
|
7402 |
var event = new Event('MouseEvents');
|
jtulach@678
|
7403 |
event.initEvent("mousedown", true, true, null, 0,
|
jtulach@678
|
7404 |
0, 0, 0, 0, false, false, false,
|
jtulach@678
|
7405 |
false, null, null);
|
jtulach@678
|
7406 |
element.dispatchEvent(event);
|
jtulach@678
|
7407 |
};
|
jtulach@678
|
7408 |
var __mouseup__ = function(element){
|
jtulach@678
|
7409 |
var event = new Event('MouseEvents');
|
jtulach@678
|
7410 |
event.initEvent("mouseup", true, true, null, 0,
|
jtulach@678
|
7411 |
0, 0, 0, 0, false, false, false,
|
jtulach@678
|
7412 |
false, null, null);
|
jtulach@678
|
7413 |
element.dispatchEvent(event);
|
jtulach@678
|
7414 |
};
|
jtulach@678
|
7415 |
var __mouseover__ = function(element){
|
jtulach@678
|
7416 |
var event = new Event('MouseEvents');
|
jtulach@678
|
7417 |
event.initEvent("mouseover", true, true, null, 0,
|
jtulach@678
|
7418 |
0, 0, 0, 0, false, false, false,
|
jtulach@678
|
7419 |
false, null, null);
|
jtulach@678
|
7420 |
element.dispatchEvent(event);
|
jtulach@678
|
7421 |
};
|
jtulach@678
|
7422 |
var __mousemove__ = function(element){
|
jtulach@678
|
7423 |
var event = new Event('MouseEvents');
|
jtulach@678
|
7424 |
event.initEvent("mousemove", true, true, null, 0,
|
jtulach@678
|
7425 |
0, 0, 0, 0, false, false, false,
|
jtulach@678
|
7426 |
false, null, null);
|
jtulach@678
|
7427 |
element.dispatchEvent(event);
|
jtulach@678
|
7428 |
};
|
jtulach@678
|
7429 |
var __mouseout__ = function(element){
|
jtulach@678
|
7430 |
var event = new Event('MouseEvents');
|
jtulach@678
|
7431 |
event.initEvent("mouseout", true, true, null, 0,
|
jtulach@678
|
7432 |
0, 0, 0, 0, false, false, false,
|
jtulach@678
|
7433 |
false, null, null);
|
jtulach@678
|
7434 |
element.dispatchEvent(event);
|
jtulach@678
|
7435 |
};
|
jtulach@678
|
7436 |
|
jtulach@678
|
7437 |
/**
|
jtulach@678
|
7438 |
* HTMLElement - DOM Level 2
|
jtulach@678
|
7439 |
*/
|
jtulach@678
|
7440 |
|
jtulach@678
|
7441 |
|
jtulach@678
|
7442 |
/* Hack for http://www.prototypejs.org/
|
jtulach@678
|
7443 |
*
|
jtulach@678
|
7444 |
* Prototype 1.6 (the library) creates a new global Element, which causes
|
jtulach@678
|
7445 |
* envjs to use the wrong Element.
|
jtulach@678
|
7446 |
*
|
jtulach@678
|
7447 |
* http://envjs.lighthouseapp.com/projects/21590/tickets/108-prototypejs-wont-load-due-it-clobbering-element
|
jtulach@678
|
7448 |
*
|
jtulach@678
|
7449 |
* Options:
|
jtulach@678
|
7450 |
* (1) Rename the dom/element to something else
|
jtulach@678
|
7451 |
* rejected: been done before. people want Element.
|
jtulach@678
|
7452 |
* (2) merge dom+html and not export Element to global namespace
|
jtulach@678
|
7453 |
* (meaning we would use a local var Element in a closure, so prototype
|
jtulach@678
|
7454 |
* can do what ever it wants)
|
jtulach@678
|
7455 |
* rejected: want dom and html separate
|
jtulach@678
|
7456 |
* (3) use global namespace (put everything under Envjs = {})
|
jtulach@678
|
7457 |
* rejected: massive change
|
jtulach@678
|
7458 |
* (4) use commonjs modules (similar to (3) in spirit)
|
jtulach@678
|
7459 |
* rejected: massive change
|
jtulach@678
|
7460 |
*
|
jtulach@678
|
7461 |
* or
|
jtulach@678
|
7462 |
*
|
jtulach@678
|
7463 |
* (5) take a reference to Element during initial loading ("compile
|
jtulach@678
|
7464 |
* time"), and use the reference instead of "Element". That's
|
jtulach@678
|
7465 |
* what the next line does. We use __DOMElement__ if we need to
|
jtulach@678
|
7466 |
* reference the parent class. Only this file explcity uses
|
jtulach@678
|
7467 |
* Element so this should work, and is the most minimal change I
|
jtulach@678
|
7468 |
* could think of with no external API changes.
|
jtulach@678
|
7469 |
*
|
jtulach@678
|
7470 |
*/
|
jtulach@678
|
7471 |
var __DOMElement__ = Element;
|
jtulach@678
|
7472 |
|
jtulach@678
|
7473 |
HTMLElement = function(ownerDocument) {
|
jtulach@678
|
7474 |
__DOMElement__.apply(this, arguments);
|
jtulach@678
|
7475 |
};
|
jtulach@678
|
7476 |
|
jtulach@678
|
7477 |
HTMLElement.prototype = new Element();
|
jtulach@678
|
7478 |
__extend__(HTMLElement.prototype, HTMLEvents.prototype);
|
jtulach@678
|
7479 |
__extend__(HTMLElement.prototype, {
|
jtulach@678
|
7480 |
get className() {
|
jtulach@678
|
7481 |
return this.getAttribute("class")||'';
|
jtulach@678
|
7482 |
},
|
jtulach@678
|
7483 |
set className(value) {
|
jtulach@678
|
7484 |
return this.setAttribute("class",__trim__(value));
|
jtulach@678
|
7485 |
},
|
jtulach@678
|
7486 |
get dir() {
|
jtulach@678
|
7487 |
return this.getAttribute("dir")||"ltr";
|
jtulach@678
|
7488 |
},
|
jtulach@678
|
7489 |
set dir(val) {
|
jtulach@678
|
7490 |
return this.setAttribute("dir",val);
|
jtulach@678
|
7491 |
},
|
jtulach@678
|
7492 |
get id(){
|
jtulach@678
|
7493 |
return this.getAttribute('id');
|
jtulach@678
|
7494 |
},
|
jtulach@678
|
7495 |
set id(id){
|
jtulach@678
|
7496 |
this.setAttribute('id', id);
|
jtulach@678
|
7497 |
},
|
jtulach@678
|
7498 |
get innerHTML(){
|
jtulach@678
|
7499 |
var ret = "",
|
jtulach@678
|
7500 |
i;
|
jtulach@678
|
7501 |
|
jtulach@678
|
7502 |
// create string containing the concatenation of the string
|
jtulach@678
|
7503 |
// values of each child
|
jtulach@678
|
7504 |
for (i=0; i < this.childNodes.length; i++) {
|
jtulach@678
|
7505 |
if(this.childNodes[i]){
|
jtulach@678
|
7506 |
if(this.childNodes[i].nodeType === Node.ELEMENT_NODE){
|
jtulach@678
|
7507 |
ret += this.childNodes[i].xhtml;
|
jtulach@678
|
7508 |
} else if (this.childNodes[i].nodeType === Node.TEXT_NODE && i>0 &&
|
jtulach@678
|
7509 |
this.childNodes[i-1].nodeType === Node.TEXT_NODE){
|
jtulach@678
|
7510 |
//add a single space between adjacent text nodes
|
jtulach@678
|
7511 |
ret += " "+this.childNodes[i].xml;
|
jtulach@678
|
7512 |
}else{
|
jtulach@678
|
7513 |
ret += this.childNodes[i].xml;
|
jtulach@678
|
7514 |
}
|
jtulach@678
|
7515 |
}
|
jtulach@678
|
7516 |
}
|
jtulach@678
|
7517 |
return ret;
|
jtulach@678
|
7518 |
},
|
jtulach@678
|
7519 |
get lang() {
|
jtulach@678
|
7520 |
return this.getAttribute("lang");
|
jtulach@678
|
7521 |
},
|
jtulach@678
|
7522 |
set lang(val) {
|
jtulach@678
|
7523 |
return this.setAttribute("lang",val);
|
jtulach@678
|
7524 |
},
|
jtulach@678
|
7525 |
get offsetHeight(){
|
jtulach@678
|
7526 |
return Number((this.style.height || '').replace("px",""));
|
jtulach@678
|
7527 |
},
|
jtulach@678
|
7528 |
get offsetWidth(){
|
jtulach@678
|
7529 |
return Number((this.style.width || '').replace("px",""));
|
jtulach@678
|
7530 |
},
|
jtulach@678
|
7531 |
offsetLeft: 0,
|
jtulach@678
|
7532 |
offsetRight: 0,
|
jtulach@678
|
7533 |
get offsetParent(){
|
jtulach@678
|
7534 |
/* TODO */
|
jtulach@678
|
7535 |
return;
|
jtulach@678
|
7536 |
},
|
jtulach@678
|
7537 |
set offsetParent(element){
|
jtulach@678
|
7538 |
/* TODO */
|
jtulach@678
|
7539 |
return;
|
jtulach@678
|
7540 |
},
|
jtulach@678
|
7541 |
scrollHeight: 0,
|
jtulach@678
|
7542 |
scrollWidth: 0,
|
jtulach@678
|
7543 |
scrollLeft: 0,
|
jtulach@678
|
7544 |
scrollRight: 0,
|
jtulach@678
|
7545 |
get style(){
|
jtulach@678
|
7546 |
return this.getAttribute('style')||'';
|
jtulach@678
|
7547 |
},
|
jtulach@678
|
7548 |
get title() {
|
jtulach@678
|
7549 |
return this.getAttribute("title");
|
jtulach@678
|
7550 |
},
|
jtulach@678
|
7551 |
set title(value) {
|
jtulach@678
|
7552 |
return this.setAttribute("title", value);
|
jtulach@678
|
7553 |
},
|
jtulach@678
|
7554 |
get tabIndex(){
|
jtulach@678
|
7555 |
var tabindex = this.getAttribute('tabindex');
|
jtulach@678
|
7556 |
if(tabindex!==null){
|
jtulach@678
|
7557 |
return Number(tabindex);
|
jtulach@678
|
7558 |
} else {
|
jtulach@678
|
7559 |
return 0;
|
jtulach@678
|
7560 |
}
|
jtulach@678
|
7561 |
},
|
jtulach@678
|
7562 |
set tabIndex(value){
|
jtulach@678
|
7563 |
if (value === undefined || value === null) {
|
jtulach@678
|
7564 |
value = 0;
|
jtulach@678
|
7565 |
}
|
jtulach@678
|
7566 |
this.setAttribute('tabindex',Number(value));
|
jtulach@678
|
7567 |
},
|
jtulach@678
|
7568 |
get outerHTML(){
|
jtulach@678
|
7569 |
//Not in the specs but I'll leave it here for now.
|
jtulach@678
|
7570 |
return this.xhtml;
|
jtulach@678
|
7571 |
},
|
jtulach@678
|
7572 |
scrollIntoView: function(){
|
jtulach@678
|
7573 |
/*TODO*/
|
jtulach@678
|
7574 |
return;
|
jtulach@678
|
7575 |
},
|
jtulach@678
|
7576 |
toString: function(){
|
jtulach@678
|
7577 |
return '[object HTMLElement]';
|
jtulach@678
|
7578 |
},
|
jtulach@678
|
7579 |
get xhtml() {
|
jtulach@678
|
7580 |
// HTMLDocument.xhtml is non-standard
|
jtulach@678
|
7581 |
// This is exactly like Document.xml except the tagName has to be
|
jtulach@678
|
7582 |
// lower cased. I dont like to duplicate this but its really not
|
jtulach@678
|
7583 |
// a simple work around between xml and html serialization via
|
jtulach@678
|
7584 |
// XMLSerializer (which uppercases html tags) and innerHTML (which
|
jtulach@678
|
7585 |
// lowercases tags)
|
jtulach@678
|
7586 |
|
jtulach@678
|
7587 |
var ret = "",
|
jtulach@678
|
7588 |
ns = "",
|
jtulach@678
|
7589 |
name = (this.tagName+"").toLowerCase(),
|
jtulach@678
|
7590 |
attrs,
|
jtulach@678
|
7591 |
attrstring = "",
|
jtulach@678
|
7592 |
i;
|
jtulach@678
|
7593 |
|
jtulach@678
|
7594 |
// serialize namespace declarations
|
jtulach@678
|
7595 |
if (this.namespaceURI){
|
jtulach@678
|
7596 |
if((this === this.ownerDocument.documentElement) ||
|
jtulach@678
|
7597 |
(!this.parentNode) ||
|
jtulach@678
|
7598 |
(this.parentNode &&
|
jtulach@678
|
7599 |
(this.parentNode.namespaceURI !== this.namespaceURI))) {
|
jtulach@678
|
7600 |
ns = ' xmlns' + (this.prefix ? (':' + this.prefix) : '') +
|
jtulach@678
|
7601 |
'="' + this.namespaceURI + '"';
|
jtulach@678
|
7602 |
}
|
jtulach@678
|
7603 |
}
|
jtulach@678
|
7604 |
|
jtulach@678
|
7605 |
// serialize Attribute declarations
|
jtulach@678
|
7606 |
attrs = this.attributes;
|
jtulach@678
|
7607 |
for(i=0;i< attrs.length;i++){
|
jtulach@678
|
7608 |
attrstring += " "+attrs[i].name+'="'+attrs[i].xml+'"';
|
jtulach@678
|
7609 |
}
|
jtulach@678
|
7610 |
|
jtulach@678
|
7611 |
if(this.hasChildNodes()){
|
jtulach@678
|
7612 |
// serialize this Element
|
jtulach@678
|
7613 |
ret += "<" + name + ns + attrstring +">";
|
jtulach@678
|
7614 |
for(i=0;i< this.childNodes.length;i++){
|
jtulach@678
|
7615 |
ret += this.childNodes[i].xhtml ?
|
jtulach@678
|
7616 |
this.childNodes[i].xhtml :
|
jtulach@678
|
7617 |
this.childNodes[i].xml;
|
jtulach@678
|
7618 |
}
|
jtulach@678
|
7619 |
ret += "</" + name + ">";
|
jtulach@678
|
7620 |
}else{
|
jtulach@678
|
7621 |
switch(name){
|
jtulach@678
|
7622 |
case 'script':
|
jtulach@678
|
7623 |
ret += "<" + name + ns + attrstring +"></"+name+">";
|
jtulach@678
|
7624 |
break;
|
jtulach@678
|
7625 |
default:
|
jtulach@678
|
7626 |
ret += "<" + name + ns + attrstring +"/>";
|
jtulach@678
|
7627 |
}
|
jtulach@678
|
7628 |
}
|
jtulach@678
|
7629 |
|
jtulach@678
|
7630 |
return ret;
|
jtulach@678
|
7631 |
},
|
jtulach@678
|
7632 |
|
jtulach@678
|
7633 |
/**
|
jtulach@678
|
7634 |
* setAttribute use a dispatch table that other tags can set to
|
jtulach@678
|
7635 |
* "listen" to various values being set. The dispatch table
|
jtulach@678
|
7636 |
* and registration functions are at the end of the file.
|
jtulach@678
|
7637 |
*
|
jtulach@678
|
7638 |
*/
|
jtulach@678
|
7639 |
|
jtulach@678
|
7640 |
setAttribute: function(name, value) {
|
jtulach@678
|
7641 |
var result = __DOMElement__.prototype.setAttribute.apply(this, arguments);
|
jtulach@678
|
7642 |
__addNamedMap__(this.ownerDocument, this);
|
jtulach@678
|
7643 |
var tagname = this.tagName;
|
jtulach@678
|
7644 |
var callback = HTMLElement.getAttributeCallback('set', tagname, name);
|
jtulach@678
|
7645 |
if (callback) {
|
jtulach@678
|
7646 |
callback(this, value);
|
jtulach@678
|
7647 |
}
|
jtulach@678
|
7648 |
},
|
jtulach@678
|
7649 |
setAttributeNS: function(namespaceURI, name, value) {
|
jtulach@678
|
7650 |
var result = __DOMElement__.prototype.setAttributeNS.apply(this, arguments);
|
jtulach@678
|
7651 |
__addNamedMap__(this.ownerDocument, this);
|
jtulach@678
|
7652 |
var tagname = this.tagName;
|
jtulach@678
|
7653 |
var callback = HTMLElement.getAttributeCallback('set', tagname, name);
|
jtulach@678
|
7654 |
if (callback) {
|
jtulach@678
|
7655 |
callback(this, value);
|
jtulach@678
|
7656 |
}
|
jtulach@678
|
7657 |
|
jtulach@678
|
7658 |
return result;
|
jtulach@678
|
7659 |
},
|
jtulach@678
|
7660 |
setAttributeNode: function(newnode) {
|
jtulach@678
|
7661 |
var result = __DOMElement__.prototype.setAttributeNode.apply(this, arguments);
|
jtulach@678
|
7662 |
__addNamedMap__(this.ownerDocument, this);
|
jtulach@678
|
7663 |
var tagname = this.tagName;
|
jtulach@678
|
7664 |
var callback = HTMLElement.getAttributeCallback('set', tagname, newnode.name);
|
jtulach@678
|
7665 |
if (callback) {
|
jtulach@678
|
7666 |
callback(this, node.value);
|
jtulach@678
|
7667 |
}
|
jtulach@678
|
7668 |
return result;
|
jtulach@678
|
7669 |
},
|
jtulach@678
|
7670 |
setAttributeNodeNS: function(newnode) {
|
jtulach@678
|
7671 |
var result = __DOMElement__.prototype.setAttributeNodeNS.apply(this, arguments);
|
jtulach@678
|
7672 |
__addNamedMap__(this.ownerDocument, this);
|
jtulach@678
|
7673 |
var tagname = this.tagName;
|
jtulach@678
|
7674 |
var callback = HTMLElement.getAttributeCallback('set', tagname, newnode.name);
|
jtulach@678
|
7675 |
if (callback) {
|
jtulach@678
|
7676 |
callback(this, node.value);
|
jtulach@678
|
7677 |
}
|
jtulach@678
|
7678 |
return result;
|
jtulach@678
|
7679 |
},
|
jtulach@678
|
7680 |
removeAttribute: function(name) {
|
jtulach@678
|
7681 |
__removeNamedMap__(this.ownerDocument, this);
|
jtulach@678
|
7682 |
return __DOMElement__.prototype.removeAttribute.apply(this, arguments);
|
jtulach@678
|
7683 |
},
|
jtulach@678
|
7684 |
removeAttributeNS: function(namespace, localname) {
|
jtulach@678
|
7685 |
__removeNamedMap__(this.ownerDocument, this);
|
jtulach@678
|
7686 |
return __DOMElement__.prototype.removeAttributeNS.apply(this, arguments);
|
jtulach@678
|
7687 |
},
|
jtulach@678
|
7688 |
removeAttributeNode: function(name) {
|
jtulach@678
|
7689 |
__removeNamedMap__(this.ownerDocument, this);
|
jtulach@678
|
7690 |
return __DOMElement__.prototype.removeAttribute.apply(this, arguments);
|
jtulach@678
|
7691 |
},
|
jtulach@678
|
7692 |
removeChild: function(oldChild) {
|
jtulach@678
|
7693 |
__removeNamedMap__(this.ownerDocument, oldChild);
|
jtulach@678
|
7694 |
return __DOMElement__.prototype.removeChild.apply(this, arguments);
|
jtulach@678
|
7695 |
},
|
jtulach@678
|
7696 |
importNode: function(othernode, deep) {
|
jtulach@678
|
7697 |
var newnode = __DOMElement__.prototype.importNode.apply(this, arguments);
|
jtulach@678
|
7698 |
__addNamedMap__(this.ownerDocument, newnode);
|
jtulach@678
|
7699 |
return newnode;
|
jtulach@678
|
7700 |
},
|
jtulach@678
|
7701 |
|
jtulach@678
|
7702 |
// not actually sure if this is needed or not
|
jtulach@678
|
7703 |
replaceNode: function(newchild, oldchild) {
|
jtulach@678
|
7704 |
var newnode = __DOMElement__.prototype.replaceNode.apply(this, arguments);
|
jtulach@678
|
7705 |
__removeNamedMap__(this.ownerDocument, oldchild);
|
jtulach@678
|
7706 |
__addNamedMap__(this.ownerDocument, newnode);
|
jtulach@678
|
7707 |
return newnode;
|
jtulach@678
|
7708 |
}
|
jtulach@678
|
7709 |
});
|
jtulach@678
|
7710 |
|
jtulach@678
|
7711 |
|
jtulach@678
|
7712 |
HTMLElement.attributeCallbacks = {};
|
jtulach@678
|
7713 |
HTMLElement.registerSetAttribute = function(tag, attrib, callbackfn) {
|
jtulach@678
|
7714 |
HTMLElement.attributeCallbacks[tag + ':set:' + attrib] = callbackfn;
|
jtulach@678
|
7715 |
};
|
jtulach@678
|
7716 |
HTMLElement.registerRemoveAttribute = function(tag, attrib, callbackfn) {
|
jtulach@678
|
7717 |
HTMLElement.attributeCallbacks[tag + ':remove:' + attrib] = callbackfn;
|
jtulach@678
|
7718 |
};
|
jtulach@678
|
7719 |
|
jtulach@678
|
7720 |
/**
|
jtulach@678
|
7721 |
* This is really only useful internally
|
jtulach@678
|
7722 |
*
|
jtulach@678
|
7723 |
*/
|
jtulach@678
|
7724 |
HTMLElement.getAttributeCallback = function(type, tag, attrib) {
|
jtulach@678
|
7725 |
return HTMLElement.attributeCallbacks[tag + ':' + type + ':' + attrib] || null;
|
jtulach@678
|
7726 |
};
|
jtulach@678
|
7727 |
/*
|
jtulach@678
|
7728 |
* HTMLCollection
|
jtulach@678
|
7729 |
*
|
jtulach@678
|
7730 |
* HTML5 -- 2.7.2.1 HTMLCollection
|
jtulach@678
|
7731 |
* http://dev.w3.org/html5/spec/Overview.html#htmlcollection
|
jtulach@678
|
7732 |
* http://dev.w3.org/html5/spec/Overview.html#collections
|
jtulach@678
|
7733 |
*/
|
jtulach@678
|
7734 |
HTMLCollection = function(nodelist, type) {
|
jtulach@678
|
7735 |
|
jtulach@678
|
7736 |
__setArray__(this, []);
|
jtulach@678
|
7737 |
var n;
|
jtulach@678
|
7738 |
for (var i=0; i<nodelist.length; i++) {
|
jtulach@678
|
7739 |
this[i] = nodelist[i];
|
jtulach@678
|
7740 |
n = nodelist[i].name;
|
jtulach@678
|
7741 |
if (n) {
|
jtulach@678
|
7742 |
this[n] = nodelist[i];
|
jtulach@678
|
7743 |
}
|
jtulach@678
|
7744 |
n = nodelist[i].id;
|
jtulach@678
|
7745 |
if (n) {
|
jtulach@678
|
7746 |
this[n] = nodelist[i];
|
jtulach@678
|
7747 |
}
|
jtulach@678
|
7748 |
}
|
jtulach@678
|
7749 |
|
jtulach@678
|
7750 |
this.length = nodelist.length;
|
jtulach@678
|
7751 |
};
|
jtulach@678
|
7752 |
|
jtulach@678
|
7753 |
HTMLCollection.prototype = {
|
jtulach@678
|
7754 |
|
jtulach@678
|
7755 |
item: function (idx) {
|
jtulach@678
|
7756 |
return ((idx >= 0) && (idx < this.length)) ? this[idx] : null;
|
jtulach@678
|
7757 |
},
|
jtulach@678
|
7758 |
|
jtulach@678
|
7759 |
namedItem: function (name) {
|
jtulach@678
|
7760 |
return this[name] || null;
|
jtulach@678
|
7761 |
},
|
jtulach@678
|
7762 |
|
jtulach@678
|
7763 |
toString: function() {
|
jtulach@678
|
7764 |
return '[object HTMLCollection]';
|
jtulach@678
|
7765 |
}
|
jtulach@678
|
7766 |
};
|
jtulach@678
|
7767 |
/*
|
jtulach@678
|
7768 |
* a set of convenience classes to centralize implementation of
|
jtulach@678
|
7769 |
* properties and methods across multiple in-form elements
|
jtulach@678
|
7770 |
*
|
jtulach@678
|
7771 |
* the hierarchy of related HTML elements and their members is as follows:
|
jtulach@678
|
7772 |
*
|
jtulach@678
|
7773 |
* Condensed Version
|
jtulach@678
|
7774 |
*
|
jtulach@678
|
7775 |
* HTMLInputCommon
|
jtulach@678
|
7776 |
* * legent (no value attr)
|
jtulach@678
|
7777 |
* * fieldset (no value attr)
|
jtulach@678
|
7778 |
* * label (no value attr)
|
jtulach@678
|
7779 |
* * option (custom value)
|
jtulach@678
|
7780 |
* HTMLTypeValueInputs (extends InputCommon)
|
jtulach@678
|
7781 |
* * select (custom value)
|
jtulach@678
|
7782 |
* * button (just sets value)
|
jtulach@678
|
7783 |
* HTMLInputAreaCommon (extends TypeValueIput)
|
jtulach@678
|
7784 |
* * input (custom)
|
jtulach@678
|
7785 |
* * textarea (just sets value)
|
jtulach@678
|
7786 |
*
|
jtulach@678
|
7787 |
* -----------------------
|
jtulach@678
|
7788 |
* HTMLInputCommon: common to all elements
|
jtulach@678
|
7789 |
* .form
|
jtulach@678
|
7790 |
*
|
jtulach@678
|
7791 |
* <legend>
|
jtulach@678
|
7792 |
* [common plus:]
|
jtulach@678
|
7793 |
* .align
|
jtulach@678
|
7794 |
*
|
jtulach@678
|
7795 |
* <fieldset>
|
jtulach@678
|
7796 |
* [identical to "legend" plus:]
|
jtulach@678
|
7797 |
* .margin
|
jtulach@678
|
7798 |
*
|
jtulach@678
|
7799 |
*
|
jtulach@678
|
7800 |
* ****
|
jtulach@678
|
7801 |
*
|
jtulach@678
|
7802 |
* <label>
|
jtulach@678
|
7803 |
* [common plus:]
|
jtulach@678
|
7804 |
* .dataFormatAs
|
jtulach@678
|
7805 |
* .htmlFor
|
jtulach@678
|
7806 |
* [plus data properties]
|
jtulach@678
|
7807 |
*
|
jtulach@678
|
7808 |
* <option>
|
jtulach@678
|
7809 |
* [common plus:]
|
jtulach@678
|
7810 |
* .defaultSelected
|
jtulach@678
|
7811 |
* .index
|
jtulach@678
|
7812 |
* .label
|
jtulach@678
|
7813 |
* .selected
|
jtulach@678
|
7814 |
* .text
|
jtulach@678
|
7815 |
* .value // unique implementation, not duplicated
|
jtulach@678
|
7816 |
* .form // unique implementation, not duplicated
|
jtulach@678
|
7817 |
* ****
|
jtulach@678
|
7818 |
*
|
jtulach@678
|
7819 |
* HTMLTypeValueInputs: common to remaining elements
|
jtulach@678
|
7820 |
* [common plus:]
|
jtulach@678
|
7821 |
* .name
|
jtulach@678
|
7822 |
* .type
|
jtulach@678
|
7823 |
* .value
|
jtulach@678
|
7824 |
* [plus data properties]
|
jtulach@678
|
7825 |
*
|
jtulach@678
|
7826 |
*
|
jtulach@678
|
7827 |
* <select>
|
jtulach@678
|
7828 |
* .length
|
jtulach@678
|
7829 |
* .multiple
|
jtulach@678
|
7830 |
* .options[]
|
jtulach@678
|
7831 |
* .selectedIndex
|
jtulach@678
|
7832 |
* .add()
|
jtulach@678
|
7833 |
* .remove()
|
jtulach@678
|
7834 |
* .item() // unimplemented
|
jtulach@678
|
7835 |
* .namedItem() // unimplemented
|
jtulach@678
|
7836 |
* [plus ".onchange"]
|
jtulach@678
|
7837 |
* [plus focus events]
|
jtulach@678
|
7838 |
* [plus data properties]
|
jtulach@678
|
7839 |
* [plus ".size"]
|
jtulach@678
|
7840 |
*
|
jtulach@678
|
7841 |
* <button>
|
jtulach@678
|
7842 |
* .dataFormatAs // duplicated from above, oh well....
|
jtulach@678
|
7843 |
* [plus ".status", ".createTextRange()"]
|
jtulach@678
|
7844 |
*
|
jtulach@678
|
7845 |
* ****
|
jtulach@678
|
7846 |
*
|
jtulach@678
|
7847 |
* HTMLInputAreaCommon: common to remaining elements
|
jtulach@678
|
7848 |
* .defaultValue
|
jtulach@678
|
7849 |
* .readOnly
|
jtulach@678
|
7850 |
* .handleEvent() // unimplemented
|
jtulach@678
|
7851 |
* .select()
|
jtulach@678
|
7852 |
* .onselect
|
jtulach@678
|
7853 |
* [plus ".size"]
|
jtulach@678
|
7854 |
* [plus ".status", ".createTextRange()"]
|
jtulach@678
|
7855 |
* [plus focus events]
|
jtulach@678
|
7856 |
* [plus ".onchange"]
|
jtulach@678
|
7857 |
*
|
jtulach@678
|
7858 |
* <textarea>
|
jtulach@678
|
7859 |
* .cols
|
jtulach@678
|
7860 |
* .rows
|
jtulach@678
|
7861 |
* .wrap // unimplemented
|
jtulach@678
|
7862 |
* .onscroll // unimplemented
|
jtulach@678
|
7863 |
*
|
jtulach@678
|
7864 |
* <input>
|
jtulach@678
|
7865 |
* .alt
|
jtulach@678
|
7866 |
* .accept // unimplemented
|
jtulach@678
|
7867 |
* .checked
|
jtulach@678
|
7868 |
* .complete // unimplemented
|
jtulach@678
|
7869 |
* .defaultChecked
|
jtulach@678
|
7870 |
* .dynsrc // unimplemented
|
jtulach@678
|
7871 |
* .height
|
jtulach@678
|
7872 |
* .hspace // unimplemented
|
jtulach@678
|
7873 |
* .indeterminate // unimplemented
|
jtulach@678
|
7874 |
* .loop // unimplemented
|
jtulach@678
|
7875 |
* .lowsrc // unimplemented
|
jtulach@678
|
7876 |
* .maxLength
|
jtulach@678
|
7877 |
* .src
|
jtulach@678
|
7878 |
* .start // unimplemented
|
jtulach@678
|
7879 |
* .useMap
|
jtulach@678
|
7880 |
* .vspace // unimplemented
|
jtulach@678
|
7881 |
* .width
|
jtulach@678
|
7882 |
* .onclick
|
jtulach@678
|
7883 |
* [plus ".size"]
|
jtulach@678
|
7884 |
* [plus ".status", ".createTextRange()"]
|
jtulach@678
|
7885 |
|
jtulach@678
|
7886 |
* [data properties] // unimplemented
|
jtulach@678
|
7887 |
* .dataFld
|
jtulach@678
|
7888 |
* .dataSrc
|
jtulach@678
|
7889 |
|
jtulach@678
|
7890 |
* [status stuff] // unimplemented
|
jtulach@678
|
7891 |
* .status
|
jtulach@678
|
7892 |
* .createTextRange()
|
jtulach@678
|
7893 |
|
jtulach@678
|
7894 |
* [focus events]
|
jtulach@678
|
7895 |
* .onblur
|
jtulach@678
|
7896 |
* .onfocus
|
jtulach@678
|
7897 |
|
jtulach@678
|
7898 |
*/
|
jtulach@678
|
7899 |
|
jtulach@678
|
7900 |
|
jtulach@678
|
7901 |
|
jtulach@678
|
7902 |
var inputElements_dataProperties = {};
|
jtulach@678
|
7903 |
var inputElements_status = {};
|
jtulach@678
|
7904 |
|
jtulach@678
|
7905 |
var inputElements_onchange = {
|
jtulach@678
|
7906 |
onchange: function(event){
|
jtulach@678
|
7907 |
__eval__(this.getAttribute('onchange')||'', this);
|
jtulach@678
|
7908 |
}
|
jtulach@678
|
7909 |
};
|
jtulach@678
|
7910 |
|
jtulach@678
|
7911 |
var inputElements_size = {
|
jtulach@678
|
7912 |
get size(){
|
jtulach@678
|
7913 |
return Number(this.getAttribute('size'));
|
jtulach@678
|
7914 |
},
|
jtulach@678
|
7915 |
set size(value){
|
jtulach@678
|
7916 |
this.setAttribute('size',value);
|
jtulach@678
|
7917 |
}
|
jtulach@678
|
7918 |
};
|
jtulach@678
|
7919 |
|
jtulach@678
|
7920 |
var inputElements_focusEvents = {
|
jtulach@678
|
7921 |
blur: function(){
|
jtulach@678
|
7922 |
__blur__(this);
|
jtulach@678
|
7923 |
|
jtulach@678
|
7924 |
if (this._oldValue != this.value){
|
jtulach@678
|
7925 |
var event = document.createEvent("HTMLEvents");
|
jtulach@678
|
7926 |
event.initEvent("change", true, true);
|
jtulach@678
|
7927 |
this.dispatchEvent( event );
|
jtulach@678
|
7928 |
}
|
jtulach@678
|
7929 |
},
|
jtulach@678
|
7930 |
focus: function(){
|
jtulach@678
|
7931 |
__focus__(this);
|
jtulach@678
|
7932 |
this._oldValue = this.value;
|
jtulach@678
|
7933 |
}
|
jtulach@678
|
7934 |
};
|
jtulach@678
|
7935 |
|
jtulach@678
|
7936 |
|
jtulach@678
|
7937 |
/*
|
jtulach@678
|
7938 |
* HTMLInputCommon - convenience class, not DOM
|
jtulach@678
|
7939 |
*/
|
jtulach@678
|
7940 |
var HTMLInputCommon = function(ownerDocument) {
|
jtulach@678
|
7941 |
HTMLElement.apply(this, arguments);
|
jtulach@678
|
7942 |
};
|
jtulach@678
|
7943 |
HTMLInputCommon.prototype = new HTMLElement();
|
jtulach@678
|
7944 |
__extend__(HTMLInputCommon.prototype, {
|
jtulach@678
|
7945 |
get form() {
|
jtulach@678
|
7946 |
// parent can be null if element is outside of a form
|
jtulach@678
|
7947 |
// or not yet added to the document
|
jtulach@678
|
7948 |
var parent = this.parentNode;
|
jtulach@678
|
7949 |
while (parent && parent.nodeName.toLowerCase() !== 'form') {
|
jtulach@678
|
7950 |
parent = parent.parentNode;
|
jtulach@678
|
7951 |
}
|
jtulach@678
|
7952 |
return parent;
|
jtulach@678
|
7953 |
},
|
jtulach@678
|
7954 |
get accessKey(){
|
jtulach@678
|
7955 |
return this.getAttribute('accesskey');
|
jtulach@678
|
7956 |
},
|
jtulach@678
|
7957 |
set accessKey(value){
|
jtulach@678
|
7958 |
this.setAttribute('accesskey',value);
|
jtulach@678
|
7959 |
},
|
jtulach@678
|
7960 |
get access(){
|
jtulach@678
|
7961 |
return this.getAttribute('access');
|
jtulach@678
|
7962 |
},
|
jtulach@678
|
7963 |
set access(value){
|
jtulach@678
|
7964 |
this.setAttribute('access', value);
|
jtulach@678
|
7965 |
},
|
jtulach@678
|
7966 |
get disabled(){
|
jtulach@678
|
7967 |
return (this.getAttribute('disabled') === 'disabled');
|
jtulach@678
|
7968 |
},
|
jtulach@678
|
7969 |
set disabled(value){
|
jtulach@678
|
7970 |
this.setAttribute('disabled', (value ? 'disabled' :''));
|
jtulach@678
|
7971 |
}
|
jtulach@678
|
7972 |
});
|
jtulach@678
|
7973 |
|
jtulach@678
|
7974 |
|
jtulach@678
|
7975 |
|
jtulach@678
|
7976 |
|
jtulach@678
|
7977 |
/*
|
jtulach@678
|
7978 |
* HTMLTypeValueInputs - convenience class, not DOM
|
jtulach@678
|
7979 |
*/
|
jtulach@678
|
7980 |
var HTMLTypeValueInputs = function(ownerDocument) {
|
jtulach@678
|
7981 |
|
jtulach@678
|
7982 |
HTMLInputCommon.apply(this, arguments);
|
jtulach@678
|
7983 |
|
jtulach@678
|
7984 |
this._oldValue = "";
|
jtulach@678
|
7985 |
};
|
jtulach@678
|
7986 |
HTMLTypeValueInputs.prototype = new HTMLInputCommon();
|
jtulach@678
|
7987 |
__extend__(HTMLTypeValueInputs.prototype, inputElements_size);
|
jtulach@678
|
7988 |
__extend__(HTMLTypeValueInputs.prototype, inputElements_status);
|
jtulach@678
|
7989 |
__extend__(HTMLTypeValueInputs.prototype, inputElements_dataProperties);
|
jtulach@678
|
7990 |
__extend__(HTMLTypeValueInputs.prototype, {
|
jtulach@678
|
7991 |
get name(){
|
jtulach@678
|
7992 |
return this.getAttribute('name')||'';
|
jtulach@678
|
7993 |
},
|
jtulach@678
|
7994 |
set name(value){
|
jtulach@678
|
7995 |
this.setAttribute('name',value);
|
jtulach@678
|
7996 |
},
|
jtulach@678
|
7997 |
});
|
jtulach@678
|
7998 |
|
jtulach@678
|
7999 |
|
jtulach@678
|
8000 |
/*
|
jtulach@678
|
8001 |
* HTMLInputAreaCommon - convenience class, not DOM
|
jtulach@678
|
8002 |
*/
|
jtulach@678
|
8003 |
var HTMLInputAreaCommon = function(ownerDocument) {
|
jtulach@678
|
8004 |
HTMLTypeValueInputs.apply(this, arguments);
|
jtulach@678
|
8005 |
};
|
jtulach@678
|
8006 |
HTMLInputAreaCommon.prototype = new HTMLTypeValueInputs();
|
jtulach@678
|
8007 |
__extend__(HTMLInputAreaCommon.prototype, inputElements_focusEvents);
|
jtulach@678
|
8008 |
__extend__(HTMLInputAreaCommon.prototype, inputElements_onchange);
|
jtulach@678
|
8009 |
__extend__(HTMLInputAreaCommon.prototype, {
|
jtulach@678
|
8010 |
get readOnly(){
|
jtulach@678
|
8011 |
return (this.getAttribute('readonly')=='readonly');
|
jtulach@678
|
8012 |
},
|
jtulach@678
|
8013 |
set readOnly(value){
|
jtulach@678
|
8014 |
this.setAttribute('readonly', (value ? 'readonly' :''));
|
jtulach@678
|
8015 |
},
|
jtulach@678
|
8016 |
select:function(){
|
jtulach@678
|
8017 |
__select__(this);
|
jtulach@678
|
8018 |
|
jtulach@678
|
8019 |
}
|
jtulach@678
|
8020 |
});
|
jtulach@678
|
8021 |
|
jtulach@678
|
8022 |
|
jtulach@678
|
8023 |
var __updateFormForNamedElement__ = function(node, value) {
|
jtulach@678
|
8024 |
if (node.form) {
|
jtulach@678
|
8025 |
// to check for ID or NAME attribute too
|
jtulach@678
|
8026 |
// not, then nothing to do
|
jtulach@678
|
8027 |
node.form._updateElements();
|
jtulach@678
|
8028 |
}
|
jtulach@678
|
8029 |
};
|
jtulach@678
|
8030 |
|
jtulach@678
|
8031 |
/**
|
jtulach@678
|
8032 |
* HTMLAnchorElement - DOM Level 2
|
jtulach@678
|
8033 |
*
|
jtulach@678
|
8034 |
* HTML5: 4.6.1 The a element
|
jtulach@678
|
8035 |
* http://dev.w3.org/html5/spec/Overview.html#the-a-element
|
jtulach@678
|
8036 |
*/
|
jtulach@678
|
8037 |
HTMLAnchorElement = function(ownerDocument) {
|
jtulach@678
|
8038 |
HTMLElement.apply(this, arguments);
|
jtulach@678
|
8039 |
};
|
jtulach@678
|
8040 |
HTMLAnchorElement.prototype = new HTMLElement();
|
jtulach@678
|
8041 |
__extend__(HTMLAnchorElement.prototype, {
|
jtulach@678
|
8042 |
get accessKey() {
|
jtulach@678
|
8043 |
return this.getAttribute("accesskey")||'';
|
jtulach@678
|
8044 |
},
|
jtulach@678
|
8045 |
set accessKey(val) {
|
jtulach@678
|
8046 |
return this.setAttribute("accesskey",val);
|
jtulach@678
|
8047 |
},
|
jtulach@678
|
8048 |
get charset() {
|
jtulach@678
|
8049 |
return this.getAttribute("charset")||'';
|
jtulach@678
|
8050 |
},
|
jtulach@678
|
8051 |
set charset(val) {
|
jtulach@678
|
8052 |
return this.setAttribute("charset",val);
|
jtulach@678
|
8053 |
},
|
jtulach@678
|
8054 |
get coords() {
|
jtulach@678
|
8055 |
return this.getAttribute("coords")||'';
|
jtulach@678
|
8056 |
},
|
jtulach@678
|
8057 |
set coords(val) {
|
jtulach@678
|
8058 |
return this.setAttribute("coords",val);
|
jtulach@678
|
8059 |
},
|
jtulach@678
|
8060 |
get href() {
|
jtulach@678
|
8061 |
var link = this.getAttribute('href');
|
jtulach@678
|
8062 |
if (!link) {
|
jtulach@678
|
8063 |
return '';
|
jtulach@678
|
8064 |
}
|
jtulach@678
|
8065 |
return Envjs.uri(link,
|
jtulach@678
|
8066 |
this.ownerDocument.location.toString());
|
jtulach@678
|
8067 |
},
|
jtulach@678
|
8068 |
set href(val) {
|
jtulach@678
|
8069 |
return this.setAttribute("href", val);
|
jtulach@678
|
8070 |
},
|
jtulach@678
|
8071 |
get hreflang() {
|
jtulach@678
|
8072 |
return this.getAttribute("hreflang")||'';
|
jtulach@678
|
8073 |
},
|
jtulach@678
|
8074 |
set hreflang(val) {
|
jtulach@678
|
8075 |
this.setAttribute("hreflang",val);
|
jtulach@678
|
8076 |
},
|
jtulach@678
|
8077 |
get name() {
|
jtulach@678
|
8078 |
return this.getAttribute("name")||'';
|
jtulach@678
|
8079 |
},
|
jtulach@678
|
8080 |
set name(val) {
|
jtulach@678
|
8081 |
this.setAttribute("name",val);
|
jtulach@678
|
8082 |
},
|
jtulach@678
|
8083 |
get rel() {
|
jtulach@678
|
8084 |
return this.getAttribute("rel")||'';
|
jtulach@678
|
8085 |
},
|
jtulach@678
|
8086 |
set rel(val) {
|
jtulach@678
|
8087 |
return this.setAttribute("rel", val);
|
jtulach@678
|
8088 |
},
|
jtulach@678
|
8089 |
get rev() {
|
jtulach@678
|
8090 |
return this.getAttribute("rev")||'';
|
jtulach@678
|
8091 |
},
|
jtulach@678
|
8092 |
set rev(val) {
|
jtulach@678
|
8093 |
return this.setAttribute("rev",val);
|
jtulach@678
|
8094 |
},
|
jtulach@678
|
8095 |
get shape() {
|
jtulach@678
|
8096 |
return this.getAttribute("shape")||'';
|
jtulach@678
|
8097 |
},
|
jtulach@678
|
8098 |
set shape(val) {
|
jtulach@678
|
8099 |
return this.setAttribute("shape",val);
|
jtulach@678
|
8100 |
},
|
jtulach@678
|
8101 |
get target() {
|
jtulach@678
|
8102 |
return this.getAttribute("target")||'';
|
jtulach@678
|
8103 |
},
|
jtulach@678
|
8104 |
set target(val) {
|
jtulach@678
|
8105 |
return this.setAttribute("target",val);
|
jtulach@678
|
8106 |
},
|
jtulach@678
|
8107 |
get type() {
|
jtulach@678
|
8108 |
return this.getAttribute("type")||'';
|
jtulach@678
|
8109 |
},
|
jtulach@678
|
8110 |
set type(val) {
|
jtulach@678
|
8111 |
return this.setAttribute("type",val);
|
jtulach@678
|
8112 |
},
|
jtulach@678
|
8113 |
blur: function() {
|
jtulach@678
|
8114 |
__blur__(this);
|
jtulach@678
|
8115 |
},
|
jtulach@678
|
8116 |
focus: function() {
|
jtulach@678
|
8117 |
__focus__(this);
|
jtulach@678
|
8118 |
},
|
jtulach@678
|
8119 |
|
jtulach@678
|
8120 |
/**
|
jtulach@678
|
8121 |
* Unlike other elements, toString returns the href
|
jtulach@678
|
8122 |
*/
|
jtulach@678
|
8123 |
toString: function() {
|
jtulach@678
|
8124 |
return this.href;
|
jtulach@678
|
8125 |
}
|
jtulach@678
|
8126 |
});
|
jtulach@678
|
8127 |
|
jtulach@678
|
8128 |
/*
|
jtulach@678
|
8129 |
* HTMLAreaElement - DOM Level 2
|
jtulach@678
|
8130 |
*
|
jtulach@678
|
8131 |
* HTML5: 4.8.13 The area element
|
jtulach@678
|
8132 |
* http://dev.w3.org/html5/spec/Overview.html#the-area-element
|
jtulach@678
|
8133 |
*/
|
jtulach@678
|
8134 |
HTMLAreaElement = function(ownerDocument) {
|
jtulach@678
|
8135 |
HTMLElement.apply(this, arguments);
|
jtulach@678
|
8136 |
};
|
jtulach@678
|
8137 |
HTMLAreaElement.prototype = new HTMLElement();
|
jtulach@678
|
8138 |
__extend__(HTMLAreaElement.prototype, {
|
jtulach@678
|
8139 |
get accessKey(){
|
jtulach@678
|
8140 |
return this.getAttribute('accesskey');
|
jtulach@678
|
8141 |
},
|
jtulach@678
|
8142 |
set accessKey(value){
|
jtulach@678
|
8143 |
this.setAttribute('accesskey',value);
|
jtulach@678
|
8144 |
},
|
jtulach@678
|
8145 |
get alt(){
|
jtulach@678
|
8146 |
return this.getAttribute('alt') || '';
|
jtulach@678
|
8147 |
},
|
jtulach@678
|
8148 |
set alt(value){
|
jtulach@678
|
8149 |
this.setAttribute('alt',value);
|
jtulach@678
|
8150 |
},
|
jtulach@678
|
8151 |
get coords(){
|
jtulach@678
|
8152 |
return this.getAttribute('coords');
|
jtulach@678
|
8153 |
},
|
jtulach@678
|
8154 |
set coords(value){
|
jtulach@678
|
8155 |
this.setAttribute('coords',value);
|
jtulach@678
|
8156 |
},
|
jtulach@678
|
8157 |
get href(){
|
jtulach@678
|
8158 |
return this.getAttribute('href') || '';
|
jtulach@678
|
8159 |
},
|
jtulach@678
|
8160 |
set href(value){
|
jtulach@678
|
8161 |
this.setAttribute('href',value);
|
jtulach@678
|
8162 |
},
|
jtulach@678
|
8163 |
get noHref(){
|
jtulach@678
|
8164 |
return this.hasAttribute('href');
|
jtulach@678
|
8165 |
},
|
jtulach@678
|
8166 |
get shape(){
|
jtulach@678
|
8167 |
//TODO
|
jtulach@678
|
8168 |
return 0;
|
jtulach@678
|
8169 |
},
|
jtulach@678
|
8170 |
/*get tabIndex(){
|
jtulach@678
|
8171 |
return this.getAttribute('tabindex');
|
jtulach@678
|
8172 |
},
|
jtulach@678
|
8173 |
set tabIndex(value){
|
jtulach@678
|
8174 |
this.setAttribute('tabindex',value);
|
jtulach@678
|
8175 |
},*/
|
jtulach@678
|
8176 |
get target(){
|
jtulach@678
|
8177 |
return this.getAttribute('target');
|
jtulach@678
|
8178 |
},
|
jtulach@678
|
8179 |
set target(value){
|
jtulach@678
|
8180 |
this.setAttribute('target',value);
|
jtulach@678
|
8181 |
},
|
jtulach@678
|
8182 |
|
jtulach@678
|
8183 |
/**
|
jtulach@678
|
8184 |
* toString like <a>, returns the href
|
jtulach@678
|
8185 |
*/
|
jtulach@678
|
8186 |
toString: function() {
|
jtulach@678
|
8187 |
return this.href;
|
jtulach@678
|
8188 |
}
|
jtulach@678
|
8189 |
});
|
jtulach@678
|
8190 |
|
jtulach@678
|
8191 |
|
jtulach@678
|
8192 |
/*
|
jtulach@678
|
8193 |
* HTMLBaseElement - DOM Level 2
|
jtulach@678
|
8194 |
*
|
jtulach@678
|
8195 |
* HTML5: 4.2.3 The base element
|
jtulach@678
|
8196 |
* http://dev.w3.org/html5/spec/Overview.html#the-base-element
|
jtulach@678
|
8197 |
*/
|
jtulach@678
|
8198 |
HTMLBaseElement = function(ownerDocument) {
|
jtulach@678
|
8199 |
HTMLElement.apply(this, arguments);
|
jtulach@678
|
8200 |
};
|
jtulach@678
|
8201 |
HTMLBaseElement.prototype = new HTMLElement();
|
jtulach@678
|
8202 |
__extend__(HTMLBaseElement.prototype, {
|
jtulach@678
|
8203 |
get href(){
|
jtulach@678
|
8204 |
return this.getAttribute('href');
|
jtulach@678
|
8205 |
},
|
jtulach@678
|
8206 |
set href(value){
|
jtulach@678
|
8207 |
this.setAttribute('href',value);
|
jtulach@678
|
8208 |
},
|
jtulach@678
|
8209 |
get target(){
|
jtulach@678
|
8210 |
return this.getAttribute('target');
|
jtulach@678
|
8211 |
},
|
jtulach@678
|
8212 |
set target(value){
|
jtulach@678
|
8213 |
this.setAttribute('target',value);
|
jtulach@678
|
8214 |
},
|
jtulach@678
|
8215 |
toString: function() {
|
jtulach@678
|
8216 |
return '[object HTMLBaseElement]';
|
jtulach@678
|
8217 |
}
|
jtulach@678
|
8218 |
});
|
jtulach@678
|
8219 |
|
jtulach@678
|
8220 |
|
jtulach@678
|
8221 |
/*
|
jtulach@678
|
8222 |
* HTMLQuoteElement - DOM Level 2
|
jtulach@678
|
8223 |
* HTML5: 4.5.5 The blockquote element
|
jtulach@678
|
8224 |
* http://dev.w3.org/html5/spec/Overview.html#htmlquoteelement
|
jtulach@678
|
8225 |
*/
|
jtulach@678
|
8226 |
HTMLQuoteElement = function(ownerDocument) {
|
jtulach@678
|
8227 |
HTMLElement.apply(this, arguments);
|
jtulach@678
|
8228 |
};
|
jtulach@678
|
8229 |
__extend__(HTMLQuoteElement.prototype, HTMLElement.prototype);
|
jtulach@678
|
8230 |
__extend__(HTMLQuoteElement.prototype, {
|
jtulach@678
|
8231 |
/**
|
jtulach@678
|
8232 |
* Quoth the spec:
|
jtulach@678
|
8233 |
* """
|
jtulach@678
|
8234 |
* If the cite attribute is present, it must be a valid URL. To
|
jtulach@678
|
8235 |
* obtain the corresponding citation link, the value of the
|
jtulach@678
|
8236 |
* attribute must be resolved relative to the element. User agents
|
jtulach@678
|
8237 |
* should allow users to follow such citation links.
|
jtulach@678
|
8238 |
* """
|
jtulach@678
|
8239 |
*
|
jtulach@678
|
8240 |
* TODO: normalize
|
jtulach@678
|
8241 |
*
|
jtulach@678
|
8242 |
*/
|
jtulach@678
|
8243 |
get cite() {
|
jtulach@678
|
8244 |
return this.getAttribute('cite') || '';
|
jtulach@678
|
8245 |
},
|
jtulach@678
|
8246 |
|
jtulach@678
|
8247 |
set cite(value) {
|
jtulach@678
|
8248 |
this.setAttribute('cite', value);
|
jtulach@678
|
8249 |
},
|
jtulach@678
|
8250 |
toString: function() {
|
jtulach@678
|
8251 |
return '[object HTMLQuoteElement]';
|
jtulach@678
|
8252 |
}
|
jtulach@678
|
8253 |
});
|
jtulach@678
|
8254 |
|
jtulach@678
|
8255 |
/*
|
jtulach@678
|
8256 |
* HTMLBodyElement - DOM Level 2
|
jtulach@678
|
8257 |
* HTML5: http://dev.w3.org/html5/spec/Overview.html#the-body-element-0
|
jtulach@678
|
8258 |
*/
|
jtulach@678
|
8259 |
HTMLBodyElement = function(ownerDocument) {
|
jtulach@678
|
8260 |
HTMLElement.apply(this, arguments);
|
jtulach@678
|
8261 |
};
|
jtulach@678
|
8262 |
HTMLBodyElement.prototype = new HTMLElement();
|
jtulach@678
|
8263 |
__extend__(HTMLBodyElement.prototype, {
|
jtulach@678
|
8264 |
onload: function(event){
|
jtulach@678
|
8265 |
__eval__(this.getAttribute('onload')||'', this);
|
jtulach@678
|
8266 |
},
|
jtulach@678
|
8267 |
onunload: function(event){
|
jtulach@678
|
8268 |
__eval__(this.getAttribute('onunload')||'', this);
|
jtulach@678
|
8269 |
},
|
jtulach@678
|
8270 |
toString: function() {
|
jtulach@678
|
8271 |
return '[object HTMLBodyElement]';
|
jtulach@678
|
8272 |
}
|
jtulach@678
|
8273 |
});
|
jtulach@678
|
8274 |
|
jtulach@678
|
8275 |
/*
|
jtulach@678
|
8276 |
* HTMLBRElement
|
jtulach@678
|
8277 |
* HTML5: 4.5.3 The hr Element
|
jtulach@678
|
8278 |
* http://dev.w3.org/html5/spec/Overview.html#the-br-element
|
jtulach@678
|
8279 |
*/
|
jtulach@678
|
8280 |
HTMLBRElement = function(ownerDocument) {
|
jtulach@678
|
8281 |
HTMLElement.apply(this, arguments);
|
jtulach@678
|
8282 |
};
|
jtulach@678
|
8283 |
|
jtulach@678
|
8284 |
HTMLBRElement.prototype = new HTMLElement();
|
jtulach@678
|
8285 |
__extend__(HTMLBRElement.prototype, {
|
jtulach@678
|
8286 |
|
jtulach@678
|
8287 |
// no additional properties or elements
|
jtulach@678
|
8288 |
|
jtulach@678
|
8289 |
toString: function() {
|
jtulach@678
|
8290 |
return '[object HTMLBRElement]';
|
jtulach@678
|
8291 |
}
|
jtulach@678
|
8292 |
});
|
jtulach@678
|
8293 |
|
jtulach@678
|
8294 |
|
jtulach@678
|
8295 |
/*
|
jtulach@678
|
8296 |
* HTMLButtonElement - DOM Level 2
|
jtulach@678
|
8297 |
*
|
jtulach@678
|
8298 |
* HTML5: 4.10.6 The button element
|
jtulach@678
|
8299 |
* http://dev.w3.org/html5/spec/Overview.html#the-button-element
|
jtulach@678
|
8300 |
*/
|
jtulach@678
|
8301 |
HTMLButtonElement = function(ownerDocument) {
|
jtulach@678
|
8302 |
HTMLTypeValueInputs.apply(this, arguments);
|
jtulach@678
|
8303 |
};
|
jtulach@678
|
8304 |
HTMLButtonElement.prototype = new HTMLTypeValueInputs();
|
jtulach@678
|
8305 |
__extend__(HTMLButtonElement.prototype, inputElements_status);
|
jtulach@678
|
8306 |
__extend__(HTMLButtonElement.prototype, {
|
jtulach@678
|
8307 |
get dataFormatAs(){
|
jtulach@678
|
8308 |
return this.getAttribute('dataFormatAs');
|
jtulach@678
|
8309 |
},
|
jtulach@678
|
8310 |
set dataFormatAs(value){
|
jtulach@678
|
8311 |
this.setAttribute('dataFormatAs',value);
|
jtulach@678
|
8312 |
},
|
jtulach@678
|
8313 |
get type() {
|
jtulach@678
|
8314 |
return this.getAttribute('type') || 'submit';
|
jtulach@678
|
8315 |
},
|
jtulach@678
|
8316 |
set type(value) {
|
jtulach@678
|
8317 |
this.setAttribute('type', value);
|
jtulach@678
|
8318 |
},
|
jtulach@678
|
8319 |
get value() {
|
jtulach@678
|
8320 |
return this.getAttribute('value') || '';
|
jtulach@678
|
8321 |
},
|
jtulach@678
|
8322 |
set value(value) {
|
jtulach@678
|
8323 |
this.setAttribute('value', value);
|
jtulach@678
|
8324 |
},
|
jtulach@678
|
8325 |
toString: function() {
|
jtulach@678
|
8326 |
return '[object HTMLButtonElement]';
|
jtulach@678
|
8327 |
}
|
jtulach@678
|
8328 |
});
|
jtulach@678
|
8329 |
|
jtulach@678
|
8330 |
// Named Element Support
|
jtulach@678
|
8331 |
HTMLElement.registerSetAttribute('BUTTON', 'name',
|
jtulach@678
|
8332 |
__updateFormForNamedElement__);
|
jtulach@678
|
8333 |
|
jtulach@678
|
8334 |
/*
|
jtulach@678
|
8335 |
* HTMLCanvasElement - DOM Level 2
|
jtulach@678
|
8336 |
* HTML5: 4.8.11 The canvas element
|
jtulach@678
|
8337 |
* http://dev.w3.org/html5/spec/Overview.html#the-canvas-element
|
jtulach@678
|
8338 |
*/
|
jtulach@678
|
8339 |
|
jtulach@678
|
8340 |
|
jtulach@678
|
8341 |
/*
|
jtulach@678
|
8342 |
* This is a "non-Abstract Base Class". For an implmentation that actually
|
jtulach@678
|
8343 |
* did something, all these methods would need to over-written
|
jtulach@678
|
8344 |
*/
|
jtulach@678
|
8345 |
CanvasRenderingContext2D = function() {
|
jtulach@678
|
8346 |
// NOP
|
jtulach@678
|
8347 |
};
|
jtulach@678
|
8348 |
|
jtulach@678
|
8349 |
var nullfunction = function() {};
|
jtulach@678
|
8350 |
|
jtulach@678
|
8351 |
CanvasRenderingContext2D.prototype = {
|
jtulach@678
|
8352 |
addColorStop: nullfunction,
|
jtulach@678
|
8353 |
arc: nullfunction,
|
jtulach@678
|
8354 |
beginPath: nullfunction,
|
jtulach@678
|
8355 |
bezierCurveTo: nullfunction,
|
jtulach@678
|
8356 |
clearRect: nullfunction,
|
jtulach@678
|
8357 |
clip: nullfunction,
|
jtulach@678
|
8358 |
closePath: nullfunction,
|
jtulach@678
|
8359 |
createLinearGradient: nullfunction,
|
jtulach@678
|
8360 |
createPattern: nullfunction,
|
jtulach@678
|
8361 |
createRadialGradient: nullfunction,
|
jtulach@678
|
8362 |
drawImage: nullfunction,
|
jtulach@678
|
8363 |
fill: nullfunction,
|
jtulach@678
|
8364 |
fillRect: nullfunction,
|
jtulach@678
|
8365 |
lineTo: nullfunction,
|
jtulach@678
|
8366 |
moveTo: nullfunction,
|
jtulach@678
|
8367 |
quadraticCurveTo: nullfunction,
|
jtulach@678
|
8368 |
rect: nullfunction,
|
jtulach@678
|
8369 |
restore: nullfunction,
|
jtulach@678
|
8370 |
rotate: nullfunction,
|
jtulach@678
|
8371 |
save: nullfunction,
|
jtulach@678
|
8372 |
scale: nullfunction,
|
jtulach@678
|
8373 |
setTranform: nullfunction,
|
jtulach@678
|
8374 |
stroke: nullfunction,
|
jtulach@678
|
8375 |
strokeRect: nullfunction,
|
jtulach@678
|
8376 |
transform: nullfunction,
|
jtulach@678
|
8377 |
translate: nullfunction,
|
jtulach@678
|
8378 |
|
jtulach@678
|
8379 |
toString: function() {
|
jtulach@678
|
8380 |
return '[object CanvasRenderingContext2D]';
|
jtulach@678
|
8381 |
}
|
jtulach@678
|
8382 |
};
|
jtulach@678
|
8383 |
|
jtulach@678
|
8384 |
HTMLCanvasElement = function(ownerDocument) {
|
jtulach@678
|
8385 |
HTMLElement.apply(this, arguments);
|
jtulach@678
|
8386 |
};
|
jtulach@678
|
8387 |
HTMLCanvasElement.prototype = new HTMLElement();
|
jtulach@678
|
8388 |
__extend__(HTMLCanvasElement.prototype, {
|
jtulach@678
|
8389 |
|
jtulach@678
|
8390 |
getContext: function(ctxtype) {
|
jtulach@678
|
8391 |
if (ctxtype === '2d') {
|
jtulach@678
|
8392 |
return new CanvasRenderingContext2D();
|
jtulach@678
|
8393 |
}
|
jtulach@678
|
8394 |
throw new Error("Unknown context type of '" + ctxtype + '"');
|
jtulach@678
|
8395 |
},
|
jtulach@678
|
8396 |
|
jtulach@678
|
8397 |
get height(){
|
jtulach@678
|
8398 |
return Number(this.getAttribute('height')|| 150);
|
jtulach@678
|
8399 |
},
|
jtulach@678
|
8400 |
set height(value){
|
jtulach@678
|
8401 |
this.setAttribute('height', value);
|
jtulach@678
|
8402 |
},
|
jtulach@678
|
8403 |
|
jtulach@678
|
8404 |
get width(){
|
jtulach@678
|
8405 |
return Number(this.getAttribute('width')|| 300);
|
jtulach@678
|
8406 |
},
|
jtulach@678
|
8407 |
set width(value){
|
jtulach@678
|
8408 |
this.setAttribute('width', value);
|
jtulach@678
|
8409 |
},
|
jtulach@678
|
8410 |
|
jtulach@678
|
8411 |
toString: function() {
|
jtulach@678
|
8412 |
return '[object HTMLCanvasElement]';
|
jtulach@678
|
8413 |
}
|
jtulach@678
|
8414 |
|
jtulach@678
|
8415 |
});
|
jtulach@678
|
8416 |
|
jtulach@678
|
8417 |
|
jtulach@678
|
8418 |
/*
|
jtulach@678
|
8419 |
* HTMLTableColElement - DOM Level 2
|
jtulach@678
|
8420 |
*
|
jtulach@678
|
8421 |
* HTML5: 4.9.3 The colgroup element
|
jtulach@678
|
8422 |
* http://dev.w3.org/html5/spec/Overview.html#the-colgroup-element
|
jtulach@678
|
8423 |
*/
|
jtulach@678
|
8424 |
HTMLTableColElement = function(ownerDocument) {
|
jtulach@678
|
8425 |
HTMLElement.apply(this, arguments);
|
jtulach@678
|
8426 |
};
|
jtulach@678
|
8427 |
HTMLTableColElement.prototype = new HTMLElement();
|
jtulach@678
|
8428 |
__extend__(HTMLTableColElement.prototype, {
|
jtulach@678
|
8429 |
get align(){
|
jtulach@678
|
8430 |
return this.getAttribute('align');
|
jtulach@678
|
8431 |
},
|
jtulach@678
|
8432 |
set align(value){
|
jtulach@678
|
8433 |
this.setAttribute('align', value);
|
jtulach@678
|
8434 |
},
|
jtulach@678
|
8435 |
get ch(){
|
jtulach@678
|
8436 |
return this.getAttribute('ch');
|
jtulach@678
|
8437 |
},
|
jtulach@678
|
8438 |
set ch(value){
|
jtulach@678
|
8439 |
this.setAttribute('ch', value);
|
jtulach@678
|
8440 |
},
|
jtulach@678
|
8441 |
get chOff(){
|
jtulach@678
|
8442 |
return this.getAttribute('ch');
|
jtulach@678
|
8443 |
},
|
jtulach@678
|
8444 |
set chOff(value){
|
jtulach@678
|
8445 |
this.setAttribute('ch', value);
|
jtulach@678
|
8446 |
},
|
jtulach@678
|
8447 |
get span(){
|
jtulach@678
|
8448 |
return this.getAttribute('span');
|
jtulach@678
|
8449 |
},
|
jtulach@678
|
8450 |
set span(value){
|
jtulach@678
|
8451 |
this.setAttribute('span', value);
|
jtulach@678
|
8452 |
},
|
jtulach@678
|
8453 |
get vAlign(){
|
jtulach@678
|
8454 |
return this.getAttribute('valign');
|
jtulach@678
|
8455 |
},
|
jtulach@678
|
8456 |
set vAlign(value){
|
jtulach@678
|
8457 |
this.setAttribute('valign', value);
|
jtulach@678
|
8458 |
},
|
jtulach@678
|
8459 |
get width(){
|
jtulach@678
|
8460 |
return this.getAttribute('width');
|
jtulach@678
|
8461 |
},
|
jtulach@678
|
8462 |
set width(value){
|
jtulach@678
|
8463 |
this.setAttribute('width', value);
|
jtulach@678
|
8464 |
},
|
jtulach@678
|
8465 |
toString: function() {
|
jtulach@678
|
8466 |
return '[object HTMLTableColElement]';
|
jtulach@678
|
8467 |
}
|
jtulach@678
|
8468 |
});
|
jtulach@678
|
8469 |
|
jtulach@678
|
8470 |
|
jtulach@678
|
8471 |
/*
|
jtulach@678
|
8472 |
* HTMLModElement - DOM Level 2
|
jtulach@678
|
8473 |
* http://dev.w3.org/html5/spec/Overview.html#htmlmodelement
|
jtulach@678
|
8474 |
*/
|
jtulach@678
|
8475 |
HTMLModElement = function(ownerDocument) {
|
jtulach@678
|
8476 |
HTMLElement.apply(this, arguments);
|
jtulach@678
|
8477 |
};
|
jtulach@678
|
8478 |
HTMLModElement.prototype = new HTMLElement();
|
jtulach@678
|
8479 |
__extend__(HTMLModElement.prototype, {
|
jtulach@678
|
8480 |
get cite(){
|
jtulach@678
|
8481 |
return this.getAttribute('cite');
|
jtulach@678
|
8482 |
},
|
jtulach@678
|
8483 |
set cite(value){
|
jtulach@678
|
8484 |
this.setAttribute('cite', value);
|
jtulach@678
|
8485 |
},
|
jtulach@678
|
8486 |
get dateTime(){
|
jtulach@678
|
8487 |
return this.getAttribute('datetime');
|
jtulach@678
|
8488 |
},
|
jtulach@678
|
8489 |
set dateTime(value){
|
jtulach@678
|
8490 |
this.setAttribute('datetime', value);
|
jtulach@678
|
8491 |
},
|
jtulach@678
|
8492 |
toString: function() {
|
jtulach@678
|
8493 |
return '[object HTMLModElement]';
|
jtulach@678
|
8494 |
}
|
jtulach@678
|
8495 |
});
|
jtulach@678
|
8496 |
|
jtulach@678
|
8497 |
/*
|
jtulach@678
|
8498 |
* HTMLDivElement - DOM Level 2
|
jtulach@678
|
8499 |
* HTML5: 4.5.12 The Div Element
|
jtulach@678
|
8500 |
* http://dev.w3.org/html5/spec/Overview.html#the-div-element
|
jtulach@678
|
8501 |
*/
|
jtulach@678
|
8502 |
HTMLDivElement = function(ownerDocument) {
|
jtulach@678
|
8503 |
HTMLElement.apply(this, arguments);
|
jtulach@678
|
8504 |
};
|
jtulach@678
|
8505 |
|
jtulach@678
|
8506 |
HTMLDivElement.prototype = new HTMLElement();
|
jtulach@678
|
8507 |
__extend__(HTMLDivElement.prototype, {
|
jtulach@678
|
8508 |
get align(){
|
jtulach@678
|
8509 |
return this.getAttribute('align') || 'left';
|
jtulach@678
|
8510 |
},
|
jtulach@678
|
8511 |
set align(value){
|
jtulach@678
|
8512 |
this.setAttribute('align', value);
|
jtulach@678
|
8513 |
},
|
jtulach@678
|
8514 |
toString: function() {
|
jtulach@678
|
8515 |
return '[object HTMLDivElement]';
|
jtulach@678
|
8516 |
}
|
jtulach@678
|
8517 |
});
|
jtulach@678
|
8518 |
|
jtulach@678
|
8519 |
|
jtulach@678
|
8520 |
/*
|
jtulach@678
|
8521 |
* HTMLDListElement
|
jtulach@678
|
8522 |
* HTML5: 4.5.7 The dl Element
|
jtulach@678
|
8523 |
* http://dev.w3.org/html5/spec/Overview.html#the-dl-element
|
jtulach@678
|
8524 |
*/
|
jtulach@678
|
8525 |
HTMLDListElement = function(ownerDocument) {
|
jtulach@678
|
8526 |
HTMLElement.apply(this, arguments);
|
jtulach@678
|
8527 |
};
|
jtulach@678
|
8528 |
|
jtulach@678
|
8529 |
HTMLDListElement.prototype = new HTMLElement();
|
jtulach@678
|
8530 |
__extend__(HTMLDListElement.prototype, {
|
jtulach@678
|
8531 |
|
jtulach@678
|
8532 |
// no additional properties or elements
|
jtulach@678
|
8533 |
|
jtulach@678
|
8534 |
toString: function() {
|
jtulach@678
|
8535 |
return '[object HTMLDListElement]';
|
jtulach@678
|
8536 |
}
|
jtulach@678
|
8537 |
});
|
jtulach@678
|
8538 |
|
jtulach@678
|
8539 |
|
jtulach@678
|
8540 |
/**
|
jtulach@678
|
8541 |
* HTMLLegendElement - DOM Level 2
|
jtulach@678
|
8542 |
*
|
jtulach@678
|
8543 |
* HTML5: 4.10.3 The legend element
|
jtulach@678
|
8544 |
* http://dev.w3.org/html5/spec/Overview.html#the-legend-element
|
jtulach@678
|
8545 |
*/
|
jtulach@678
|
8546 |
HTMLLegendElement = function(ownerDocument) {
|
jtulach@678
|
8547 |
HTMLInputCommon.apply(this, arguments);
|
jtulach@678
|
8548 |
};
|
jtulach@678
|
8549 |
HTMLLegendElement.prototype = new HTMLInputCommon();
|
jtulach@678
|
8550 |
__extend__(HTMLLegendElement.prototype, {
|
jtulach@678
|
8551 |
get align(){
|
jtulach@678
|
8552 |
return this.getAttribute('align');
|
jtulach@678
|
8553 |
},
|
jtulach@678
|
8554 |
set align(value){
|
jtulach@678
|
8555 |
this.setAttribute('align',value);
|
jtulach@678
|
8556 |
}
|
jtulach@678
|
8557 |
});
|
jtulach@678
|
8558 |
|
jtulach@678
|
8559 |
|
jtulach@678
|
8560 |
/*
|
jtulach@678
|
8561 |
* HTMLFieldSetElement - DOM Level 2
|
jtulach@678
|
8562 |
*
|
jtulach@678
|
8563 |
* HTML5: 4.10.2 The fieldset element
|
jtulach@678
|
8564 |
* http://dev.w3.org/html5/spec/Overview.html#the-fieldset-element
|
jtulach@678
|
8565 |
*/
|
jtulach@678
|
8566 |
HTMLFieldSetElement = function(ownerDocument) {
|
jtulach@678
|
8567 |
HTMLLegendElement.apply(this, arguments);
|
jtulach@678
|
8568 |
};
|
jtulach@678
|
8569 |
HTMLFieldSetElement.prototype = new HTMLLegendElement();
|
jtulach@678
|
8570 |
__extend__(HTMLFieldSetElement.prototype, {
|
jtulach@678
|
8571 |
get margin(){
|
jtulach@678
|
8572 |
return this.getAttribute('margin');
|
jtulach@678
|
8573 |
},
|
jtulach@678
|
8574 |
set margin(value){
|
jtulach@678
|
8575 |
this.setAttribute('margin',value);
|
jtulach@678
|
8576 |
},
|
jtulach@678
|
8577 |
toString: function() {
|
jtulach@678
|
8578 |
return '[object HTMLFieldSetElement]';
|
jtulach@678
|
8579 |
}
|
jtulach@678
|
8580 |
});
|
jtulach@678
|
8581 |
|
jtulach@678
|
8582 |
// Named Element Support
|
jtulach@678
|
8583 |
HTMLElement.registerSetAttribute('FIELDSET', 'name',
|
jtulach@678
|
8584 |
__updateFormForNamedElement__);
|
jtulach@678
|
8585 |
/*
|
jtulach@678
|
8586 |
* HTMLFormElement - DOM Level 2
|
jtulach@678
|
8587 |
*
|
jtulach@678
|
8588 |
* HTML5: http://dev.w3.org/html5/spec/Overview.html#the-form-element
|
jtulach@678
|
8589 |
*/
|
jtulach@678
|
8590 |
HTMLFormElement = function(ownerDocument){
|
jtulach@678
|
8591 |
HTMLElement.apply(this, arguments);
|
jtulach@678
|
8592 |
|
jtulach@678
|
8593 |
//TODO: on __elementPopped__ from the parser
|
jtulach@678
|
8594 |
// we need to determine all the forms default
|
jtulach@678
|
8595 |
// values
|
jtulach@678
|
8596 |
};
|
jtulach@678
|
8597 |
HTMLFormElement.prototype = new HTMLElement();
|
jtulach@678
|
8598 |
__extend__(HTMLFormElement.prototype,{
|
jtulach@678
|
8599 |
get acceptCharset(){
|
jtulach@678
|
8600 |
return this.getAttribute('accept-charset');
|
jtulach@678
|
8601 |
},
|
jtulach@678
|
8602 |
set acceptCharset(acceptCharset) {
|
jtulach@678
|
8603 |
this.setAttribute('accept-charset', acceptCharset);
|
jtulach@678
|
8604 |
},
|
jtulach@678
|
8605 |
get action() {
|
jtulach@678
|
8606 |
return this.getAttribute('action');
|
jtulach@678
|
8607 |
},
|
jtulach@678
|
8608 |
set action(action){
|
jtulach@678
|
8609 |
this.setAttribute('action', action);
|
jtulach@678
|
8610 |
},
|
jtulach@678
|
8611 |
|
jtulach@678
|
8612 |
get enctype() {
|
jtulach@678
|
8613 |
return this.getAttribute('enctype');
|
jtulach@678
|
8614 |
},
|
jtulach@678
|
8615 |
set enctype(enctype) {
|
jtulach@678
|
8616 |
this.setAttribute('enctype', enctype);
|
jtulach@678
|
8617 |
},
|
jtulach@678
|
8618 |
get method() {
|
jtulach@678
|
8619 |
return this.getAttribute('method');
|
jtulach@678
|
8620 |
},
|
jtulach@678
|
8621 |
set method(method) {
|
jtulach@678
|
8622 |
this.setAttribute('method', method);
|
jtulach@678
|
8623 |
},
|
jtulach@678
|
8624 |
get name() {
|
jtulach@678
|
8625 |
return this.getAttribute("name");
|
jtulach@678
|
8626 |
},
|
jtulach@678
|
8627 |
set name(val) {
|
jtulach@678
|
8628 |
return this.setAttribute("name",val);
|
jtulach@678
|
8629 |
},
|
jtulach@678
|
8630 |
get target() {
|
jtulach@678
|
8631 |
return this.getAttribute("target");
|
jtulach@678
|
8632 |
},
|
jtulach@678
|
8633 |
set target(val) {
|
jtulach@678
|
8634 |
return this.setAttribute("target",val);
|
jtulach@678
|
8635 |
},
|
jtulach@678
|
8636 |
|
jtulach@678
|
8637 |
/**
|
jtulach@678
|
8638 |
* "Named Elements"
|
jtulach@678
|
8639 |
*
|
jtulach@678
|
8640 |
*/
|
jtulach@678
|
8641 |
/**
|
jtulach@678
|
8642 |
* returns HTMLFormControlsCollection
|
jtulach@678
|
8643 |
* http://dev.w3.org/html5/spec/Overview.html#dom-form-elements
|
jtulach@678
|
8644 |
*
|
jtulach@678
|
8645 |
* button fieldset input keygen object output select textarea
|
jtulach@678
|
8646 |
*/
|
jtulach@678
|
8647 |
get elements() {
|
jtulach@678
|
8648 |
var nodes = this.getElementsByTagName('*');
|
jtulach@678
|
8649 |
var alist = [];
|
jtulach@678
|
8650 |
var i, tmp;
|
jtulach@678
|
8651 |
for (i = 0; i < nodes.length; ++i) {
|
jtulach@678
|
8652 |
nodename = nodes[i].nodeName;
|
jtulach@678
|
8653 |
// would like to replace switch with something else
|
jtulach@678
|
8654 |
// since it's redundant with the SetAttribute callbacks
|
jtulach@678
|
8655 |
switch (nodes[i].nodeName) {
|
jtulach@678
|
8656 |
case 'BUTTON':
|
jtulach@678
|
8657 |
case 'FIELDSET':
|
jtulach@678
|
8658 |
case 'INPUT':
|
jtulach@678
|
8659 |
case 'KEYGEN':
|
jtulach@678
|
8660 |
case 'OBJECT':
|
jtulach@678
|
8661 |
case 'OUTPUT':
|
jtulach@678
|
8662 |
case 'SELECT':
|
jtulach@678
|
8663 |
case 'TEXTAREA':
|
jtulach@678
|
8664 |
alist.push(nodes[i]);
|
jtulach@678
|
8665 |
this[i] = nodes[i];
|
jtulach@678
|
8666 |
tmp = nodes[i].name;
|
jtulach@678
|
8667 |
if (tmp) {
|
jtulach@678
|
8668 |
this[tmp] = nodes[i];
|
jtulach@678
|
8669 |
}
|
jtulach@678
|
8670 |
tmp = nodes[i].id;
|
jtulach@678
|
8671 |
if (tmp) {
|
jtulach@678
|
8672 |
this[tmp] = nodes[i];
|
jtulach@678
|
8673 |
}
|
jtulach@678
|
8674 |
}
|
jtulach@678
|
8675 |
}
|
jtulach@678
|
8676 |
return new HTMLCollection(alist);
|
jtulach@678
|
8677 |
},
|
jtulach@678
|
8678 |
_updateElements: function() {
|
jtulach@678
|
8679 |
this.elements;
|
jtulach@678
|
8680 |
},
|
jtulach@678
|
8681 |
get length() {
|
jtulach@678
|
8682 |
return this.elements.length;
|
jtulach@678
|
8683 |
},
|
jtulach@678
|
8684 |
item: function(idx) {
|
jtulach@678
|
8685 |
return this.elements[idx];
|
jtulach@678
|
8686 |
},
|
jtulach@678
|
8687 |
namedItem: function(aname) {
|
jtulach@678
|
8688 |
return this.elements.namedItem(aname);
|
jtulach@678
|
8689 |
},
|
jtulach@678
|
8690 |
toString: function() {
|
jtulach@678
|
8691 |
return '[object HTMLFormElement]';
|
jtulach@678
|
8692 |
},
|
jtulach@678
|
8693 |
submit: function() {
|
jtulach@678
|
8694 |
//TODO: this needs to perform the form inputs serialization
|
jtulach@678
|
8695 |
// and submission
|
jtulach@678
|
8696 |
// DONE: see xhr/form.js
|
jtulach@678
|
8697 |
var event = __submit__(this);
|
jtulach@678
|
8698 |
|
jtulach@678
|
8699 |
},
|
jtulach@678
|
8700 |
reset: function() {
|
jtulach@678
|
8701 |
//TODO: this needs to reset all values specified in the form
|
jtulach@678
|
8702 |
// to those which where set as defaults
|
jtulach@678
|
8703 |
__reset__(this);
|
jtulach@678
|
8704 |
|
jtulach@678
|
8705 |
},
|
jtulach@678
|
8706 |
onsubmit: HTMLEvents.prototype.onsubmit,
|
jtulach@678
|
8707 |
onreset: HTMLEvents.prototype.onreset
|
jtulach@678
|
8708 |
});
|
jtulach@678
|
8709 |
|
jtulach@678
|
8710 |
/**
|
jtulach@678
|
8711 |
* HTMLFrameElement - DOM Level 2
|
jtulach@678
|
8712 |
*/
|
jtulach@678
|
8713 |
HTMLFrameElement = function(ownerDocument) {
|
jtulach@678
|
8714 |
HTMLElement.apply(this, arguments);
|
jtulach@678
|
8715 |
// this is normally a getter but we need to be
|
jtulach@678
|
8716 |
// able to set it to correctly emulate behavior
|
jtulach@678
|
8717 |
this.contentDocument = null;
|
jtulach@678
|
8718 |
this.contentWindow = null;
|
jtulach@678
|
8719 |
};
|
jtulach@678
|
8720 |
HTMLFrameElement.prototype = new HTMLElement();
|
jtulach@678
|
8721 |
__extend__(HTMLFrameElement.prototype, {
|
jtulach@678
|
8722 |
|
jtulach@678
|
8723 |
get frameBorder(){
|
jtulach@678
|
8724 |
return this.getAttribute('border')||"";
|
jtulach@678
|
8725 |
},
|
jtulach@678
|
8726 |
set frameBorder(value){
|
jtulach@678
|
8727 |
this.setAttribute('border', value);
|
jtulach@678
|
8728 |
},
|
jtulach@678
|
8729 |
get longDesc(){
|
jtulach@678
|
8730 |
return this.getAttribute('longdesc')||"";
|
jtulach@678
|
8731 |
},
|
jtulach@678
|
8732 |
set longDesc(value){
|
jtulach@678
|
8733 |
this.setAttribute('longdesc', value);
|
jtulach@678
|
8734 |
},
|
jtulach@678
|
8735 |
get marginHeight(){
|
jtulach@678
|
8736 |
return this.getAttribute('marginheight')||"";
|
jtulach@678
|
8737 |
},
|
jtulach@678
|
8738 |
set marginHeight(value){
|
jtulach@678
|
8739 |
this.setAttribute('marginheight', value);
|
jtulach@678
|
8740 |
},
|
jtulach@678
|
8741 |
get marginWidth(){
|
jtulach@678
|
8742 |
return this.getAttribute('marginwidth')||"";
|
jtulach@678
|
8743 |
},
|
jtulach@678
|
8744 |
set marginWidth(value){
|
jtulach@678
|
8745 |
this.setAttribute('marginwidth', value);
|
jtulach@678
|
8746 |
},
|
jtulach@678
|
8747 |
get name(){
|
jtulach@678
|
8748 |
return this.getAttribute('name')||"";
|
jtulach@678
|
8749 |
},
|
jtulach@678
|
8750 |
set name(value){
|
jtulach@678
|
8751 |
this.setAttribute('name', value);
|
jtulach@678
|
8752 |
},
|
jtulach@678
|
8753 |
get noResize(){
|
jtulach@678
|
8754 |
return this.getAttribute('noresize')||false;
|
jtulach@678
|
8755 |
},
|
jtulach@678
|
8756 |
set noResize(value){
|
jtulach@678
|
8757 |
this.setAttribute('noresize', value);
|
jtulach@678
|
8758 |
},
|
jtulach@678
|
8759 |
get scrolling(){
|
jtulach@678
|
8760 |
return this.getAttribute('scrolling')||"";
|
jtulach@678
|
8761 |
},
|
jtulach@678
|
8762 |
set scrolling(value){
|
jtulach@678
|
8763 |
this.setAttribute('scrolling', value);
|
jtulach@678
|
8764 |
},
|
jtulach@678
|
8765 |
get src(){
|
jtulach@678
|
8766 |
return this.getAttribute('src')||"";
|
jtulach@678
|
8767 |
},
|
jtulach@678
|
8768 |
set src(value){
|
jtulach@678
|
8769 |
this.setAttribute('src', value);
|
jtulach@678
|
8770 |
},
|
jtulach@678
|
8771 |
toString: function(){
|
jtulach@678
|
8772 |
return '[object HTMLFrameElement]';
|
jtulach@678
|
8773 |
},
|
jtulach@678
|
8774 |
onload: HTMLEvents.prototype.onload
|
jtulach@678
|
8775 |
});
|
jtulach@678
|
8776 |
|
jtulach@678
|
8777 |
/**
|
jtulach@678
|
8778 |
* HTMLFrameSetElement - DOM Level 2
|
jtulach@678
|
8779 |
*
|
jtulach@678
|
8780 |
* HTML5: 12.3.3 Frames
|
jtulach@678
|
8781 |
* http://dev.w3.org/html5/spec/Overview.html#frameset
|
jtulach@678
|
8782 |
*/
|
jtulach@678
|
8783 |
HTMLFrameSetElement = function(ownerDocument) {
|
jtulach@678
|
8784 |
HTMLElement.apply(this, arguments);
|
jtulach@678
|
8785 |
};
|
jtulach@678
|
8786 |
HTMLFrameSetElement.prototype = new HTMLElement();
|
jtulach@678
|
8787 |
__extend__(HTMLFrameSetElement.prototype, {
|
jtulach@678
|
8788 |
get cols(){
|
jtulach@678
|
8789 |
return this.getAttribute('cols');
|
jtulach@678
|
8790 |
},
|
jtulach@678
|
8791 |
set cols(value){
|
jtulach@678
|
8792 |
this.setAttribute('cols', value);
|
jtulach@678
|
8793 |
},
|
jtulach@678
|
8794 |
get rows(){
|
jtulach@678
|
8795 |
return this.getAttribute('rows');
|
jtulach@678
|
8796 |
},
|
jtulach@678
|
8797 |
set rows(value){
|
jtulach@678
|
8798 |
this.setAttribute('rows', value);
|
jtulach@678
|
8799 |
},
|
jtulach@678
|
8800 |
toString: function() {
|
jtulach@678
|
8801 |
return '[object HTMLFrameSetElement]';
|
jtulach@678
|
8802 |
}
|
jtulach@678
|
8803 |
});
|
jtulach@678
|
8804 |
|
jtulach@678
|
8805 |
/*
|
jtulach@678
|
8806 |
* HTMLHeadingElement
|
jtulach@678
|
8807 |
* HTML5: 4.4.6 The h1, h2, h3, h4, h5, and h6 elements
|
jtulach@678
|
8808 |
* http://dev.w3.org/html5/spec/Overview.html#the-h1-h2-h3-h4-h5-and-h6-elements
|
jtulach@678
|
8809 |
*/
|
jtulach@678
|
8810 |
HTMLHeadingElement = function(ownerDocument) {
|
jtulach@678
|
8811 |
HTMLElement.apply(this, arguments);
|
jtulach@678
|
8812 |
};
|
jtulach@678
|
8813 |
|
jtulach@678
|
8814 |
HTMLHeadingElement.prototype = new HTMLElement();
|
jtulach@678
|
8815 |
__extend__(HTMLHeadingElement.prototype, {
|
jtulach@678
|
8816 |
toString: function() {
|
jtulach@678
|
8817 |
return '[object HTMLHeadingElement]';
|
jtulach@678
|
8818 |
}
|
jtulach@678
|
8819 |
});
|
jtulach@678
|
8820 |
|
jtulach@678
|
8821 |
/**
|
jtulach@678
|
8822 |
* HTMLHeadElement - DOM Level 2
|
jtulach@678
|
8823 |
*
|
jtulach@678
|
8824 |
* HTML5: 4.2.1 The head element
|
jtulach@678
|
8825 |
* http://dev.w3.org/html5/spec/Overview.html#the-head-element-0
|
jtulach@678
|
8826 |
*/
|
jtulach@678
|
8827 |
HTMLHeadElement = function(ownerDocument) {
|
jtulach@678
|
8828 |
HTMLElement.apply(this, arguments);
|
jtulach@678
|
8829 |
};
|
jtulach@678
|
8830 |
HTMLHeadElement.prototype = new HTMLElement();
|
jtulach@678
|
8831 |
__extend__(HTMLHeadElement.prototype, {
|
jtulach@678
|
8832 |
get profile(){
|
jtulach@678
|
8833 |
return this.getAttribute('profile');
|
jtulach@678
|
8834 |
},
|
jtulach@678
|
8835 |
set profile(value){
|
jtulach@678
|
8836 |
this.setAttribute('profile', value);
|
jtulach@678
|
8837 |
},
|
jtulach@678
|
8838 |
//we override this so we can apply browser behavior specific to head children
|
jtulach@678
|
8839 |
//like loading scripts
|
jtulach@678
|
8840 |
appendChild : function(newChild) {
|
jtulach@678
|
8841 |
newChild = HTMLElement.prototype.appendChild.apply(this,[newChild]);
|
jtulach@678
|
8842 |
//TODO: evaluate scripts which are appended to the head
|
jtulach@678
|
8843 |
//__evalScript__(newChild);
|
jtulach@678
|
8844 |
return newChild;
|
jtulach@678
|
8845 |
},
|
jtulach@678
|
8846 |
insertBefore : function(newChild, refChild) {
|
jtulach@678
|
8847 |
newChild = HTMLElement.prototype.insertBefore.apply(this,[newChild]);
|
jtulach@678
|
8848 |
//TODO: evaluate scripts which are appended to the head
|
jtulach@678
|
8849 |
//__evalScript__(newChild);
|
jtulach@678
|
8850 |
return newChild;
|
jtulach@678
|
8851 |
},
|
jtulach@678
|
8852 |
toString: function(){
|
jtulach@678
|
8853 |
return '[object HTMLHeadElement]';
|
jtulach@678
|
8854 |
}
|
jtulach@678
|
8855 |
});
|
jtulach@678
|
8856 |
|
jtulach@678
|
8857 |
|
jtulach@678
|
8858 |
/*
|
jtulach@678
|
8859 |
* HTMLHRElement
|
jtulach@678
|
8860 |
* HTML5: 4.5.2 The hr Element
|
jtulach@678
|
8861 |
* http://dev.w3.org/html5/spec/Overview.html#the-hr-element
|
jtulach@678
|
8862 |
*/
|
jtulach@678
|
8863 |
HTMLHRElement = function(ownerDocument) {
|
jtulach@678
|
8864 |
HTMLElement.apply(this, arguments);
|
jtulach@678
|
8865 |
};
|
jtulach@678
|
8866 |
|
jtulach@678
|
8867 |
HTMLHRElement.prototype = new HTMLElement();
|
jtulach@678
|
8868 |
__extend__(HTMLHRElement.prototype, {
|
jtulach@678
|
8869 |
|
jtulach@678
|
8870 |
// no additional properties or elements
|
jtulach@678
|
8871 |
|
jtulach@678
|
8872 |
toString: function() {
|
jtulach@678
|
8873 |
return '[object HTMLHRElement]';
|
jtulach@678
|
8874 |
}
|
jtulach@678
|
8875 |
});
|
jtulach@678
|
8876 |
|
jtulach@678
|
8877 |
|
jtulach@678
|
8878 |
/*
|
jtulach@678
|
8879 |
* HTMLHtmlElement
|
jtulach@678
|
8880 |
* HTML5: 4.1.1 The Html Element
|
jtulach@678
|
8881 |
* http://dev.w3.org/html5/spec/Overview.html#htmlhtmlelement
|
jtulach@678
|
8882 |
*/
|
jtulach@678
|
8883 |
HTMLHtmlElement = function(ownerDocument) {
|
jtulach@678
|
8884 |
HTMLElement.apply(this, arguments);
|
jtulach@678
|
8885 |
};
|
jtulach@678
|
8886 |
|
jtulach@678
|
8887 |
HTMLHtmlElement.prototype = new HTMLElement();
|
jtulach@678
|
8888 |
__extend__(HTMLHtmlElement.prototype, {
|
jtulach@678
|
8889 |
|
jtulach@678
|
8890 |
// no additional properties or elements
|
jtulach@678
|
8891 |
|
jtulach@678
|
8892 |
toString: function() {
|
jtulach@678
|
8893 |
return '[object HTMLHtmlElement]';
|
jtulach@678
|
8894 |
}
|
jtulach@678
|
8895 |
});
|
jtulach@678
|
8896 |
|
jtulach@678
|
8897 |
|
jtulach@678
|
8898 |
/*
|
jtulach@678
|
8899 |
* HTMLIFrameElement - DOM Level 2
|
jtulach@678
|
8900 |
*
|
jtulach@678
|
8901 |
* HTML5: 4.8.3 The iframe element
|
jtulach@678
|
8902 |
* http://dev.w3.org/html5/spec/Overview.html#the-iframe-element
|
jtulach@678
|
8903 |
*/
|
jtulach@678
|
8904 |
HTMLIFrameElement = function(ownerDocument) {
|
jtulach@678
|
8905 |
HTMLFrameElement.apply(this, arguments);
|
jtulach@678
|
8906 |
};
|
jtulach@678
|
8907 |
HTMLIFrameElement.prototype = new HTMLFrameElement();
|
jtulach@678
|
8908 |
__extend__(HTMLIFrameElement.prototype, {
|
jtulach@678
|
8909 |
get height() {
|
jtulach@678
|
8910 |
return this.getAttribute("height") || "";
|
jtulach@678
|
8911 |
},
|
jtulach@678
|
8912 |
set height(val) {
|
jtulach@678
|
8913 |
return this.setAttribute("height",val);
|
jtulach@678
|
8914 |
},
|
jtulach@678
|
8915 |
get width() {
|
jtulach@678
|
8916 |
return this.getAttribute("width") || "";
|
jtulach@678
|
8917 |
},
|
jtulach@678
|
8918 |
set width(val) {
|
jtulach@678
|
8919 |
return this.setAttribute("width",val);
|
jtulach@678
|
8920 |
},
|
jtulach@678
|
8921 |
toString: function(){
|
jtulach@678
|
8922 |
return '[object HTMLIFrameElement]';
|
jtulach@678
|
8923 |
}
|
jtulach@678
|
8924 |
});
|
jtulach@678
|
8925 |
|
jtulach@678
|
8926 |
/**
|
jtulach@678
|
8927 |
* HTMLImageElement and Image
|
jtulach@678
|
8928 |
*/
|
jtulach@678
|
8929 |
|
jtulach@678
|
8930 |
|
jtulach@678
|
8931 |
HTMLImageElement = function(ownerDocument) {
|
jtulach@678
|
8932 |
HTMLElement.apply(this, arguments);
|
jtulach@678
|
8933 |
};
|
jtulach@678
|
8934 |
HTMLImageElement.prototype = new HTMLElement();
|
jtulach@678
|
8935 |
__extend__(HTMLImageElement.prototype, {
|
jtulach@678
|
8936 |
get alt(){
|
jtulach@678
|
8937 |
return this.getAttribute('alt');
|
jtulach@678
|
8938 |
},
|
jtulach@678
|
8939 |
set alt(value){
|
jtulach@678
|
8940 |
this.setAttribute('alt', value);
|
jtulach@678
|
8941 |
},
|
jtulach@678
|
8942 |
get height(){
|
jtulach@678
|
8943 |
return parseInt(this.getAttribute('height'), 10) || 0;
|
jtulach@678
|
8944 |
},
|
jtulach@678
|
8945 |
set height(value){
|
jtulach@678
|
8946 |
this.setAttribute('height', value);
|
jtulach@678
|
8947 |
},
|
jtulach@678
|
8948 |
get isMap(){
|
jtulach@678
|
8949 |
return this.hasAttribute('map');
|
jtulach@678
|
8950 |
},
|
jtulach@678
|
8951 |
set useMap(value){
|
jtulach@678
|
8952 |
this.setAttribute('map', value);
|
jtulach@678
|
8953 |
},
|
jtulach@678
|
8954 |
get longDesc(){
|
jtulach@678
|
8955 |
return this.getAttribute('longdesc');
|
jtulach@678
|
8956 |
},
|
jtulach@678
|
8957 |
set longDesc(value){
|
jtulach@678
|
8958 |
this.setAttribute('longdesc', value);
|
jtulach@678
|
8959 |
},
|
jtulach@678
|
8960 |
get name(){
|
jtulach@678
|
8961 |
return this.getAttribute('name');
|
jtulach@678
|
8962 |
},
|
jtulach@678
|
8963 |
set name(value){
|
jtulach@678
|
8964 |
this.setAttribute('name', value);
|
jtulach@678
|
8965 |
},
|
jtulach@678
|
8966 |
get src(){
|
jtulach@678
|
8967 |
return this.getAttribute('src') || '';
|
jtulach@678
|
8968 |
},
|
jtulach@678
|
8969 |
set src(value){
|
jtulach@678
|
8970 |
this.setAttribute('src', value);
|
jtulach@678
|
8971 |
},
|
jtulach@678
|
8972 |
get width(){
|
jtulach@678
|
8973 |
return parseInt(this.getAttribute('width'), 10) || 0;
|
jtulach@678
|
8974 |
},
|
jtulach@678
|
8975 |
set width(value){
|
jtulach@678
|
8976 |
this.setAttribute('width', value);
|
jtulach@678
|
8977 |
},
|
jtulach@678
|
8978 |
toString: function(){
|
jtulach@678
|
8979 |
return '[object HTMLImageElement]';
|
jtulach@678
|
8980 |
}
|
jtulach@678
|
8981 |
});
|
jtulach@678
|
8982 |
|
jtulach@678
|
8983 |
/*
|
jtulach@678
|
8984 |
* html5 4.8.1
|
jtulach@678
|
8985 |
* http://dev.w3.org/html5/spec/Overview.html#the-img-element
|
jtulach@678
|
8986 |
*/
|
jtulach@678
|
8987 |
Image = function(width, height) {
|
jtulach@678
|
8988 |
// Not sure if "[global].document" satifies this requirement:
|
jtulach@678
|
8989 |
// "The element's document must be the active document of the
|
jtulach@678
|
8990 |
// browsing context of the Window object on which the interface
|
jtulach@678
|
8991 |
// object of the invoked constructor is found."
|
jtulach@678
|
8992 |
|
jtulach@678
|
8993 |
HTMLElement.apply(this, [document]);
|
jtulach@678
|
8994 |
// Note: firefox will throw an error if the width/height
|
jtulach@678
|
8995 |
// is not an integer. Safari just converts to 0 on error.
|
jtulach@678
|
8996 |
this.width = parseInt(width, 10) || 0;
|
jtulach@678
|
8997 |
this.height = parseInt(height, 10) || 0;
|
jtulach@678
|
8998 |
this.nodeName = 'IMG';
|
jtulach@678
|
8999 |
};
|
jtulach@678
|
9000 |
Image.prototype = new HTMLImageElement();
|
jtulach@678
|
9001 |
|
jtulach@678
|
9002 |
|
jtulach@678
|
9003 |
/*
|
jtulach@678
|
9004 |
* Image.src attribute events.
|
jtulach@678
|
9005 |
*
|
jtulach@678
|
9006 |
* Not sure where this should live... in events/img.js? in parser/img.js?
|
jtulach@678
|
9007 |
* Split out to make it easy to move.
|
jtulach@678
|
9008 |
*/
|
jtulach@678
|
9009 |
|
jtulach@678
|
9010 |
/**
|
jtulach@678
|
9011 |
* HTMLImageElement && Image are a bit odd in that the 'src' attribute
|
jtulach@678
|
9012 |
* is 'active' -- changing it triggers loading of the image from the
|
jtulach@678
|
9013 |
* network.
|
jtulach@678
|
9014 |
*
|
jtulach@678
|
9015 |
* This can occur by
|
jtulach@678
|
9016 |
* - Directly setting the Image.src =
|
jtulach@678
|
9017 |
* - Using one of the Element.setAttributeXXX methods
|
jtulach@678
|
9018 |
* - Node.importNode an image
|
jtulach@678
|
9019 |
* - The initial creation and parsing of an <img> tag
|
jtulach@678
|
9020 |
*
|
jtulach@678
|
9021 |
* __onImageRequest__ is a function that handles eventing
|
jtulach@678
|
9022 |
* and dispatches to a user-callback.
|
jtulach@678
|
9023 |
*
|
jtulach@678
|
9024 |
*/
|
jtulach@678
|
9025 |
__loadImage__ = function(node, value) {
|
jtulach@678
|
9026 |
var event;
|
jtulach@678
|
9027 |
if (value && (!Envjs.loadImage ||
|
jtulach@678
|
9028 |
(Envjs.loadImage &&
|
jtulach@678
|
9029 |
Envjs.loadImage(node, value)))) {
|
jtulach@678
|
9030 |
// value has to be something (easy)
|
jtulach@678
|
9031 |
// if the user-land API doesn't exist
|
jtulach@678
|
9032 |
// Or if the API exists and it returns true, then ok:
|
jtulach@678
|
9033 |
event = document.createEvent('Events');
|
jtulach@678
|
9034 |
event.initEvent('load');
|
jtulach@678
|
9035 |
} else {
|
jtulach@678
|
9036 |
// oops
|
jtulach@678
|
9037 |
event = document.createEvent('Events');
|
jtulach@678
|
9038 |
event.initEvent('error');
|
jtulach@678
|
9039 |
}
|
jtulach@678
|
9040 |
node.dispatchEvent(event, false);
|
jtulach@678
|
9041 |
};
|
jtulach@678
|
9042 |
|
jtulach@678
|
9043 |
__extend__(HTMLImageElement.prototype, {
|
jtulach@678
|
9044 |
onload: function(event){
|
jtulach@678
|
9045 |
__eval__(this.getAttribute('onload') || '', this);
|
jtulach@678
|
9046 |
}
|
jtulach@678
|
9047 |
});
|
jtulach@678
|
9048 |
|
jtulach@678
|
9049 |
|
jtulach@678
|
9050 |
/*
|
jtulach@678
|
9051 |
* Image Loading
|
jtulach@678
|
9052 |
*
|
jtulach@678
|
9053 |
* The difference between "owner.parsing" and "owner.fragment"
|
jtulach@678
|
9054 |
*
|
jtulach@678
|
9055 |
* If owner.parsing === true, then during the html5 parsing then,
|
jtulach@678
|
9056 |
* __elementPopped__ is called when a compete tag (with attrs and
|
jtulach@678
|
9057 |
* children) is full parsed and added the DOM.
|
jtulach@678
|
9058 |
*
|
jtulach@678
|
9059 |
* For images, __elementPopped__ is called with everything the
|
jtulach@678
|
9060 |
* tag has. which in turn looks for a "src" attr and calls
|
jtulach@678
|
9061 |
* __loadImage__
|
jtulach@678
|
9062 |
*
|
jtulach@678
|
9063 |
* If owner.parser === false (or non-existant), then we are not in
|
jtulach@678
|
9064 |
* a parsing step. For images, perhaps someone directly modified
|
jtulach@678
|
9065 |
* a 'src' attribute of an existing image.
|
jtulach@678
|
9066 |
*
|
jtulach@678
|
9067 |
* 'innerHTML' is tricky since we first create a "fake document",
|
jtulach@678
|
9068 |
* parse it, then import the right parts. This may call
|
jtulach@678
|
9069 |
* img.setAttributeNS twice. once during the parse and once
|
jtulach@678
|
9070 |
* during the clone of the node. We want event to trigger on the
|
jtulach@678
|
9071 |
* later and not during th fake doco. "owner.fragment" is set by
|
jtulach@678
|
9072 |
* the fake doco parser to indicate that events should not be
|
jtulach@678
|
9073 |
* triggered on this.
|
jtulach@678
|
9074 |
*
|
jtulach@678
|
9075 |
* We coud make 'owner.parser' == [ 'none', 'full', 'fragment']
|
jtulach@678
|
9076 |
* and just use one variable That was not done since the patch is
|
jtulach@678
|
9077 |
* quite large as is.
|
jtulach@678
|
9078 |
*
|
jtulach@678
|
9079 |
* This same problem occurs with scripts. innerHTML oddly does
|
jtulach@678
|
9080 |
* not eval any <script> tags inside.
|
jtulach@678
|
9081 |
*/
|
jtulach@678
|
9082 |
HTMLElement.registerSetAttribute('IMG', 'src', function(node, value) {
|
jtulach@678
|
9083 |
var owner = node.ownerDocument;
|
jtulach@678
|
9084 |
if (!owner.parsing && !owner.fragment) {
|
jtulach@678
|
9085 |
__loadImage__(node, value);
|
jtulach@678
|
9086 |
}
|
jtulach@678
|
9087 |
});
|
jtulach@678
|
9088 |
/**
|
jtulach@678
|
9089 |
* HTMLInputElement
|
jtulach@678
|
9090 |
*
|
jtulach@678
|
9091 |
* HTML5: 4.10.5 The input element
|
jtulach@678
|
9092 |
* http://dev.w3.org/html5/spec/Overview.html#the-input-element
|
jtulach@678
|
9093 |
*/
|
jtulach@678
|
9094 |
HTMLInputElement = function(ownerDocument) {
|
jtulach@678
|
9095 |
HTMLInputAreaCommon.apply(this, arguments);
|
jtulach@678
|
9096 |
this._dirty = false;
|
jtulach@678
|
9097 |
this._checked = null;
|
jtulach@678
|
9098 |
this._value = null;
|
jtulach@678
|
9099 |
};
|
jtulach@678
|
9100 |
HTMLInputElement.prototype = new HTMLInputAreaCommon();
|
jtulach@678
|
9101 |
__extend__(HTMLInputElement.prototype, {
|
jtulach@678
|
9102 |
get alt(){
|
jtulach@678
|
9103 |
return this.getAttribute('alt') || '';
|
jtulach@678
|
9104 |
},
|
jtulach@678
|
9105 |
set alt(value){
|
jtulach@678
|
9106 |
this.setAttribute('alt', value);
|
jtulach@678
|
9107 |
},
|
jtulach@678
|
9108 |
|
jtulach@678
|
9109 |
/**
|
jtulach@678
|
9110 |
* 'checked' returns state, NOT the value of the attribute
|
jtulach@678
|
9111 |
*/
|
jtulach@678
|
9112 |
get checked(){
|
jtulach@678
|
9113 |
if (this._checked === null) {
|
jtulach@678
|
9114 |
this._checked = this.defaultChecked;
|
jtulach@678
|
9115 |
}
|
jtulach@678
|
9116 |
return this._checked;
|
jtulach@678
|
9117 |
},
|
jtulach@678
|
9118 |
set checked(value){
|
jtulach@678
|
9119 |
// force to boolean value
|
jtulach@678
|
9120 |
this._checked = (value) ? true : false;
|
jtulach@678
|
9121 |
},
|
jtulach@678
|
9122 |
|
jtulach@678
|
9123 |
/**
|
jtulach@678
|
9124 |
* 'defaultChecked' actually reflects if the 'checked' attribute
|
jtulach@678
|
9125 |
* is present or not
|
jtulach@678
|
9126 |
*/
|
jtulach@678
|
9127 |
get defaultChecked(){
|
jtulach@678
|
9128 |
return this.hasAttribute('checked');
|
jtulach@678
|
9129 |
},
|
jtulach@678
|
9130 |
set defaultChecked(val){
|
jtulach@678
|
9131 |
if (val) {
|
jtulach@678
|
9132 |
this.setAttribute('checked', '');
|
jtulach@678
|
9133 |
} else {
|
jtulach@678
|
9134 |
if (this.defaultChecked) {
|
jtulach@678
|
9135 |
this.removeAttribute('checked');
|
jtulach@678
|
9136 |
}
|
jtulach@678
|
9137 |
}
|
jtulach@678
|
9138 |
},
|
jtulach@678
|
9139 |
get defaultValue() {
|
jtulach@678
|
9140 |
return this.getAttribute('value') || '';
|
jtulach@678
|
9141 |
},
|
jtulach@678
|
9142 |
set defaultValue(value) {
|
jtulach@678
|
9143 |
this._dirty = true;
|
jtulach@678
|
9144 |
this.setAttribute('value', value);
|
jtulach@678
|
9145 |
},
|
jtulach@678
|
9146 |
get value() {
|
jtulach@678
|
9147 |
return (this._value === null) ? this.defaultValue : this._value;
|
jtulach@678
|
9148 |
},
|
jtulach@678
|
9149 |
set value(newvalue) {
|
jtulach@678
|
9150 |
this._value = newvalue;
|
jtulach@678
|
9151 |
},
|
jtulach@678
|
9152 |
/**
|
jtulach@678
|
9153 |
* Height is a string
|
jtulach@678
|
9154 |
*/
|
jtulach@678
|
9155 |
get height(){
|
jtulach@678
|
9156 |
// spec says it is a string
|
jtulach@678
|
9157 |
return this.getAttribute('height') || '';
|
jtulach@678
|
9158 |
},
|
jtulach@678
|
9159 |
set height(value){
|
jtulach@678
|
9160 |
this.setAttribute('height',value);
|
jtulach@678
|
9161 |
},
|
jtulach@678
|
9162 |
|
jtulach@678
|
9163 |
/**
|
jtulach@678
|
9164 |
* MaxLength is a number
|
jtulach@678
|
9165 |
*/
|
jtulach@678
|
9166 |
get maxLength(){
|
jtulach@678
|
9167 |
return Number(this.getAttribute('maxlength')||'-1');
|
jtulach@678
|
9168 |
},
|
jtulach@678
|
9169 |
set maxLength(value){
|
jtulach@678
|
9170 |
this.setAttribute('maxlength', value);
|
jtulach@678
|
9171 |
},
|
jtulach@678
|
9172 |
|
jtulach@678
|
9173 |
/**
|
jtulach@678
|
9174 |
* Src is a URL string
|
jtulach@678
|
9175 |
*/
|
jtulach@678
|
9176 |
get src(){
|
jtulach@678
|
9177 |
return this.getAttribute('src') || '';
|
jtulach@678
|
9178 |
},
|
jtulach@678
|
9179 |
set src(value){
|
jtulach@678
|
9180 |
// TODO: make absolute any relative URLS
|
jtulach@678
|
9181 |
this.setAttribute('src', value);
|
jtulach@678
|
9182 |
},
|
jtulach@678
|
9183 |
|
jtulach@678
|
9184 |
get type() {
|
jtulach@678
|
9185 |
return this.getAttribute('type') || 'text';
|
jtulach@678
|
9186 |
},
|
jtulach@678
|
9187 |
set type(value) {
|
jtulach@678
|
9188 |
this.setAttribute('type', value);
|
jtulach@678
|
9189 |
},
|
jtulach@678
|
9190 |
|
jtulach@678
|
9191 |
get useMap(){
|
jtulach@678
|
9192 |
return this.getAttribute('map') || '';
|
jtulach@678
|
9193 |
},
|
jtulach@678
|
9194 |
|
jtulach@678
|
9195 |
/**
|
jtulach@678
|
9196 |
* Width: spec says it is a string
|
jtulach@678
|
9197 |
*/
|
jtulach@678
|
9198 |
get width(){
|
jtulach@678
|
9199 |
return this.getAttribute('width') || '';
|
jtulach@678
|
9200 |
},
|
jtulach@678
|
9201 |
set width(value){
|
jtulach@678
|
9202 |
this.setAttribute('width',value);
|
jtulach@678
|
9203 |
},
|
jtulach@678
|
9204 |
click:function(){
|
jtulach@678
|
9205 |
__click__(this);
|
jtulach@678
|
9206 |
},
|
jtulach@678
|
9207 |
toString: function() {
|
jtulach@678
|
9208 |
return '[object HTMLInputElement]';
|
jtulach@678
|
9209 |
}
|
jtulach@678
|
9210 |
});
|
jtulach@678
|
9211 |
|
jtulach@678
|
9212 |
//http://dev.w3.org/html5/spec/Overview.html#dom-input-value
|
jtulach@678
|
9213 |
// if someone directly modifies the value attribute, then the input's value
|
jtulach@678
|
9214 |
// also directly changes.
|
jtulach@678
|
9215 |
HTMLElement.registerSetAttribute('INPUT', 'value', function(node, value) {
|
jtulach@678
|
9216 |
if (!node._dirty) {
|
jtulach@678
|
9217 |
node._value = value;
|
jtulach@678
|
9218 |
node._dirty = true;
|
jtulach@678
|
9219 |
}
|
jtulach@678
|
9220 |
});
|
jtulach@678
|
9221 |
|
jtulach@678
|
9222 |
/*
|
jtulach@678
|
9223 |
*The checked content attribute is a boolean attribute that gives the
|
jtulach@678
|
9224 |
*default checkedness of the input element. When the checked content
|
jtulach@678
|
9225 |
*attribute is added, if the control does not have dirty checkedness,
|
jtulach@678
|
9226 |
*the user agent must set the checkedness of the element to true; when
|
jtulach@678
|
9227 |
*the checked content attribute is removed, if the control does not
|
jtulach@678
|
9228 |
*have dirty checkedness, the user agent must set the checkedness of
|
jtulach@678
|
9229 |
*the element to false.
|
jtulach@678
|
9230 |
*/
|
jtulach@678
|
9231 |
// Named Element Support
|
jtulach@678
|
9232 |
HTMLElement.registerSetAttribute('INPUT', 'name',
|
jtulach@678
|
9233 |
__updateFormForNamedElement__);
|
jtulach@678
|
9234 |
|
jtulach@678
|
9235 |
/**
|
jtulach@678
|
9236 |
* HTMLLabelElement - DOM Level 2
|
jtulach@678
|
9237 |
* HTML5 4.10.4 The label element
|
jtulach@678
|
9238 |
* http://dev.w3.org/html5/spec/Overview.html#the-label-element
|
jtulach@678
|
9239 |
*/
|
jtulach@678
|
9240 |
HTMLLabelElement = function(ownerDocument) {
|
jtulach@678
|
9241 |
HTMLInputCommon.apply(this, arguments);
|
jtulach@678
|
9242 |
};
|
jtulach@678
|
9243 |
HTMLLabelElement.prototype = new HTMLInputCommon();
|
jtulach@678
|
9244 |
__extend__(HTMLLabelElement.prototype, inputElements_dataProperties);
|
jtulach@678
|
9245 |
__extend__(HTMLLabelElement.prototype, {
|
jtulach@678
|
9246 |
get htmlFor() {
|
jtulach@678
|
9247 |
return this.getAttribute('for');
|
jtulach@678
|
9248 |
},
|
jtulach@678
|
9249 |
set htmlFor(value) {
|
jtulach@678
|
9250 |
this.setAttribute('for',value);
|
jtulach@678
|
9251 |
},
|
jtulach@678
|
9252 |
get dataFormatAs() {
|
jtulach@678
|
9253 |
return this.getAttribute('dataFormatAs');
|
jtulach@678
|
9254 |
},
|
jtulach@678
|
9255 |
set dataFormatAs(value) {
|
jtulach@678
|
9256 |
this.setAttribute('dataFormatAs',value);
|
jtulach@678
|
9257 |
},
|
jtulach@678
|
9258 |
toString: function() {
|
jtulach@678
|
9259 |
return '[object HTMLLabelElement]';
|
jtulach@678
|
9260 |
}
|
jtulach@678
|
9261 |
});
|
jtulach@678
|
9262 |
|
jtulach@678
|
9263 |
/*
|
jtulach@678
|
9264 |
* HTMLLIElement
|
jtulach@678
|
9265 |
* HTML5: 4.5.8 The li Element
|
jtulach@678
|
9266 |
* http://dev.w3.org/html5/spec/Overview.html#the-li-element
|
jtulach@678
|
9267 |
*/
|
jtulach@678
|
9268 |
HTMLLIElement = function(ownerDocument) {
|
jtulach@678
|
9269 |
HTMLElement.apply(this, arguments);
|
jtulach@678
|
9270 |
};
|
jtulach@678
|
9271 |
|
jtulach@678
|
9272 |
HTMLLIElement.prototype = new HTMLElement();
|
jtulach@678
|
9273 |
__extend__(HTMLLIElement.prototype, {
|
jtulach@678
|
9274 |
|
jtulach@678
|
9275 |
// TODO: attribute long value;
|
jtulach@678
|
9276 |
|
jtulach@678
|
9277 |
toString: function() {
|
jtulach@678
|
9278 |
return '[object HTMLLIElement]';
|
jtulach@678
|
9279 |
}
|
jtulach@678
|
9280 |
});
|
jtulach@678
|
9281 |
|
jtulach@678
|
9282 |
|
jtulach@678
|
9283 |
/*
|
jtulach@678
|
9284 |
* HTMLLinkElement - DOM Level 2
|
jtulach@678
|
9285 |
*
|
jtulach@678
|
9286 |
* HTML5: 4.8.12 The map element
|
jtulach@678
|
9287 |
* http://dev.w3.org/html5/spec/Overview.html#the-map-element
|
jtulach@678
|
9288 |
*/
|
jtulach@678
|
9289 |
HTMLLinkElement = function(ownerDocument) {
|
jtulach@678
|
9290 |
HTMLElement.apply(this, arguments);
|
jtulach@678
|
9291 |
};
|
jtulach@678
|
9292 |
HTMLLinkElement.prototype = new HTMLElement();
|
jtulach@678
|
9293 |
__extend__(HTMLLinkElement.prototype, {
|
jtulach@678
|
9294 |
get disabled(){
|
jtulach@678
|
9295 |
return this.getAttribute('disabled');
|
jtulach@678
|
9296 |
},
|
jtulach@678
|
9297 |
set disabled(value){
|
jtulach@678
|
9298 |
this.setAttribute('disabled',value);
|
jtulach@678
|
9299 |
},
|
jtulach@678
|
9300 |
get charset(){
|
jtulach@678
|
9301 |
return this.getAttribute('charset');
|
jtulach@678
|
9302 |
},
|
jtulach@678
|
9303 |
set charset(value){
|
jtulach@678
|
9304 |
this.setAttribute('charset',value);
|
jtulach@678
|
9305 |
},
|
jtulach@678
|
9306 |
get href(){
|
jtulach@678
|
9307 |
return this.getAttribute('href');
|
jtulach@678
|
9308 |
},
|
jtulach@678
|
9309 |
set href(value){
|
jtulach@678
|
9310 |
this.setAttribute('href',value);
|
jtulach@678
|
9311 |
},
|
jtulach@678
|
9312 |
get hreflang(){
|
jtulach@678
|
9313 |
return this.getAttribute('hreflang');
|
jtulach@678
|
9314 |
},
|
jtulach@678
|
9315 |
set hreflang(value){
|
jtulach@678
|
9316 |
this.setAttribute('hreflang',value);
|
jtulach@678
|
9317 |
},
|
jtulach@678
|
9318 |
get media(){
|
jtulach@678
|
9319 |
return this.getAttribute('media');
|
jtulach@678
|
9320 |
},
|
jtulach@678
|
9321 |
set media(value){
|
jtulach@678
|
9322 |
this.setAttribute('media',value);
|
jtulach@678
|
9323 |
},
|
jtulach@678
|
9324 |
get rel(){
|
jtulach@678
|
9325 |
return this.getAttribute('rel');
|
jtulach@678
|
9326 |
},
|
jtulach@678
|
9327 |
set rel(value){
|
jtulach@678
|
9328 |
this.setAttribute('rel',value);
|
jtulach@678
|
9329 |
},
|
jtulach@678
|
9330 |
get rev(){
|
jtulach@678
|
9331 |
return this.getAttribute('rev');
|
jtulach@678
|
9332 |
},
|
jtulach@678
|
9333 |
set rev(value){
|
jtulach@678
|
9334 |
this.setAttribute('rev',value);
|
jtulach@678
|
9335 |
},
|
jtulach@678
|
9336 |
get target(){
|
jtulach@678
|
9337 |
return this.getAttribute('target');
|
jtulach@678
|
9338 |
},
|
jtulach@678
|
9339 |
set target(value){
|
jtulach@678
|
9340 |
this.setAttribute('target',value);
|
jtulach@678
|
9341 |
},
|
jtulach@678
|
9342 |
get type(){
|
jtulach@678
|
9343 |
return this.getAttribute('type');
|
jtulach@678
|
9344 |
},
|
jtulach@678
|
9345 |
set type(value){
|
jtulach@678
|
9346 |
this.setAttribute('type',value);
|
jtulach@678
|
9347 |
},
|
jtulach@678
|
9348 |
toString: function() {
|
jtulach@678
|
9349 |
return '[object HTMLLinkElement]';
|
jtulach@678
|
9350 |
}
|
jtulach@678
|
9351 |
});
|
jtulach@678
|
9352 |
|
jtulach@678
|
9353 |
__loadLink__ = function(node, value) {
|
jtulach@678
|
9354 |
var event;
|
jtulach@678
|
9355 |
var owner = node.ownerDocument;
|
jtulach@678
|
9356 |
|
jtulach@678
|
9357 |
if (owner.fragment) {
|
jtulach@678
|
9358 |
/**
|
jtulach@678
|
9359 |
* if we are in an innerHTML fragment parsing step
|
jtulach@678
|
9360 |
* then ignore. It will be handled once the fragment is
|
jtulach@678
|
9361 |
* added to the real doco
|
jtulach@678
|
9362 |
*/
|
jtulach@678
|
9363 |
return;
|
jtulach@678
|
9364 |
}
|
jtulach@678
|
9365 |
|
jtulach@678
|
9366 |
if (node.parentNode === null) {
|
jtulach@678
|
9367 |
/*
|
jtulach@678
|
9368 |
* if a <link> is parentless (normally by create a new link
|
jtulach@678
|
9369 |
* via document.createElement('link'), then do *not* fire an
|
jtulach@678
|
9370 |
* event, even if it has a valid 'href' attribute.
|
jtulach@678
|
9371 |
*/
|
jtulach@678
|
9372 |
return;
|
jtulach@678
|
9373 |
}
|
jtulach@678
|
9374 |
if (value != '' && (!Envjs.loadLink ||
|
jtulach@678
|
9375 |
(Envjs.loadLink &&
|
jtulach@678
|
9376 |
Envjs.loadLink(node, value)))) {
|
jtulach@678
|
9377 |
// value has to be something (easy)
|
jtulach@678
|
9378 |
// if the user-land API doesn't exist
|
jtulach@678
|
9379 |
// Or if the API exists and it returns true, then ok:
|
jtulach@678
|
9380 |
event = document.createEvent('Events');
|
jtulach@678
|
9381 |
event.initEvent('load');
|
jtulach@678
|
9382 |
} else {
|
jtulach@678
|
9383 |
// oops
|
jtulach@678
|
9384 |
event = document.createEvent('Events');
|
jtulach@678
|
9385 |
event.initEvent('error');
|
jtulach@678
|
9386 |
}
|
jtulach@678
|
9387 |
node.dispatchEvent(event, false);
|
jtulach@678
|
9388 |
};
|
jtulach@678
|
9389 |
|
jtulach@678
|
9390 |
|
jtulach@678
|
9391 |
HTMLElement.registerSetAttribute('LINK', 'href', function(node, value) {
|
jtulach@678
|
9392 |
__loadLink__(node, value);
|
jtulach@678
|
9393 |
});
|
jtulach@678
|
9394 |
|
jtulach@678
|
9395 |
/**
|
jtulach@678
|
9396 |
* Event stuff, not sure where it goes
|
jtulach@678
|
9397 |
*/
|
jtulach@678
|
9398 |
__extend__(HTMLLinkElement.prototype, {
|
jtulach@678
|
9399 |
onload: function(event){
|
jtulach@678
|
9400 |
__eval__(this.getAttribute('onload')||'', this);
|
jtulach@678
|
9401 |
},
|
jtulach@678
|
9402 |
});
|
jtulach@678
|
9403 |
|
jtulach@678
|
9404 |
/**
|
jtulach@678
|
9405 |
* HTMLMapElement
|
jtulach@678
|
9406 |
*
|
jtulach@678
|
9407 |
* 4.8.12 The map element
|
jtulach@678
|
9408 |
* http://dev.w3.org/html5/spec/Overview.html#the-map-element
|
jtulach@678
|
9409 |
*/
|
jtulach@678
|
9410 |
HTMLMapElement = function(ownerDocument) {
|
jtulach@678
|
9411 |
HTMLElement.apply(this, arguments);
|
jtulach@678
|
9412 |
};
|
jtulach@678
|
9413 |
HTMLMapElement.prototype = new HTMLElement();
|
jtulach@678
|
9414 |
__extend__(HTMLMapElement.prototype, {
|
jtulach@678
|
9415 |
get areas(){
|
jtulach@678
|
9416 |
return this.getElementsByTagName('area');
|
jtulach@678
|
9417 |
},
|
jtulach@678
|
9418 |
get name(){
|
jtulach@678
|
9419 |
return this.getAttribute('name') || '';
|
jtulach@678
|
9420 |
},
|
jtulach@678
|
9421 |
set name(value){
|
jtulach@678
|
9422 |
this.setAttribute('name',value);
|
jtulach@678
|
9423 |
},
|
jtulach@678
|
9424 |
toString: function() {
|
jtulach@678
|
9425 |
return '[object HTMLMapElement]';
|
jtulach@678
|
9426 |
}
|
jtulach@678
|
9427 |
});
|
jtulach@678
|
9428 |
|
jtulach@678
|
9429 |
/**
|
jtulach@678
|
9430 |
* HTMLMetaElement - DOM Level 2
|
jtulach@678
|
9431 |
* HTML5: 4.2.5 The meta element
|
jtulach@678
|
9432 |
* http://dev.w3.org/html5/spec/Overview.html#meta
|
jtulach@678
|
9433 |
*/
|
jtulach@678
|
9434 |
HTMLMetaElement = function(ownerDocument) {
|
jtulach@678
|
9435 |
HTMLElement.apply(this, arguments);
|
jtulach@678
|
9436 |
};
|
jtulach@678
|
9437 |
HTMLMetaElement.prototype = new HTMLElement();
|
jtulach@678
|
9438 |
__extend__(HTMLMetaElement.prototype, {
|
jtulach@678
|
9439 |
get content() {
|
jtulach@678
|
9440 |
return this.getAttribute('content') || '';
|
jtulach@678
|
9441 |
},
|
jtulach@678
|
9442 |
set content(value){
|
jtulach@678
|
9443 |
this.setAttribute('content',value);
|
jtulach@678
|
9444 |
},
|
jtulach@678
|
9445 |
get httpEquiv(){
|
jtulach@678
|
9446 |
return this.getAttribute('http-equiv') || '';
|
jtulach@678
|
9447 |
},
|
jtulach@678
|
9448 |
set httpEquiv(value){
|
jtulach@678
|
9449 |
this.setAttribute('http-equiv',value);
|
jtulach@678
|
9450 |
},
|
jtulach@678
|
9451 |
get name(){
|
jtulach@678
|
9452 |
return this.getAttribute('name') || '';
|
jtulach@678
|
9453 |
},
|
jtulach@678
|
9454 |
set name(value){
|
jtulach@678
|
9455 |
this.setAttribute('name',value);
|
jtulach@678
|
9456 |
},
|
jtulach@678
|
9457 |
get scheme(){
|
jtulach@678
|
9458 |
return this.getAttribute('scheme');
|
jtulach@678
|
9459 |
},
|
jtulach@678
|
9460 |
set scheme(value){
|
jtulach@678
|
9461 |
this.setAttribute('scheme',value);
|
jtulach@678
|
9462 |
},
|
jtulach@678
|
9463 |
toString: function() {
|
jtulach@678
|
9464 |
return '[object HTMLMetaElement]';
|
jtulach@678
|
9465 |
}
|
jtulach@678
|
9466 |
});
|
jtulach@678
|
9467 |
|
jtulach@678
|
9468 |
|
jtulach@678
|
9469 |
/**
|
jtulach@678
|
9470 |
* HTMLObjectElement - DOM Level 2
|
jtulach@678
|
9471 |
* HTML5: 4.8.5 The object element
|
jtulach@678
|
9472 |
* http://dev.w3.org/html5/spec/Overview.html#the-object-element
|
jtulach@678
|
9473 |
*/
|
jtulach@678
|
9474 |
HTMLObjectElement = function(ownerDocument) {
|
jtulach@678
|
9475 |
HTMLElement.apply(this, arguments);
|
jtulach@678
|
9476 |
};
|
jtulach@678
|
9477 |
HTMLObjectElement.prototype = new HTMLElement();
|
jtulach@678
|
9478 |
__extend__(HTMLObjectElement.prototype, {
|
jtulach@678
|
9479 |
get code(){
|
jtulach@678
|
9480 |
return this.getAttribute('code');
|
jtulach@678
|
9481 |
},
|
jtulach@678
|
9482 |
set code(value){
|
jtulach@678
|
9483 |
this.setAttribute('code',value);
|
jtulach@678
|
9484 |
},
|
jtulach@678
|
9485 |
get archive(){
|
jtulach@678
|
9486 |
return this.getAttribute('archive');
|
jtulach@678
|
9487 |
},
|
jtulach@678
|
9488 |
set archive(value){
|
jtulach@678
|
9489 |
this.setAttribute('archive',value);
|
jtulach@678
|
9490 |
},
|
jtulach@678
|
9491 |
get codeBase(){
|
jtulach@678
|
9492 |
return this.getAttribute('codebase');
|
jtulach@678
|
9493 |
},
|
jtulach@678
|
9494 |
set codeBase(value){
|
jtulach@678
|
9495 |
this.setAttribute('codebase',value);
|
jtulach@678
|
9496 |
},
|
jtulach@678
|
9497 |
get codeType(){
|
jtulach@678
|
9498 |
return this.getAttribute('codetype');
|
jtulach@678
|
9499 |
},
|
jtulach@678
|
9500 |
set codeType(value){
|
jtulach@678
|
9501 |
this.setAttribute('codetype',value);
|
jtulach@678
|
9502 |
},
|
jtulach@678
|
9503 |
get data(){
|
jtulach@678
|
9504 |
return this.getAttribute('data');
|
jtulach@678
|
9505 |
},
|
jtulach@678
|
9506 |
set data(value){
|
jtulach@678
|
9507 |
this.setAttribute('data',value);
|
jtulach@678
|
9508 |
},
|
jtulach@678
|
9509 |
get declare(){
|
jtulach@678
|
9510 |
return this.getAttribute('declare');
|
jtulach@678
|
9511 |
},
|
jtulach@678
|
9512 |
set declare(value){
|
jtulach@678
|
9513 |
this.setAttribute('declare',value);
|
jtulach@678
|
9514 |
},
|
jtulach@678
|
9515 |
get height(){
|
jtulach@678
|
9516 |
return this.getAttribute('height');
|
jtulach@678
|
9517 |
},
|
jtulach@678
|
9518 |
set height(value){
|
jtulach@678
|
9519 |
this.setAttribute('height',value);
|
jtulach@678
|
9520 |
},
|
jtulach@678
|
9521 |
get standby(){
|
jtulach@678
|
9522 |
return this.getAttribute('standby');
|
jtulach@678
|
9523 |
},
|
jtulach@678
|
9524 |
set standby(value){
|
jtulach@678
|
9525 |
this.setAttribute('standby',value);
|
jtulach@678
|
9526 |
},
|
jtulach@678
|
9527 |
/*get tabIndex(){
|
jtulach@678
|
9528 |
return this.getAttribute('tabindex');
|
jtulach@678
|
9529 |
},
|
jtulach@678
|
9530 |
set tabIndex(value){
|
jtulach@678
|
9531 |
this.setAttribute('tabindex',value);
|
jtulach@678
|
9532 |
},*/
|
jtulach@678
|
9533 |
get type(){
|
jtulach@678
|
9534 |
return this.getAttribute('type');
|
jtulach@678
|
9535 |
},
|
jtulach@678
|
9536 |
set type(value){
|
jtulach@678
|
9537 |
this.setAttribute('type',value);
|
jtulach@678
|
9538 |
},
|
jtulach@678
|
9539 |
get useMap(){
|
jtulach@678
|
9540 |
return this.getAttribute('usemap');
|
jtulach@678
|
9541 |
},
|
jtulach@678
|
9542 |
set useMap(value){
|
jtulach@678
|
9543 |
this.setAttribute('usemap',value);
|
jtulach@678
|
9544 |
},
|
jtulach@678
|
9545 |
get width(){
|
jtulach@678
|
9546 |
return this.getAttribute('width');
|
jtulach@678
|
9547 |
},
|
jtulach@678
|
9548 |
set width(value){
|
jtulach@678
|
9549 |
this.setAttribute('width',value);
|
jtulach@678
|
9550 |
},
|
jtulach@678
|
9551 |
get contentDocument(){
|
jtulach@678
|
9552 |
return this.ownerDocument;
|
jtulach@678
|
9553 |
},
|
jtulach@678
|
9554 |
toString: function() {
|
jtulach@678
|
9555 |
return '[object HTMLObjectElement]';
|
jtulach@678
|
9556 |
}
|
jtulach@678
|
9557 |
});
|
jtulach@678
|
9558 |
|
jtulach@678
|
9559 |
// Named Element Support
|
jtulach@678
|
9560 |
HTMLElement.registerSetAttribute('OBJECT', 'name',
|
jtulach@678
|
9561 |
__updateFormForNamedElement__);
|
jtulach@678
|
9562 |
|
jtulach@678
|
9563 |
/*
|
jtulach@678
|
9564 |
* HTMLOListElement
|
jtulach@678
|
9565 |
* HTML5: 4.5.6 The ol Element
|
jtulach@678
|
9566 |
* http://dev.w3.org/html5/spec/Overview.html#the-ol-element
|
jtulach@678
|
9567 |
*/
|
jtulach@678
|
9568 |
HTMLOListElement = function(ownerDocument) {
|
jtulach@678
|
9569 |
HTMLElement.apply(this, arguments);
|
jtulach@678
|
9570 |
};
|
jtulach@678
|
9571 |
|
jtulach@678
|
9572 |
HTMLOListElement.prototype = new HTMLElement();
|
jtulach@678
|
9573 |
__extend__(HTMLOListElement.prototype, {
|
jtulach@678
|
9574 |
|
jtulach@678
|
9575 |
// TODO: attribute boolean reversed;
|
jtulach@678
|
9576 |
// TODO: attribute long start;
|
jtulach@678
|
9577 |
|
jtulach@678
|
9578 |
toString: function() {
|
jtulach@678
|
9579 |
return '[object HTMLOListElement]';
|
jtulach@678
|
9580 |
}
|
jtulach@678
|
9581 |
});
|
jtulach@678
|
9582 |
|
jtulach@678
|
9583 |
|
jtulach@678
|
9584 |
/**
|
jtulach@678
|
9585 |
* HTMLOptGroupElement - DOM Level 2
|
jtulach@678
|
9586 |
* HTML 5: 4.10.9 The optgroup element
|
jtulach@678
|
9587 |
* http://dev.w3.org/html5/spec/Overview.html#the-optgroup-element
|
jtulach@678
|
9588 |
*/
|
jtulach@678
|
9589 |
HTMLOptGroupElement = function(ownerDocument) {
|
jtulach@678
|
9590 |
HTMLElement.apply(this, arguments);
|
jtulach@678
|
9591 |
};
|
jtulach@678
|
9592 |
HTMLOptGroupElement.prototype = new HTMLElement();
|
jtulach@678
|
9593 |
__extend__(HTMLOptGroupElement.prototype, {
|
jtulach@678
|
9594 |
get disabled(){
|
jtulach@678
|
9595 |
return this.getAttribute('disabled');
|
jtulach@678
|
9596 |
},
|
jtulach@678
|
9597 |
set disabled(value){
|
jtulach@678
|
9598 |
this.setAttribute('disabled',value);
|
jtulach@678
|
9599 |
},
|
jtulach@678
|
9600 |
get label(){
|
jtulach@678
|
9601 |
return this.getAttribute('label');
|
jtulach@678
|
9602 |
},
|
jtulach@678
|
9603 |
set label(value){
|
jtulach@678
|
9604 |
this.setAttribute('label',value);
|
jtulach@678
|
9605 |
},
|
jtulach@678
|
9606 |
appendChild: function(node){
|
jtulach@678
|
9607 |
var i,
|
jtulach@678
|
9608 |
length,
|
jtulach@678
|
9609 |
selected = false;
|
jtulach@678
|
9610 |
//make sure at least one is selected by default
|
jtulach@678
|
9611 |
if(node.nodeType === Node.ELEMENT_NODE && node.tagName === 'OPTION'){
|
jtulach@678
|
9612 |
length = this.childNodes.length;
|
jtulach@678
|
9613 |
for(i=0;i<length;i++){
|
jtulach@678
|
9614 |
if(this.childNodes[i].nodeType === Node.ELEMENT_NODE &&
|
jtulach@678
|
9615 |
this.childNodes[i].tagName === 'OPTION'){
|
jtulach@678
|
9616 |
//check if it is selected
|
jtulach@678
|
9617 |
if(this.selected){
|
jtulach@678
|
9618 |
selected = true;
|
jtulach@678
|
9619 |
break;
|
jtulach@678
|
9620 |
}
|
jtulach@678
|
9621 |
}
|
jtulach@678
|
9622 |
}
|
jtulach@678
|
9623 |
if(!selected){
|
jtulach@678
|
9624 |
node.selected = true;
|
jtulach@678
|
9625 |
this.value = node.value?node.value:'';
|
jtulach@678
|
9626 |
}
|
jtulach@678
|
9627 |
}
|
jtulach@678
|
9628 |
return HTMLElement.prototype.appendChild.apply(this, [node]);
|
jtulach@678
|
9629 |
},
|
jtulach@678
|
9630 |
toString: function() {
|
jtulach@678
|
9631 |
return '[object HTMLOptGroupElement]';
|
jtulach@678
|
9632 |
}
|
jtulach@678
|
9633 |
});
|
jtulach@678
|
9634 |
|
jtulach@678
|
9635 |
/**
|
jtulach@678
|
9636 |
* HTMLOptionElement, Option
|
jtulach@678
|
9637 |
* HTML5: 4.10.10 The option element
|
jtulach@678
|
9638 |
* http://dev.w3.org/html5/spec/Overview.html#the-option-element
|
jtulach@678
|
9639 |
*/
|
jtulach@678
|
9640 |
HTMLOptionElement = function(ownerDocument) {
|
jtulach@678
|
9641 |
HTMLInputCommon.apply(this, arguments);
|
jtulach@678
|
9642 |
this._selected = null;
|
jtulach@678
|
9643 |
};
|
jtulach@678
|
9644 |
HTMLOptionElement.prototype = new HTMLInputCommon();
|
jtulach@678
|
9645 |
__extend__(HTMLOptionElement.prototype, {
|
jtulach@678
|
9646 |
|
jtulach@678
|
9647 |
/**
|
jtulach@678
|
9648 |
* defaultSelected actually reflects the presence of the
|
jtulach@678
|
9649 |
* 'selected' attribute.
|
jtulach@678
|
9650 |
*/
|
jtulach@678
|
9651 |
get defaultSelected() {
|
jtulach@678
|
9652 |
return this.hasAttribute('selected');
|
jtulach@678
|
9653 |
},
|
jtulach@678
|
9654 |
set defaultSelected(value) {
|
jtulach@678
|
9655 |
if (value) {
|
jtulach@678
|
9656 |
this.setAttribute('selected','');
|
jtulach@678
|
9657 |
} else {
|
jtulach@678
|
9658 |
if (this.hasAttribute('selected')) {
|
jtulach@678
|
9659 |
this.removeAttribute('selected');
|
jtulach@678
|
9660 |
}
|
jtulach@678
|
9661 |
}
|
jtulach@678
|
9662 |
},
|
jtulach@678
|
9663 |
|
jtulach@678
|
9664 |
/*
|
jtulach@678
|
9665 |
* HTML5: The form IDL attribute's behavior depends on whether the
|
jtulach@678
|
9666 |
* option element is in a select element or not. If the option has
|
jtulach@678
|
9667 |
* a select element as its parent, or has a colgroup element as
|
jtulach@678
|
9668 |
* its parent and that colgroup element has a select element as
|
jtulach@678
|
9669 |
* its parent, then the form IDL attribute must return the same
|
jtulach@678
|
9670 |
* value as the form IDL attribute on that select
|
jtulach@678
|
9671 |
* element. Otherwise, it must return null.
|
jtulach@678
|
9672 |
*/
|
jtulach@678
|
9673 |
_selectparent: function() {
|
jtulach@678
|
9674 |
var parent = this.parentNode;
|
jtulach@678
|
9675 |
if (!parent) {
|
jtulach@678
|
9676 |
return null;
|
jtulach@678
|
9677 |
}
|
jtulach@678
|
9678 |
|
jtulach@678
|
9679 |
if (parent.tagName === 'SELECT') {
|
jtulach@678
|
9680 |
return parent;
|
jtulach@678
|
9681 |
}
|
jtulach@678
|
9682 |
if (parent.tagName === 'COLGROUP') {
|
jtulach@678
|
9683 |
parent = parent.parentNode;
|
jtulach@678
|
9684 |
if (parent && parent.tagName === 'SELECT') {
|
jtulach@678
|
9685 |
return parent;
|
jtulach@678
|
9686 |
}
|
jtulach@678
|
9687 |
}
|
jtulach@678
|
9688 |
},
|
jtulach@678
|
9689 |
_updateoptions: function() {
|
jtulach@678
|
9690 |
var parent = this._selectparent();
|
jtulach@678
|
9691 |
if (parent) {
|
jtulach@678
|
9692 |
// has side effects and updates owner select's options
|
jtulach@678
|
9693 |
parent.options;
|
jtulach@678
|
9694 |
}
|
jtulach@678
|
9695 |
},
|
jtulach@678
|
9696 |
get form() {
|
jtulach@678
|
9697 |
var parent = this._selectparent();
|
jtulach@678
|
9698 |
return parent ? parent.form : null;
|
jtulach@678
|
9699 |
},
|
jtulach@678
|
9700 |
get index() {
|
jtulach@678
|
9701 |
var options, i;
|
jtulach@678
|
9702 |
|
jtulach@678
|
9703 |
if (! this.parentNode) {
|
jtulach@678
|
9704 |
return -1;
|
jtulach@678
|
9705 |
}
|
jtulach@678
|
9706 |
options = this.parentNode.options;
|
jtulach@678
|
9707 |
for (i=0; i < options.length; ++i) {
|
jtulach@678
|
9708 |
if (this === options[i]) {
|
jtulach@678
|
9709 |
return i;
|
jtulach@678
|
9710 |
}
|
jtulach@678
|
9711 |
}
|
jtulach@678
|
9712 |
return 0;
|
jtulach@678
|
9713 |
},
|
jtulach@678
|
9714 |
get label() {
|
jtulach@678
|
9715 |
return this.getAttribute('label');
|
jtulach@678
|
9716 |
},
|
jtulach@678
|
9717 |
set label(value) {
|
jtulach@678
|
9718 |
this.setAttribute('label', value);
|
jtulach@678
|
9719 |
},
|
jtulach@678
|
9720 |
|
jtulach@678
|
9721 |
/*
|
jtulach@678
|
9722 |
* This is not in the spec, but safari and firefox both
|
jtulach@678
|
9723 |
* use this
|
jtulach@678
|
9724 |
*/
|
jtulach@678
|
9725 |
get name() {
|
jtulach@678
|
9726 |
return this.getAttribute('name');
|
jtulach@678
|
9727 |
},
|
jtulach@678
|
9728 |
set name(value) {
|
jtulach@678
|
9729 |
this.setAttribute('name', value);
|
jtulach@678
|
9730 |
},
|
jtulach@678
|
9731 |
|
jtulach@678
|
9732 |
/**
|
jtulach@678
|
9733 |
*
|
jtulach@678
|
9734 |
*/
|
jtulach@678
|
9735 |
get selected() {
|
jtulach@678
|
9736 |
// if disabled, return false, no matter what
|
jtulach@678
|
9737 |
if (this.disabled) {
|
jtulach@678
|
9738 |
return false;
|
jtulach@678
|
9739 |
}
|
jtulach@678
|
9740 |
if (this._selected === null) {
|
jtulach@678
|
9741 |
return this.defaultSelected;
|
jtulach@678
|
9742 |
}
|
jtulach@678
|
9743 |
|
jtulach@678
|
9744 |
return this._selected;
|
jtulach@678
|
9745 |
},
|
jtulach@678
|
9746 |
set selected(value) {
|
jtulach@678
|
9747 |
this._selected = (value) ? true : false;
|
jtulach@678
|
9748 |
},
|
jtulach@678
|
9749 |
|
jtulach@678
|
9750 |
get text() {
|
jtulach@678
|
9751 |
var val = this.nodeValue;
|
jtulach@678
|
9752 |
return (val === null || this.value === undefined) ?
|
jtulach@678
|
9753 |
this.innerHTML :
|
jtulach@678
|
9754 |
val;
|
jtulach@678
|
9755 |
},
|
jtulach@678
|
9756 |
get value() {
|
jtulach@678
|
9757 |
var val = this.getAttribute('value');
|
jtulach@678
|
9758 |
return (val === null || val === undefined) ?
|
jtulach@678
|
9759 |
this.textContent :
|
jtulach@678
|
9760 |
val;
|
jtulach@678
|
9761 |
},
|
jtulach@678
|
9762 |
set value(value) {
|
jtulach@678
|
9763 |
this.setAttribute('value', value);
|
jtulach@678
|
9764 |
},
|
jtulach@678
|
9765 |
toString: function() {
|
jtulach@678
|
9766 |
return '[object HTMLOptionElement]';
|
jtulach@678
|
9767 |
}
|
jtulach@678
|
9768 |
});
|
jtulach@678
|
9769 |
|
jtulach@678
|
9770 |
Option = function(text, value, defaultSelected, selected) {
|
jtulach@678
|
9771 |
|
jtulach@678
|
9772 |
// Not sure if this is correct:
|
jtulach@678
|
9773 |
//
|
jtulach@678
|
9774 |
// The element's document must be the active document of the
|
jtulach@678
|
9775 |
// browsing context of the Window object on which the interface
|
jtulach@678
|
9776 |
// object of the invoked constructor is found.
|
jtulach@678
|
9777 |
HTMLOptionElement.apply(this, [document]);
|
jtulach@678
|
9778 |
this.nodeName = 'OPTION';
|
jtulach@678
|
9779 |
|
jtulach@678
|
9780 |
if (arguments.length >= 1) {
|
jtulach@678
|
9781 |
this.appendChild(document.createTextNode('' + text));
|
jtulach@678
|
9782 |
}
|
jtulach@678
|
9783 |
if (arguments.length >= 2) {
|
jtulach@678
|
9784 |
this.value = value;
|
jtulach@678
|
9785 |
}
|
jtulach@678
|
9786 |
if (arguments.length >= 3) {
|
jtulach@678
|
9787 |
if (defaultSelected) {
|
jtulach@678
|
9788 |
this.defaultSelected = '';
|
jtulach@678
|
9789 |
}
|
jtulach@678
|
9790 |
}
|
jtulach@678
|
9791 |
if (arguments.length >= 4) {
|
jtulach@678
|
9792 |
this.selected = (selected) ? true : false;
|
jtulach@678
|
9793 |
}
|
jtulach@678
|
9794 |
};
|
jtulach@678
|
9795 |
|
jtulach@678
|
9796 |
Option.prototype = new HTMLOptionElement();
|
jtulach@678
|
9797 |
|
jtulach@678
|
9798 |
// Named Element Support
|
jtulach@678
|
9799 |
|
jtulach@678
|
9800 |
function updater(node, value) {
|
jtulach@678
|
9801 |
node._updateoptions();
|
jtulach@678
|
9802 |
}
|
jtulach@678
|
9803 |
HTMLElement.registerSetAttribute('OPTION', 'name', updater);
|
jtulach@678
|
9804 |
HTMLElement.registerSetAttribute('OPTION', 'id', updater);
|
jtulach@678
|
9805 |
|
jtulach@678
|
9806 |
/*
|
jtulach@678
|
9807 |
* HTMLParagraphElement - DOM Level 2
|
jtulach@678
|
9808 |
*/
|
jtulach@678
|
9809 |
HTMLParagraphElement = function(ownerDocument) {
|
jtulach@678
|
9810 |
HTMLElement.apply(this, arguments);
|
jtulach@678
|
9811 |
};
|
jtulach@678
|
9812 |
HTMLParagraphElement.prototype = new HTMLElement();
|
jtulach@678
|
9813 |
__extend__(HTMLParagraphElement.prototype, {
|
jtulach@678
|
9814 |
toString: function(){
|
jtulach@678
|
9815 |
return '[object HTMLParagraphElement]';
|
jtulach@678
|
9816 |
}
|
jtulach@678
|
9817 |
});
|
jtulach@678
|
9818 |
|
jtulach@678
|
9819 |
|
jtulach@678
|
9820 |
/**
|
jtulach@678
|
9821 |
* HTMLParamElement
|
jtulach@678
|
9822 |
*
|
jtulach@678
|
9823 |
* HTML5: 4.8.6 The param element
|
jtulach@678
|
9824 |
* http://dev.w3.org/html5/spec/Overview.html#the-param-element
|
jtulach@678
|
9825 |
*/
|
jtulach@678
|
9826 |
HTMLParamElement = function(ownerDocument) {
|
jtulach@678
|
9827 |
HTMLElement.apply(this, arguments);
|
jtulach@678
|
9828 |
};
|
jtulach@678
|
9829 |
HTMLParamElement.prototype = new HTMLElement();
|
jtulach@678
|
9830 |
__extend__(HTMLParamElement.prototype, {
|
jtulach@678
|
9831 |
get name() {
|
jtulach@678
|
9832 |
return this.getAttribute('name') || '';
|
jtulach@678
|
9833 |
},
|
jtulach@678
|
9834 |
set name(value) {
|
jtulach@678
|
9835 |
this.setAttribute('name', value);
|
jtulach@678
|
9836 |
},
|
jtulach@678
|
9837 |
get type(){
|
jtulach@678
|
9838 |
return this.getAttribute('type');
|
jtulach@678
|
9839 |
},
|
jtulach@678
|
9840 |
set type(value){
|
jtulach@678
|
9841 |
this.setAttribute('type',value);
|
jtulach@678
|
9842 |
},
|
jtulach@678
|
9843 |
get value(){
|
jtulach@678
|
9844 |
return this.getAttribute('value');
|
jtulach@678
|
9845 |
},
|
jtulach@678
|
9846 |
set value(value){
|
jtulach@678
|
9847 |
this.setAttribute('value',value);
|
jtulach@678
|
9848 |
},
|
jtulach@678
|
9849 |
get valueType(){
|
jtulach@678
|
9850 |
return this.getAttribute('valuetype');
|
jtulach@678
|
9851 |
},
|
jtulach@678
|
9852 |
set valueType(value){
|
jtulach@678
|
9853 |
this.setAttribute('valuetype',value);
|
jtulach@678
|
9854 |
},
|
jtulach@678
|
9855 |
toString: function() {
|
jtulach@678
|
9856 |
return '[object HTMLParamElement]';
|
jtulach@678
|
9857 |
}
|
jtulach@678
|
9858 |
});
|
jtulach@678
|
9859 |
|
jtulach@678
|
9860 |
|
jtulach@678
|
9861 |
/**
|
jtulach@678
|
9862 |
* HTMLScriptElement - DOM Level 2
|
jtulach@678
|
9863 |
*
|
jtulach@678
|
9864 |
* HTML5: 4.3.1 The script element
|
jtulach@678
|
9865 |
* http://dev.w3.org/html5/spec/Overview.html#script
|
jtulach@678
|
9866 |
*/
|
jtulach@678
|
9867 |
HTMLScriptElement = function(ownerDocument) {
|
jtulach@678
|
9868 |
HTMLElement.apply(this, arguments);
|
jtulach@678
|
9869 |
};
|
jtulach@678
|
9870 |
HTMLScriptElement.prototype = new HTMLElement();
|
jtulach@678
|
9871 |
__extend__(HTMLScriptElement.prototype, {
|
jtulach@678
|
9872 |
|
jtulach@678
|
9873 |
/**
|
jtulach@678
|
9874 |
* HTML5 spec @ http://dev.w3.org/html5/spec/Overview.html#script
|
jtulach@678
|
9875 |
*
|
jtulach@678
|
9876 |
* "The IDL attribute text must return a concatenation of the
|
jtulach@678
|
9877 |
* contents of all the text nodes that are direct children of the
|
jtulach@678
|
9878 |
* script element (ignoring any other nodes such as comments or
|
jtulach@678
|
9879 |
* elements), in tree order. On setting, it must act the same way
|
jtulach@678
|
9880 |
* as the textContent IDL attribute."
|
jtulach@678
|
9881 |
*
|
jtulach@678
|
9882 |
* AND... "The term text node refers to any Text node,
|
jtulach@678
|
9883 |
* including CDATASection nodes; specifically, any Node with node
|
jtulach@678
|
9884 |
* type TEXT_NODE (3) or CDATA_SECTION_NODE (4)"
|
jtulach@678
|
9885 |
*/
|
jtulach@678
|
9886 |
get text() {
|
jtulach@678
|
9887 |
var kids = this.childNodes;
|
jtulach@678
|
9888 |
var kid;
|
jtulach@678
|
9889 |
var s = '';
|
jtulach@678
|
9890 |
var imax = kids.length;
|
jtulach@678
|
9891 |
for (var i = 0; i < imax; ++i) {
|
jtulach@678
|
9892 |
kid = kids[i];
|
jtulach@678
|
9893 |
if (kid.nodeType === Node.TEXT_NODE ||
|
jtulach@678
|
9894 |
kid.nodeType === Node.CDATA_SECTION_NODE) {
|
jtulach@678
|
9895 |
s += kid.nodeValue;
|
jtulach@678
|
9896 |
}
|
jtulach@678
|
9897 |
}
|
jtulach@678
|
9898 |
return s;
|
jtulach@678
|
9899 |
},
|
jtulach@678
|
9900 |
|
jtulach@678
|
9901 |
/**
|
jtulach@678
|
9902 |
* HTML5 spec "Can be set, to replace the element's children with
|
jtulach@678
|
9903 |
* the given value."
|
jtulach@678
|
9904 |
*/
|
jtulach@678
|
9905 |
set text(value) {
|
jtulach@678
|
9906 |
// this deletes all children, and make a new single text node
|
jtulach@678
|
9907 |
// with value
|
jtulach@678
|
9908 |
this.textContent = value;
|
jtulach@678
|
9909 |
|
jtulach@678
|
9910 |
/* Currently we always execute, but this isn't quite right if
|
jtulach@678
|
9911 |
* the node has *not* been inserted into the document, then it
|
jtulach@678
|
9912 |
* should *not* fire. The more detailed answer from the spec:
|
jtulach@678
|
9913 |
*
|
jtulach@678
|
9914 |
* When a script element that is neither marked as having
|
jtulach@678
|
9915 |
* "already started" nor marked as being "parser-inserted"
|
jtulach@678
|
9916 |
* experiences one of the events listed in the following list,
|
jtulach@678
|
9917 |
* the user agent must synchronously run the script element:
|
jtulach@678
|
9918 |
*
|
jtulach@678
|
9919 |
* * The script element gets inserted into a document.
|
jtulach@678
|
9920 |
* * The script element is in a Document and its child nodes
|
jtulach@678
|
9921 |
* are changed.
|
jtulach@678
|
9922 |
* * The script element is in a Document and has a src
|
jtulach@678
|
9923 |
* attribute set where previously the element had no such
|
jtulach@678
|
9924 |
* attribute.
|
jtulach@678
|
9925 |
*
|
jtulach@678
|
9926 |
* And no doubt there are other cases as well.
|
jtulach@678
|
9927 |
*/
|
jtulach@678
|
9928 |
Envjs.loadInlineScript(this);
|
jtulach@678
|
9929 |
},
|
jtulach@678
|
9930 |
|
jtulach@678
|
9931 |
get htmlFor(){
|
jtulach@678
|
9932 |
return this.getAttribute('for');
|
jtulach@678
|
9933 |
},
|
jtulach@678
|
9934 |
set htmlFor(value){
|
jtulach@678
|
9935 |
this.setAttribute('for',value);
|
jtulach@678
|
9936 |
},
|
jtulach@678
|
9937 |
get event(){
|
jtulach@678
|
9938 |
return this.getAttribute('event');
|
jtulach@678
|
9939 |
},
|
jtulach@678
|
9940 |
set event(value){
|
jtulach@678
|
9941 |
this.setAttribute('event',value);
|
jtulach@678
|
9942 |
},
|
jtulach@678
|
9943 |
get charset(){
|
jtulach@678
|
9944 |
return this.getAttribute('charset');
|
jtulach@678
|
9945 |
},
|
jtulach@678
|
9946 |
set charset(value){
|
jtulach@678
|
9947 |
this.setAttribute('charset',value);
|
jtulach@678
|
9948 |
},
|
jtulach@678
|
9949 |
get defer(){
|
jtulach@678
|
9950 |
return this.getAttribute('defer');
|
jtulach@678
|
9951 |
},
|
jtulach@678
|
9952 |
set defer(value){
|
jtulach@678
|
9953 |
this.setAttribute('defer',value);
|
jtulach@678
|
9954 |
},
|
jtulach@678
|
9955 |
get src(){
|
jtulach@678
|
9956 |
return this.getAttribute('src')||'';
|
jtulach@678
|
9957 |
},
|
jtulach@678
|
9958 |
set src(value){
|
jtulach@678
|
9959 |
this.setAttribute('src',value);
|
jtulach@678
|
9960 |
},
|
jtulach@678
|
9961 |
get type(){
|
jtulach@678
|
9962 |
return this.getAttribute('type')||'';
|
jtulach@678
|
9963 |
},
|
jtulach@678
|
9964 |
set type(value){
|
jtulach@678
|
9965 |
this.setAttribute('type',value);
|
jtulach@678
|
9966 |
},
|
jtulach@678
|
9967 |
onload: HTMLEvents.prototype.onload,
|
jtulach@678
|
9968 |
onerror: HTMLEvents.prototype.onerror,
|
jtulach@678
|
9969 |
toString: function() {
|
jtulach@678
|
9970 |
return '[object HTMLScriptElement]';
|
jtulach@678
|
9971 |
}
|
jtulach@678
|
9972 |
});
|
jtulach@678
|
9973 |
|
jtulach@678
|
9974 |
|
jtulach@678
|
9975 |
/**
|
jtulach@678
|
9976 |
* HTMLSelectElement
|
jtulach@678
|
9977 |
* HTML5: http://dev.w3.org/html5/spec/Overview.html#the-select-element
|
jtulach@678
|
9978 |
*/
|
jtulach@678
|
9979 |
HTMLSelectElement = function(ownerDocument) {
|
jtulach@678
|
9980 |
HTMLTypeValueInputs.apply(this, arguments);
|
jtulach@678
|
9981 |
this._oldIndex = -1;
|
jtulach@678
|
9982 |
};
|
jtulach@678
|
9983 |
|
jtulach@678
|
9984 |
HTMLSelectElement.prototype = new HTMLTypeValueInputs();
|
jtulach@678
|
9985 |
__extend__(HTMLSelectElement.prototype, inputElements_dataProperties);
|
jtulach@678
|
9986 |
__extend__(HTMLButtonElement.prototype, inputElements_size);
|
jtulach@678
|
9987 |
__extend__(HTMLSelectElement.prototype, inputElements_onchange);
|
jtulach@678
|
9988 |
__extend__(HTMLSelectElement.prototype, inputElements_focusEvents);
|
jtulach@678
|
9989 |
__extend__(HTMLSelectElement.prototype, {
|
jtulach@678
|
9990 |
|
jtulach@678
|
9991 |
get value() {
|
jtulach@678
|
9992 |
var index = this.selectedIndex;
|
jtulach@678
|
9993 |
return (index === -1) ? '' : this.options[index].value;
|
jtulach@678
|
9994 |
},
|
jtulach@678
|
9995 |
set value(newValue) {
|
jtulach@678
|
9996 |
var options = this.options;
|
jtulach@678
|
9997 |
var imax = options.length;
|
jtulach@678
|
9998 |
for (var i=0; i< imax; ++i) {
|
jtulach@678
|
9999 |
if (options[i].value == newValue) {
|
jtulach@678
|
10000 |
this.setAttribute('value', newValue);
|
jtulach@678
|
10001 |
this.selectedIndex = i;
|
jtulach@678
|
10002 |
return;
|
jtulach@678
|
10003 |
}
|
jtulach@678
|
10004 |
}
|
jtulach@678
|
10005 |
},
|
jtulach@678
|
10006 |
get multiple() {
|
jtulach@678
|
10007 |
return this.hasAttribute('multiple');
|
jtulach@678
|
10008 |
},
|
jtulach@678
|
10009 |
set multiple(value) {
|
jtulach@678
|
10010 |
if (value) {
|
jtulach@678
|
10011 |
this.setAttribute('multiple', '');
|
jtulach@678
|
10012 |
} else {
|
jtulach@678
|
10013 |
if (this.hasAttribute('multiple')) {
|
jtulach@678
|
10014 |
this.removeAttribute('multiple');
|
jtulach@678
|
10015 |
}
|
jtulach@678
|
10016 |
}
|
jtulach@678
|
10017 |
},
|
jtulach@678
|
10018 |
// Returns HTMLOptionsCollection
|
jtulach@678
|
10019 |
get options() {
|
jtulach@678
|
10020 |
var nodes = this.getElementsByTagName('option');
|
jtulach@678
|
10021 |
var alist = [];
|
jtulach@678
|
10022 |
var i, tmp;
|
jtulach@678
|
10023 |
for (i = 0; i < nodes.length; ++i) {
|
jtulach@678
|
10024 |
alist.push(nodes[i]);
|
jtulach@678
|
10025 |
this[i] = nodes[i];
|
jtulach@678
|
10026 |
tmp = nodes[i].name;
|
jtulach@678
|
10027 |
if (tmp) {
|
jtulach@678
|
10028 |
this[tmp] = nodes[i];
|
jtulach@678
|
10029 |
}
|
jtulach@678
|
10030 |
tmp = nodes[i].id;
|
jtulach@678
|
10031 |
if (tmp) {
|
jtulach@678
|
10032 |
this[tmp] = nodes[i];
|
jtulach@678
|
10033 |
}
|
jtulach@678
|
10034 |
}
|
jtulach@678
|
10035 |
return new HTMLCollection(alist);
|
jtulach@678
|
10036 |
},
|
jtulach@678
|
10037 |
get length() {
|
jtulach@678
|
10038 |
return this.options.length;
|
jtulach@678
|
10039 |
},
|
jtulach@678
|
10040 |
item: function(idx) {
|
jtulach@678
|
10041 |
return this.options[idx];
|
jtulach@678
|
10042 |
},
|
jtulach@678
|
10043 |
namedItem: function(aname) {
|
jtulach@678
|
10044 |
return this.options[aname];
|
jtulach@678
|
10045 |
},
|
jtulach@678
|
10046 |
|
jtulach@678
|
10047 |
get selectedIndex() {
|
jtulach@678
|
10048 |
var options = this.options;
|
jtulach@678
|
10049 |
var imax = options.length;
|
jtulach@678
|
10050 |
for (var i=0; i < imax; ++i) {
|
jtulach@678
|
10051 |
if (options[i].selected) {
|
jtulach@678
|
10052 |
//console.log('select get selectedIndex %s', i);
|
jtulach@678
|
10053 |
return i;
|
jtulach@678
|
10054 |
}
|
jtulach@678
|
10055 |
}
|
jtulach@678
|
10056 |
//console.log('select get selectedIndex %s', -1);
|
jtulach@678
|
10057 |
return -1;
|
jtulach@678
|
10058 |
},
|
jtulach@678
|
10059 |
|
jtulach@678
|
10060 |
set selectedIndex(value) {
|
jtulach@678
|
10061 |
var options = this.options;
|
jtulach@678
|
10062 |
var num = Number(value);
|
jtulach@678
|
10063 |
var imax = options.length;
|
jtulach@678
|
10064 |
for (var i = 0; i < imax; ++i) {
|
jtulach@678
|
10065 |
options[i].selected = (i === num);
|
jtulach@678
|
10066 |
}
|
jtulach@678
|
10067 |
},
|
jtulach@678
|
10068 |
get type() {
|
jtulach@678
|
10069 |
return this.multiple ? 'select-multiple' : 'select-one';
|
jtulach@678
|
10070 |
},
|
jtulach@678
|
10071 |
|
jtulach@678
|
10072 |
add: function(element, before) {
|
jtulach@678
|
10073 |
this.appendChild(element);
|
jtulach@678
|
10074 |
//__add__(this);
|
jtulach@678
|
10075 |
},
|
jtulach@678
|
10076 |
remove: function() {
|
jtulach@678
|
10077 |
__remove__(this);
|
jtulach@678
|
10078 |
},
|
jtulach@678
|
10079 |
toString: function() {
|
jtulach@678
|
10080 |
return '[object HTMLSelectElement]';
|
jtulach@678
|
10081 |
}
|
jtulach@678
|
10082 |
});
|
jtulach@678
|
10083 |
|
jtulach@678
|
10084 |
// Named Element Support
|
jtulach@678
|
10085 |
HTMLElement.registerSetAttribute('SELECT', 'name',
|
jtulach@678
|
10086 |
__updateFormForNamedElement__);
|
jtulach@678
|
10087 |
/**
|
jtulach@678
|
10088 |
* HTML 5: 4.6.22 The span element
|
jtulach@678
|
10089 |
* http://dev.w3.org/html5/spec/Overview.html#the-span-element
|
jtulach@678
|
10090 |
*
|
jtulach@678
|
10091 |
*/
|
jtulach@678
|
10092 |
HTMLSpanElement = function(ownerDocument) {
|
jtulach@678
|
10093 |
HTMLElement.apply(this, arguments);
|
jtulach@678
|
10094 |
};
|
jtulach@678
|
10095 |
HTMLSpanElement.prototype = new HTMLElement();
|
jtulach@678
|
10096 |
__extend__(HTMLSpanElement.prototype, {
|
jtulach@678
|
10097 |
toString: function(){
|
jtulach@678
|
10098 |
return '[object HTMLSpanElement]';
|
jtulach@678
|
10099 |
}
|
jtulach@678
|
10100 |
});
|
jtulach@678
|
10101 |
|
jtulach@678
|
10102 |
|
jtulach@678
|
10103 |
/**
|
jtulach@678
|
10104 |
* HTMLStyleElement - DOM Level 2
|
jtulach@678
|
10105 |
* HTML5 4.2.6 The style element
|
jtulach@678
|
10106 |
* http://dev.w3.org/html5/spec/Overview.html#the-style-element
|
jtulach@678
|
10107 |
*/
|
jtulach@678
|
10108 |
HTMLStyleElement = function(ownerDocument) {
|
jtulach@678
|
10109 |
HTMLElement.apply(this, arguments);
|
jtulach@678
|
10110 |
};
|
jtulach@678
|
10111 |
HTMLStyleElement.prototype = new HTMLElement();
|
jtulach@678
|
10112 |
__extend__(HTMLStyleElement.prototype, {
|
jtulach@678
|
10113 |
get disabled(){
|
jtulach@678
|
10114 |
return this.getAttribute('disabled');
|
jtulach@678
|
10115 |
},
|
jtulach@678
|
10116 |
set disabled(value){
|
jtulach@678
|
10117 |
this.setAttribute('disabled',value);
|
jtulach@678
|
10118 |
},
|
jtulach@678
|
10119 |
get media(){
|
jtulach@678
|
10120 |
return this.getAttribute('media');
|
jtulach@678
|
10121 |
},
|
jtulach@678
|
10122 |
set media(value){
|
jtulach@678
|
10123 |
this.setAttribute('media',value);
|
jtulach@678
|
10124 |
},
|
jtulach@678
|
10125 |
get type(){
|
jtulach@678
|
10126 |
return this.getAttribute('type');
|
jtulach@678
|
10127 |
},
|
jtulach@678
|
10128 |
set type(value){
|
jtulach@678
|
10129 |
this.setAttribute('type',value);
|
jtulach@678
|
10130 |
},
|
jtulach@678
|
10131 |
toString: function() {
|
jtulach@678
|
10132 |
return '[object HTMLStyleElement]';
|
jtulach@678
|
10133 |
}
|
jtulach@678
|
10134 |
});
|
jtulach@678
|
10135 |
|
jtulach@678
|
10136 |
/**
|
jtulach@678
|
10137 |
* HTMLTableElement - DOM Level 2
|
jtulach@678
|
10138 |
* Implementation Provided by Steven Wood
|
jtulach@678
|
10139 |
*
|
jtulach@678
|
10140 |
* HTML5: 4.9.1 The table element
|
jtulach@678
|
10141 |
* http://dev.w3.org/html5/spec/Overview.html#the-table-element
|
jtulach@678
|
10142 |
*/
|
jtulach@678
|
10143 |
HTMLTableElement = function(ownerDocument) {
|
jtulach@678
|
10144 |
HTMLElement.apply(this, arguments);
|
jtulach@678
|
10145 |
};
|
jtulach@678
|
10146 |
HTMLTableElement.prototype = new HTMLElement();
|
jtulach@678
|
10147 |
__extend__(HTMLTableElement.prototype, {
|
jtulach@678
|
10148 |
|
jtulach@678
|
10149 |
get tFoot() {
|
jtulach@678
|
10150 |
//tFoot returns the table footer.
|
jtulach@678
|
10151 |
return this.getElementsByTagName("tfoot")[0];
|
jtulach@678
|
10152 |
},
|
jtulach@678
|
10153 |
|
jtulach@678
|
10154 |
createTFoot : function () {
|
jtulach@678
|
10155 |
var tFoot = this.tFoot;
|
jtulach@678
|
10156 |
|
jtulach@678
|
10157 |
if (!tFoot) {
|
jtulach@678
|
10158 |
tFoot = document.createElement("tfoot");
|
jtulach@678
|
10159 |
this.appendChild(tFoot);
|
jtulach@678
|
10160 |
}
|
jtulach@678
|
10161 |
|
jtulach@678
|
10162 |
return tFoot;
|
jtulach@678
|
10163 |
},
|
jtulach@678
|
10164 |
|
jtulach@678
|
10165 |
deleteTFoot : function () {
|
jtulach@678
|
10166 |
var foot = this.tFoot;
|
jtulach@678
|
10167 |
if (foot) {
|
jtulach@678
|
10168 |
foot.parentNode.removeChild(foot);
|
jtulach@678
|
10169 |
}
|
jtulach@678
|
10170 |
},
|
jtulach@678
|
10171 |
|
jtulach@678
|
10172 |
get tHead() {
|
jtulach@678
|
10173 |
//tHead returns the table head.
|
jtulach@678
|
10174 |
return this.getElementsByTagName("thead")[0];
|
jtulach@678
|
10175 |
},
|
jtulach@678
|
10176 |
|
jtulach@678
|
10177 |
createTHead : function () {
|
jtulach@678
|
10178 |
var tHead = this.tHead;
|
jtulach@678
|
10179 |
|
jtulach@678
|
10180 |
if (!tHead) {
|
jtulach@678
|
10181 |
tHead = document.createElement("thead");
|
jtulach@678
|
10182 |
this.insertBefore(tHead, this.firstChild);
|
jtulach@678
|
10183 |
}
|
jtulach@678
|
10184 |
|
jtulach@678
|
10185 |
return tHead;
|
jtulach@678
|
10186 |
},
|
jtulach@678
|
10187 |
|
jtulach@678
|
10188 |
deleteTHead : function () {
|
jtulach@678
|
10189 |
var head = this.tHead;
|
jtulach@678
|
10190 |
if (head) {
|
jtulach@678
|
10191 |
head.parentNode.removeChild(head);
|
jtulach@678
|
10192 |
}
|
jtulach@678
|
10193 |
},
|
jtulach@678
|
10194 |
|
jtulach@678
|
10195 |
/*appendChild : function (child) {
|
jtulach@678
|
10196 |
|
jtulach@678
|
10197 |
var tagName;
|
jtulach@678
|
10198 |
if(child&&child.nodeType==Node.ELEMENT_NODE){
|
jtulach@678
|
10199 |
tagName = child.tagName.toLowerCase();
|
jtulach@678
|
10200 |
if (tagName === "tr") {
|
jtulach@678
|
10201 |
// need an implcit <tbody> to contain this...
|
jtulach@678
|
10202 |
if (!this.currentBody) {
|
jtulach@678
|
10203 |
this.currentBody = document.createElement("tbody");
|
jtulach@678
|
10204 |
|
jtulach@678
|
10205 |
Node.prototype.appendChild.apply(this, [this.currentBody]);
|
jtulach@678
|
10206 |
}
|
jtulach@678
|
10207 |
|
jtulach@678
|
10208 |
return this.currentBody.appendChild(child);
|
jtulach@678
|
10209 |
|
jtulach@678
|
10210 |
} else if (tagName === "tbody" || tagName === "tfoot" && this.currentBody) {
|
jtulach@678
|
10211 |
this.currentBody = child;
|
jtulach@678
|
10212 |
return Node.prototype.appendChild.apply(this, arguments);
|
jtulach@678
|
10213 |
|
jtulach@678
|
10214 |
} else {
|
jtulach@678
|
10215 |
return Node.prototype.appendChild.apply(this, arguments);
|
jtulach@678
|
10216 |
}
|
jtulach@678
|
10217 |
}else{
|
jtulach@678
|
10218 |
//tables can still have text node from white space
|
jtulach@678
|
10219 |
return Node.prototype.appendChild.apply(this, arguments);
|
jtulach@678
|
10220 |
}
|
jtulach@678
|
10221 |
},*/
|
jtulach@678
|
10222 |
|
jtulach@678
|
10223 |
get tBodies() {
|
jtulach@678
|
10224 |
return new HTMLCollection(this.getElementsByTagName("tbody"));
|
jtulach@678
|
10225 |
|
jtulach@678
|
10226 |
},
|
jtulach@678
|
10227 |
|
jtulach@678
|
10228 |
get rows() {
|
jtulach@678
|
10229 |
return new HTMLCollection(this.getElementsByTagName("tr"));
|
jtulach@678
|
10230 |
},
|
jtulach@678
|
10231 |
|
jtulach@678
|
10232 |
insertRow : function (idx) {
|
jtulach@678
|
10233 |
if (idx === undefined) {
|
jtulach@678
|
10234 |
throw new Error("Index omitted in call to HTMLTableElement.insertRow ");
|
jtulach@678
|
10235 |
}
|
jtulach@678
|
10236 |
|
jtulach@678
|
10237 |
var rows = this.rows,
|
jtulach@678
|
10238 |
numRows = rows.length,
|
jtulach@678
|
10239 |
node,
|
jtulach@678
|
10240 |
inserted,
|
jtulach@678
|
10241 |
lastRow;
|
jtulach@678
|
10242 |
|
jtulach@678
|
10243 |
if (idx > numRows) {
|
jtulach@678
|
10244 |
throw new Error("Index > rows.length in call to HTMLTableElement.insertRow");
|
jtulach@678
|
10245 |
}
|
jtulach@678
|
10246 |
|
jtulach@678
|
10247 |
inserted = document.createElement("tr");
|
jtulach@678
|
10248 |
// If index is -1 or equal to the number of rows,
|
jtulach@678
|
10249 |
// the row is appended as the last row. If index is omitted
|
jtulach@678
|
10250 |
// or greater than the number of rows, an error will result
|
jtulach@678
|
10251 |
if (idx === -1 || idx === numRows) {
|
jtulach@678
|
10252 |
this.appendChild(inserted);
|
jtulach@678
|
10253 |
} else {
|
jtulach@678
|
10254 |
rows[idx].parentNode.insertBefore(inserted, rows[idx]);
|
jtulach@678
|
10255 |
}
|
jtulach@678
|
10256 |
|
jtulach@678
|
10257 |
return inserted;
|
jtulach@678
|
10258 |
},
|
jtulach@678
|
10259 |
|
jtulach@678
|
10260 |
deleteRow : function (idx) {
|
jtulach@678
|
10261 |
var elem = this.rows[idx];
|
jtulach@678
|
10262 |
elem.parentNode.removeChild(elem);
|
jtulach@678
|
10263 |
},
|
jtulach@678
|
10264 |
|
jtulach@678
|
10265 |
get summary() {
|
jtulach@678
|
10266 |
return this.getAttribute("summary");
|
jtulach@678
|
10267 |
},
|
jtulach@678
|
10268 |
|
jtulach@678
|
10269 |
set summary(summary) {
|
jtulach@678
|
10270 |
this.setAttribute("summary", summary);
|
jtulach@678
|
10271 |
},
|
jtulach@678
|
10272 |
|
jtulach@678
|
10273 |
get align() {
|
jtulach@678
|
10274 |
return this.getAttribute("align");
|
jtulach@678
|
10275 |
},
|
jtulach@678
|
10276 |
|
jtulach@678
|
10277 |
set align(align) {
|
jtulach@678
|
10278 |
this.setAttribute("align", align);
|
jtulach@678
|
10279 |
},
|
jtulach@678
|
10280 |
|
jtulach@678
|
10281 |
get bgColor() {
|
jtulach@678
|
10282 |
return this.getAttribute("bgColor");
|
jtulach@678
|
10283 |
},
|
jtulach@678
|
10284 |
|
jtulach@678
|
10285 |
set bgColor(bgColor) {
|
jtulach@678
|
10286 |
return this.setAttribute("bgColor", bgColor);
|
jtulach@678
|
10287 |
},
|
jtulach@678
|
10288 |
|
jtulach@678
|
10289 |
get cellPadding() {
|
jtulach@678
|
10290 |
return this.getAttribute("cellPadding");
|
jtulach@678
|
10291 |
},
|
jtulach@678
|
10292 |
|
jtulach@678
|
10293 |
set cellPadding(cellPadding) {
|
jtulach@678
|
10294 |
return this.setAttribute("cellPadding", cellPadding);
|
jtulach@678
|
10295 |
},
|
jtulach@678
|
10296 |
|
jtulach@678
|
10297 |
get cellSpacing() {
|
jtulach@678
|
10298 |
return this.getAttribute("cellSpacing");
|
jtulach@678
|
10299 |
},
|
jtulach@678
|
10300 |
|
jtulach@678
|
10301 |
set cellSpacing(cellSpacing) {
|
jtulach@678
|
10302 |
this.setAttribute("cellSpacing", cellSpacing);
|
jtulach@678
|
10303 |
},
|
jtulach@678
|
10304 |
|
jtulach@678
|
10305 |
get frame() {
|
jtulach@678
|
10306 |
return this.getAttribute("frame");
|
jtulach@678
|
10307 |
},
|
jtulach@678
|
10308 |
|
jtulach@678
|
10309 |
set frame(frame) {
|
jtulach@678
|
10310 |
this.setAttribute("frame", frame);
|
jtulach@678
|
10311 |
},
|
jtulach@678
|
10312 |
|
jtulach@678
|
10313 |
get rules() {
|
jtulach@678
|
10314 |
return this.getAttribute("rules");
|
jtulach@678
|
10315 |
},
|
jtulach@678
|
10316 |
|
jtulach@678
|
10317 |
set rules(rules) {
|
jtulach@678
|
10318 |
this.setAttribute("rules", rules);
|
jtulach@678
|
10319 |
},
|
jtulach@678
|
10320 |
|
jtulach@678
|
10321 |
get width() {
|
jtulach@678
|
10322 |
return this.getAttribute("width");
|
jtulach@678
|
10323 |
},
|
jtulach@678
|
10324 |
|
jtulach@678
|
10325 |
set width(width) {
|
jtulach@678
|
10326 |
this.setAttribute("width", width);
|
jtulach@678
|
10327 |
},
|
jtulach@678
|
10328 |
toString: function() {
|
jtulach@678
|
10329 |
return '[object HTMLTableElement]';
|
jtulach@678
|
10330 |
}
|
jtulach@678
|
10331 |
});
|
jtulach@678
|
10332 |
|
jtulach@678
|
10333 |
/*
|
jtulach@678
|
10334 |
* HTMLxElement - DOM Level 2
|
jtulach@678
|
10335 |
* - Contributed by Steven Wood
|
jtulach@678
|
10336 |
*
|
jtulach@678
|
10337 |
* HTML5: 4.9.5 The tbody element
|
jtulach@678
|
10338 |
* http://dev.w3.org/html5/spec/Overview.html#the-tbody-element
|
jtulach@678
|
10339 |
* http://dev.w3.org/html5/spec/Overview.html#htmltablesectionelement
|
jtulach@678
|
10340 |
*/
|
jtulach@678
|
10341 |
HTMLTableSectionElement = function(ownerDocument) {
|
jtulach@678
|
10342 |
HTMLElement.apply(this, arguments);
|
jtulach@678
|
10343 |
};
|
jtulach@678
|
10344 |
HTMLTableSectionElement.prototype = new HTMLElement();
|
jtulach@678
|
10345 |
__extend__(HTMLTableSectionElement.prototype, {
|
jtulach@678
|
10346 |
|
jtulach@678
|
10347 |
/*appendChild : function (child) {
|
jtulach@678
|
10348 |
|
jtulach@678
|
10349 |
// disallow nesting of these elements.
|
jtulach@678
|
10350 |
if (child.tagName.match(/TBODY|TFOOT|THEAD/)) {
|
jtulach@678
|
10351 |
return this.parentNode.appendChild(child);
|
jtulach@678
|
10352 |
} else {
|
jtulach@678
|
10353 |
return Node.prototype.appendChild.apply(this, arguments);
|
jtulach@678
|
10354 |
}
|
jtulach@678
|
10355 |
|
jtulach@678
|
10356 |
},*/
|
jtulach@678
|
10357 |
|
jtulach@678
|
10358 |
get align() {
|
jtulach@678
|
10359 |
return this.getAttribute("align");
|
jtulach@678
|
10360 |
},
|
jtulach@678
|
10361 |
|
jtulach@678
|
10362 |
get ch() {
|
jtulach@678
|
10363 |
return this.getAttribute("ch");
|
jtulach@678
|
10364 |
},
|
jtulach@678
|
10365 |
|
jtulach@678
|
10366 |
set ch(ch) {
|
jtulach@678
|
10367 |
this.setAttribute("ch", ch);
|
jtulach@678
|
10368 |
},
|
jtulach@678
|
10369 |
|
jtulach@678
|
10370 |
// ch gets or sets the alignment character for cells in a column.
|
jtulach@678
|
10371 |
set chOff(chOff) {
|
jtulach@678
|
10372 |
this.setAttribute("chOff", chOff);
|
jtulach@678
|
10373 |
},
|
jtulach@678
|
10374 |
|
jtulach@678
|
10375 |
get chOff() {
|
jtulach@678
|
10376 |
return this.getAttribute("chOff");
|
jtulach@678
|
10377 |
},
|
jtulach@678
|
10378 |
|
jtulach@678
|
10379 |
get vAlign () {
|
jtulach@678
|
10380 |
return this.getAttribute("vAlign");
|
jtulach@678
|
10381 |
},
|
jtulach@678
|
10382 |
|
jtulach@678
|
10383 |
get rows() {
|
jtulach@678
|
10384 |
return new HTMLCollection(this.getElementsByTagName("tr"));
|
jtulach@678
|
10385 |
},
|
jtulach@678
|
10386 |
|
jtulach@678
|
10387 |
insertRow : function (idx) {
|
jtulach@678
|
10388 |
if (idx === undefined) {
|
jtulach@678
|
10389 |
throw new Error("Index omitted in call to HTMLTableSectionElement.insertRow ");
|
jtulach@678
|
10390 |
}
|
jtulach@678
|
10391 |
|
jtulach@678
|
10392 |
var numRows = this.rows.length,
|
jtulach@678
|
10393 |
node = null;
|
jtulach@678
|
10394 |
|
jtulach@678
|
10395 |
if (idx > numRows) {
|
jtulach@678
|
10396 |
throw new Error("Index > rows.length in call to HTMLTableSectionElement.insertRow");
|
jtulach@678
|
10397 |
}
|
jtulach@678
|
10398 |
|
jtulach@678
|
10399 |
var row = document.createElement("tr");
|
jtulach@678
|
10400 |
// If index is -1 or equal to the number of rows,
|
jtulach@678
|
10401 |
// the row is appended as the last row. If index is omitted
|
jtulach@678
|
10402 |
// or greater than the number of rows, an error will result
|
jtulach@678
|
10403 |
if (idx === -1 || idx === numRows) {
|
jtulach@678
|
10404 |
this.appendChild(row);
|
jtulach@678
|
10405 |
} else {
|
jtulach@678
|
10406 |
node = this.firstChild;
|
jtulach@678
|
10407 |
|
jtulach@678
|
10408 |
for (var i=0; i<idx; i++) {
|
jtulach@678
|
10409 |
node = node.nextSibling;
|
jtulach@678
|
10410 |
}
|
jtulach@678
|
10411 |
}
|
jtulach@678
|
10412 |
|
jtulach@678
|
10413 |
this.insertBefore(row, node);
|
jtulach@678
|
10414 |
|
jtulach@678
|
10415 |
return row;
|
jtulach@678
|
10416 |
},
|
jtulach@678
|
10417 |
|
jtulach@678
|
10418 |
deleteRow : function (idx) {
|
jtulach@678
|
10419 |
var elem = this.rows[idx];
|
jtulach@678
|
10420 |
this.removeChild(elem);
|
jtulach@678
|
10421 |
},
|
jtulach@678
|
10422 |
|
jtulach@678
|
10423 |
toString: function() {
|
jtulach@678
|
10424 |
return '[object HTMLTableSectionElement]';
|
jtulach@678
|
10425 |
}
|
jtulach@678
|
10426 |
});
|
jtulach@678
|
10427 |
|
jtulach@678
|
10428 |
/**
|
jtulach@678
|
10429 |
* HTMLTableCellElement
|
jtulach@678
|
10430 |
* base interface for TD and TH
|
jtulach@678
|
10431 |
*
|
jtulach@678
|
10432 |
* HTML5: 4.9.11 Attributes common to td and th elements
|
jtulach@678
|
10433 |
* http://dev.w3.org/html5/spec/Overview.html#htmltablecellelement
|
jtulach@678
|
10434 |
*/
|
jtulach@678
|
10435 |
HTMLTableCellElement = function(ownerDocument) {
|
jtulach@678
|
10436 |
HTMLElement.apply(this, arguments);
|
jtulach@678
|
10437 |
};
|
jtulach@678
|
10438 |
HTMLTableCellElement.prototype = new HTMLElement();
|
jtulach@678
|
10439 |
__extend__(HTMLTableCellElement.prototype, {
|
jtulach@678
|
10440 |
|
jtulach@678
|
10441 |
|
jtulach@678
|
10442 |
// TOOD: attribute unsigned long colSpan;
|
jtulach@678
|
10443 |
// TODO: attribute unsigned long rowSpan;
|
jtulach@678
|
10444 |
// TODO: attribute DOMString headers;
|
jtulach@678
|
10445 |
// TODO: readonly attribute long cellIndex;
|
jtulach@678
|
10446 |
|
jtulach@678
|
10447 |
// Not really necessary but might be helpful in debugging
|
jtulach@678
|
10448 |
toString: function() {
|
jtulach@678
|
10449 |
return '[object HTMLTableCellElement]';
|
jtulach@678
|
10450 |
}
|
jtulach@678
|
10451 |
|
jtulach@678
|
10452 |
});
|
jtulach@678
|
10453 |
|
jtulach@678
|
10454 |
/**
|
jtulach@678
|
10455 |
* HTMLTableDataCellElement
|
jtulach@678
|
10456 |
* HTML5: 4.9.9 The td Element
|
jtulach@678
|
10457 |
* http://dev.w3.org/html5/spec/Overview.html#the-td-element
|
jtulach@678
|
10458 |
*/
|
jtulach@678
|
10459 |
HTMLTableDataCellElement = function(ownerDocument) {
|
jtulach@678
|
10460 |
HTMLElement.apply(this, arguments);
|
jtulach@678
|
10461 |
};
|
jtulach@678
|
10462 |
HTMLTableDataCellElement.prototype = new HTMLTableCellElement();
|
jtulach@678
|
10463 |
__extend__(HTMLTableDataCellElement.prototype, {
|
jtulach@678
|
10464 |
|
jtulach@678
|
10465 |
// adds no new properties or methods
|
jtulach@678
|
10466 |
|
jtulach@678
|
10467 |
toString: function() {
|
jtulach@678
|
10468 |
return '[object HTMLTableDataCellElement]';
|
jtulach@678
|
10469 |
}
|
jtulach@678
|
10470 |
});
|
jtulach@678
|
10471 |
|
jtulach@678
|
10472 |
/**
|
jtulach@678
|
10473 |
* HTMLTableHeaderCellElement
|
jtulach@678
|
10474 |
* HTML5: 4.9.10 The th Element
|
jtulach@678
|
10475 |
* http://dev.w3.org/html5/spec/Overview.html#the-th-element
|
jtulach@678
|
10476 |
*/
|
jtulach@678
|
10477 |
HTMLTableHeaderCellElement = function(ownerDocument) {
|
jtulach@678
|
10478 |
HTMLElement.apply(this, arguments);
|
jtulach@678
|
10479 |
};
|
jtulach@678
|
10480 |
HTMLTableHeaderCellElement.prototype = new HTMLTableCellElement();
|
jtulach@678
|
10481 |
__extend__(HTMLTableHeaderCellElement.prototype, {
|
jtulach@678
|
10482 |
|
jtulach@678
|
10483 |
// TODO: attribute DOMString scope
|
jtulach@678
|
10484 |
|
jtulach@678
|
10485 |
toString: function() {
|
jtulach@678
|
10486 |
return '[object HTMLTableHeaderCellElement]';
|
jtulach@678
|
10487 |
}
|
jtulach@678
|
10488 |
});
|
jtulach@678
|
10489 |
|
jtulach@678
|
10490 |
|
jtulach@678
|
10491 |
/**
|
jtulach@678
|
10492 |
* HTMLTextAreaElement - DOM Level 2
|
jtulach@678
|
10493 |
* HTML5: 4.10.11 The textarea element
|
jtulach@678
|
10494 |
* http://dev.w3.org/html5/spec/Overview.html#the-textarea-element
|
jtulach@678
|
10495 |
*/
|
jtulach@678
|
10496 |
HTMLTextAreaElement = function(ownerDocument) {
|
jtulach@678
|
10497 |
HTMLInputAreaCommon.apply(this, arguments);
|
jtulach@678
|
10498 |
this._rawvalue = null;
|
jtulach@678
|
10499 |
};
|
jtulach@678
|
10500 |
HTMLTextAreaElement.prototype = new HTMLInputAreaCommon();
|
jtulach@678
|
10501 |
__extend__(HTMLTextAreaElement.prototype, {
|
jtulach@678
|
10502 |
get cols(){
|
jtulach@678
|
10503 |
return Number(this.getAttribute('cols')||'-1');
|
jtulach@678
|
10504 |
},
|
jtulach@678
|
10505 |
set cols(value){
|
jtulach@678
|
10506 |
this.setAttribute('cols', value);
|
jtulach@678
|
10507 |
},
|
jtulach@678
|
10508 |
get rows(){
|
jtulach@678
|
10509 |
return Number(this.getAttribute('rows')||'-1');
|
jtulach@678
|
10510 |
},
|
jtulach@678
|
10511 |
set rows(value){
|
jtulach@678
|
10512 |
this.setAttribute('rows', value);
|
jtulach@678
|
10513 |
},
|
jtulach@678
|
10514 |
|
jtulach@678
|
10515 |
/*
|
jtulach@678
|
10516 |
* read-only
|
jtulach@678
|
10517 |
*/
|
jtulach@678
|
10518 |
get type() {
|
jtulach@678
|
10519 |
return this.getAttribute('type') || 'textarea';
|
jtulach@678
|
10520 |
},
|
jtulach@678
|
10521 |
|
jtulach@678
|
10522 |
/**
|
jtulach@678
|
10523 |
* This modifies the text node under the widget
|
jtulach@678
|
10524 |
*/
|
jtulach@678
|
10525 |
get defaultValue() {
|
jtulach@678
|
10526 |
return this.textContent;
|
jtulach@678
|
10527 |
},
|
jtulach@678
|
10528 |
set defaultValue(value) {
|
jtulach@678
|
10529 |
this.textContent = value;
|
jtulach@678
|
10530 |
},
|
jtulach@678
|
10531 |
|
jtulach@678
|
10532 |
/**
|
jtulach@678
|
10533 |
* http://dev.w3.org/html5/spec/Overview.html#concept-textarea-raw-value
|
jtulach@678
|
10534 |
*/
|
jtulach@678
|
10535 |
get value() {
|
jtulach@678
|
10536 |
return (this._rawvalue === null) ? this.defaultValue : this._rawvalue;
|
jtulach@678
|
10537 |
},
|
jtulach@678
|
10538 |
set value(value) {
|
jtulach@678
|
10539 |
this._rawvalue = value;
|
jtulach@678
|
10540 |
},
|
jtulach@678
|
10541 |
toString: function() {
|
jtulach@678
|
10542 |
return '[object HTMLTextAreaElement]';
|
jtulach@678
|
10543 |
}
|
jtulach@678
|
10544 |
});
|
jtulach@678
|
10545 |
|
jtulach@678
|
10546 |
// Named Element Support
|
jtulach@678
|
10547 |
HTMLElement.registerSetAttribute('TEXTAREA', 'name',
|
jtulach@678
|
10548 |
__updateFormForNamedElement__);
|
jtulach@678
|
10549 |
|
jtulach@678
|
10550 |
/**
|
jtulach@678
|
10551 |
* HTMLTitleElement - DOM Level 2
|
jtulach@678
|
10552 |
*
|
jtulach@678
|
10553 |
* HTML5: 4.2.2 The title element
|
jtulach@678
|
10554 |
* http://dev.w3.org/html5/spec/Overview.html#the-title-element-0
|
jtulach@678
|
10555 |
*/
|
jtulach@678
|
10556 |
HTMLTitleElement = function(ownerDocument) {
|
jtulach@678
|
10557 |
HTMLElement.apply(this, arguments);
|
jtulach@678
|
10558 |
};
|
jtulach@678
|
10559 |
HTMLTitleElement.prototype = new HTMLElement();
|
jtulach@678
|
10560 |
__extend__(HTMLTitleElement.prototype, {
|
jtulach@678
|
10561 |
get text() {
|
jtulach@678
|
10562 |
return this.innerText;
|
jtulach@678
|
10563 |
},
|
jtulach@678
|
10564 |
|
jtulach@678
|
10565 |
set text(titleStr) {
|
jtulach@678
|
10566 |
this.textContent = titleStr;
|
jtulach@678
|
10567 |
},
|
jtulach@678
|
10568 |
toString: function() {
|
jtulach@678
|
10569 |
return '[object HTMLTitleElement]';
|
jtulach@678
|
10570 |
}
|
jtulach@678
|
10571 |
});
|
jtulach@678
|
10572 |
|
jtulach@678
|
10573 |
|
jtulach@678
|
10574 |
|
jtulach@678
|
10575 |
/**
|
jtulach@678
|
10576 |
* HTMLRowElement - DOM Level 2
|
jtulach@678
|
10577 |
* Implementation Provided by Steven Wood
|
jtulach@678
|
10578 |
*
|
jtulach@678
|
10579 |
* HTML5: 4.9.8 The tr element
|
jtulach@678
|
10580 |
* http://dev.w3.org/html5/spec/Overview.html#the-tr-element
|
jtulach@678
|
10581 |
*/
|
jtulach@678
|
10582 |
HTMLTableRowElement = function(ownerDocument) {
|
jtulach@678
|
10583 |
HTMLElement.apply(this, arguments);
|
jtulach@678
|
10584 |
};
|
jtulach@678
|
10585 |
HTMLTableRowElement.prototype = new HTMLElement();
|
jtulach@678
|
10586 |
__extend__(HTMLTableRowElement.prototype, {
|
jtulach@678
|
10587 |
|
jtulach@678
|
10588 |
/*appendChild : function (child) {
|
jtulach@678
|
10589 |
|
jtulach@678
|
10590 |
var retVal = Node.prototype.appendChild.apply(this, arguments);
|
jtulach@678
|
10591 |
retVal.cellIndex = this.cells.length -1;
|
jtulach@678
|
10592 |
|
jtulach@678
|
10593 |
return retVal;
|
jtulach@678
|
10594 |
},*/
|
jtulach@678
|
10595 |
// align gets or sets the horizontal alignment of data within cells of the row.
|
jtulach@678
|
10596 |
get align() {
|
jtulach@678
|
10597 |
return this.getAttribute("align");
|
jtulach@678
|
10598 |
},
|
jtulach@678
|
10599 |
|
jtulach@678
|
10600 |
get bgColor() {
|
jtulach@678
|
10601 |
return this.getAttribute("bgcolor");
|
jtulach@678
|
10602 |
},
|
jtulach@678
|
10603 |
|
jtulach@678
|
10604 |
get cells() {
|
jtulach@678
|
10605 |
var nl = this.getElementsByTagName("td");
|
jtulach@678
|
10606 |
return new HTMLCollection(nl);
|
jtulach@678
|
10607 |
},
|
jtulach@678
|
10608 |
|
jtulach@678
|
10609 |
get ch() {
|
jtulach@678
|
10610 |
return this.getAttribute("ch");
|
jtulach@678
|
10611 |
},
|
jtulach@678
|
10612 |
|
jtulach@678
|
10613 |
set ch(ch) {
|
jtulach@678
|
10614 |
this.setAttribute("ch", ch);
|
jtulach@678
|
10615 |
},
|
jtulach@678
|
10616 |
|
jtulach@678
|
10617 |
// ch gets or sets the alignment character for cells in a column.
|
jtulach@678
|
10618 |
set chOff(chOff) {
|
jtulach@678
|
10619 |
this.setAttribute("chOff", chOff);
|
jtulach@678
|
10620 |
},
|
jtulach@678
|
10621 |
|
jtulach@678
|
10622 |
get chOff() {
|
jtulach@678
|
10623 |
return this.getAttribute("chOff");
|
jtulach@678
|
10624 |
},
|
jtulach@678
|
10625 |
|
jtulach@678
|
10626 |
/**
|
jtulach@678
|
10627 |
* http://dev.w3.org/html5/spec/Overview.html#dom-tr-rowindex
|
jtulach@678
|
10628 |
*/
|
jtulach@678
|
10629 |
get rowIndex() {
|
jtulach@678
|
10630 |
var nl = this.parentNode.childNodes;
|
jtulach@678
|
10631 |
for (var i=0; i<nl.length; i++) {
|
jtulach@678
|
10632 |
if (nl[i] === this) {
|
jtulach@678
|
10633 |
return i;
|
jtulach@678
|
10634 |
}
|
jtulach@678
|
10635 |
}
|
jtulach@678
|
10636 |
return -1;
|
jtulach@678
|
10637 |
},
|
jtulach@678
|
10638 |
|
jtulach@678
|
10639 |
/**
|
jtulach@678
|
10640 |
* http://dev.w3.org/html5/spec/Overview.html#dom-tr-sectionrowindex
|
jtulach@678
|
10641 |
*/
|
jtulach@678
|
10642 |
get sectionRowIndex() {
|
jtulach@678
|
10643 |
var nl = this.parentNode.getElementsByTagName(this.tagName);
|
jtulach@678
|
10644 |
for (var i=0; i<nl.length; i++) {
|
jtulach@678
|
10645 |
if (nl[i] === this) {
|
jtulach@678
|
10646 |
return i;
|
jtulach@678
|
10647 |
}
|
jtulach@678
|
10648 |
}
|
jtulach@678
|
10649 |
return -1;
|
jtulach@678
|
10650 |
},
|
jtulach@678
|
10651 |
|
jtulach@678
|
10652 |
get vAlign () {
|
jtulach@678
|
10653 |
return this.getAttribute("vAlign");
|
jtulach@678
|
10654 |
},
|
jtulach@678
|
10655 |
|
jtulach@678
|
10656 |
insertCell : function (idx) {
|
jtulach@678
|
10657 |
if (idx === undefined) {
|
jtulach@678
|
10658 |
throw new Error("Index omitted in call to HTMLTableRow.insertCell");
|
jtulach@678
|
10659 |
}
|
jtulach@678
|
10660 |
|
jtulach@678
|
10661 |
var numCells = this.cells.length,
|
jtulach@678
|
10662 |
node = null;
|
jtulach@678
|
10663 |
|
jtulach@678
|
10664 |
if (idx > numCells) {
|
jtulach@678
|
10665 |
throw new Error("Index > rows.length in call to HTMLTableRow.insertCell");
|
jtulach@678
|
10666 |
}
|
jtulach@678
|
10667 |
|
jtulach@678
|
10668 |
var cell = document.createElement("td");
|
jtulach@678
|
10669 |
|
jtulach@678
|
10670 |
if (idx === -1 || idx === numCells) {
|
jtulach@678
|
10671 |
this.appendChild(cell);
|
jtulach@678
|
10672 |
} else {
|
jtulach@678
|
10673 |
|
jtulach@678
|
10674 |
|
jtulach@678
|
10675 |
node = this.firstChild;
|
jtulach@678
|
10676 |
|
jtulach@678
|
10677 |
for (var i=0; i<idx; i++) {
|
jtulach@678
|
10678 |
node = node.nextSibling;
|
jtulach@678
|
10679 |
}
|
jtulach@678
|
10680 |
}
|
jtulach@678
|
10681 |
|
jtulach@678
|
10682 |
this.insertBefore(cell, node);
|
jtulach@678
|
10683 |
cell.cellIndex = idx;
|
jtulach@678
|
10684 |
|
jtulach@678
|
10685 |
return cell;
|
jtulach@678
|
10686 |
},
|
jtulach@678
|
10687 |
deleteCell : function (idx) {
|
jtulach@678
|
10688 |
var elem = this.cells[idx];
|
jtulach@678
|
10689 |
this.removeChild(elem);
|
jtulach@678
|
10690 |
},
|
jtulach@678
|
10691 |
toString: function() {
|
jtulach@678
|
10692 |
return '[object HTMLTableRowElement]';
|
jtulach@678
|
10693 |
}
|
jtulach@678
|
10694 |
|
jtulach@678
|
10695 |
});
|
jtulach@678
|
10696 |
|
jtulach@678
|
10697 |
/*
|
jtulach@678
|
10698 |
* HTMLUListElement
|
jtulach@678
|
10699 |
* HTML5: 4.5.7 The ul Element
|
jtulach@678
|
10700 |
* http://dev.w3.org/html5/spec/Overview.html#htmlhtmlelement
|
jtulach@678
|
10701 |
*/
|
jtulach@678
|
10702 |
HTMLUListElement = function(ownerDocument) {
|
jtulach@678
|
10703 |
HTMLElement.apply(this, arguments);
|
jtulach@678
|
10704 |
};
|
jtulach@678
|
10705 |
|
jtulach@678
|
10706 |
HTMLUListElement.prototype = new HTMLElement();
|
jtulach@678
|
10707 |
__extend__(HTMLUListElement.prototype, {
|
jtulach@678
|
10708 |
|
jtulach@678
|
10709 |
// no additional properties or elements
|
jtulach@678
|
10710 |
|
jtulach@678
|
10711 |
toString: function() {
|
jtulach@678
|
10712 |
return '[object HTMLUListElement]';
|
jtulach@678
|
10713 |
}
|
jtulach@678
|
10714 |
});
|
jtulach@678
|
10715 |
|
jtulach@678
|
10716 |
|
jtulach@678
|
10717 |
/**
|
jtulach@678
|
10718 |
* HTMLUnknownElement DOM Level 2
|
jtulach@678
|
10719 |
*/
|
jtulach@678
|
10720 |
HTMLUnknownElement = function(ownerDocument) {
|
jtulach@678
|
10721 |
HTMLElement.apply(this, arguments);
|
jtulach@678
|
10722 |
};
|
jtulach@678
|
10723 |
HTMLUnknownElement.prototype = new HTMLElement();
|
jtulach@678
|
10724 |
__extend__(HTMLUnknownElement.prototype,{
|
jtulach@678
|
10725 |
toString: function(){
|
jtulach@678
|
10726 |
return '[object HTMLUnknownElement]';
|
jtulach@678
|
10727 |
}
|
jtulach@678
|
10728 |
});
|
jtulach@678
|
10729 |
|
jtulach@678
|
10730 |
/**
|
jtulach@678
|
10731 |
* @author john resig & the envjs team
|
jtulach@678
|
10732 |
* @uri http://www.envjs.com/
|
jtulach@678
|
10733 |
* @copyright 2008-2010
|
jtulach@678
|
10734 |
* @license MIT
|
jtulach@678
|
10735 |
*/
|
jtulach@678
|
10736 |
//CLOSURE_END
|
jtulach@678
|
10737 |
}());
|
jtulach@678
|
10738 |
|
jtulach@678
|
10739 |
/**
|
jtulach@678
|
10740 |
* DOM Style Level 2
|
jtulach@678
|
10741 |
*/
|
jtulach@678
|
10742 |
var CSS2Properties,
|
jtulach@678
|
10743 |
CSSRule,
|
jtulach@678
|
10744 |
CSSStyleRule,
|
jtulach@678
|
10745 |
CSSImportRule,
|
jtulach@678
|
10746 |
CSSMediaRule,
|
jtulach@678
|
10747 |
CSSFontFaceRule,
|
jtulach@678
|
10748 |
CSSPageRule,
|
jtulach@678
|
10749 |
CSSRuleList,
|
jtulach@678
|
10750 |
CSSStyleSheet,
|
jtulach@678
|
10751 |
StyleSheet,
|
jtulach@678
|
10752 |
StyleSheetList;
|
jtulach@678
|
10753 |
;
|
jtulach@678
|
10754 |
|
jtulach@678
|
10755 |
/*
|
jtulach@678
|
10756 |
* Envjs css.1.2.13
|
jtulach@678
|
10757 |
* Pure JavaScript Browser Environment
|
jtulach@678
|
10758 |
* By John Resig <http://ejohn.org/> and the Envjs Team
|
jtulach@678
|
10759 |
* Copyright 2008-2010 John Resig, under the MIT License
|
jtulach@678
|
10760 |
*/
|
jtulach@678
|
10761 |
|
jtulach@678
|
10762 |
//CLOSURE_START
|
jtulach@678
|
10763 |
(function(){
|
jtulach@678
|
10764 |
|
jtulach@678
|
10765 |
|
jtulach@678
|
10766 |
|
jtulach@678
|
10767 |
|
jtulach@678
|
10768 |
|
jtulach@678
|
10769 |
/**
|
jtulach@678
|
10770 |
* @author john resig
|
jtulach@678
|
10771 |
*/
|
jtulach@678
|
10772 |
// Helper method for extending one object with another.
|
jtulach@678
|
10773 |
function __extend__(a,b) {
|
jtulach@678
|
10774 |
for ( var i in b ) {
|
jtulach@678
|
10775 |
var g = b.__lookupGetter__(i), s = b.__lookupSetter__(i);
|
jtulach@678
|
10776 |
if ( g || s ) {
|
jtulach@678
|
10777 |
if ( g ) { a.__defineGetter__(i, g); }
|
jtulach@678
|
10778 |
if ( s ) { a.__defineSetter__(i, s); }
|
jtulach@678
|
10779 |
} else {
|
jtulach@678
|
10780 |
a[i] = b[i];
|
jtulach@678
|
10781 |
}
|
jtulach@678
|
10782 |
} return a;
|
jtulach@678
|
10783 |
}
|
jtulach@678
|
10784 |
|
jtulach@678
|
10785 |
/**
|
jtulach@678
|
10786 |
* @author john resig
|
jtulach@678
|
10787 |
*/
|
jtulach@678
|
10788 |
//from jQuery
|
jtulach@678
|
10789 |
function __setArray__( target, array ) {
|
jtulach@678
|
10790 |
// Resetting the length to 0, then using the native Array push
|
jtulach@678
|
10791 |
// is a super-fast way to populate an object with array-like properties
|
jtulach@678
|
10792 |
target.length = 0;
|
jtulach@678
|
10793 |
Array.prototype.push.apply( target, array );
|
jtulach@678
|
10794 |
}
|
jtulach@678
|
10795 |
|
jtulach@678
|
10796 |
/**
|
jtulach@678
|
10797 |
* @author ariel flesler
|
jtulach@678
|
10798 |
* http://flesler.blogspot.com/2008/11/fast-trim-function-for-javascript.html
|
jtulach@678
|
10799 |
* @param {Object} str
|
jtulach@678
|
10800 |
*/
|
jtulach@678
|
10801 |
function __trim__( str ){
|
jtulach@678
|
10802 |
return (str || "").replace( /^\s+|\s+$/g, "" );
|
jtulach@678
|
10803 |
}
|
jtulach@678
|
10804 |
|
jtulach@678
|
10805 |
/*
|
jtulach@678
|
10806 |
* Interface DocumentStyle (introduced in DOM Level 2)
|
jtulach@678
|
10807 |
* http://www.w3.org/TR/2000/REC-DOM-Level-2-Style-20001113/stylesheets.html#StyleSheets-StyleSheet-DocumentStyle
|
jtulach@678
|
10808 |
*
|
jtulach@678
|
10809 |
* interface DocumentStyle {
|
jtulach@678
|
10810 |
* readonly attribute StyleSheetList styleSheets;
|
jtulach@678
|
10811 |
* };
|
jtulach@678
|
10812 |
*
|
jtulach@678
|
10813 |
*/
|
jtulach@678
|
10814 |
__extend__(Document.prototype, {
|
jtulach@678
|
10815 |
get styleSheets() {
|
jtulach@678
|
10816 |
if (! this._styleSheets) {
|
jtulach@678
|
10817 |
this._styleSheets = new StyleSheetList();
|
jtulach@678
|
10818 |
}
|
jtulach@678
|
10819 |
return this._styleSheets;
|
jtulach@678
|
10820 |
}
|
jtulach@678
|
10821 |
});
|
jtulach@678
|
10822 |
/*
|
jtulach@678
|
10823 |
* CSS2Properties - DOM Level 2 CSS
|
jtulach@678
|
10824 |
* Renamed to CSSStyleDeclaration??
|
jtulach@678
|
10825 |
*/
|
jtulach@678
|
10826 |
|
jtulach@678
|
10827 |
var __toCamelCase__ = function(name) {
|
jtulach@678
|
10828 |
if (name) {
|
jtulach@678
|
10829 |
return name.replace(/\-(\w)/g, function(all, letter) {
|
jtulach@678
|
10830 |
return letter.toUpperCase();
|
jtulach@678
|
10831 |
});
|
jtulach@678
|
10832 |
}
|
jtulach@678
|
10833 |
return name;
|
jtulach@678
|
10834 |
};
|
jtulach@678
|
10835 |
|
jtulach@678
|
10836 |
var __toDashed__ = function(camelCaseName) {
|
jtulach@678
|
10837 |
if (camelCaseName) {
|
jtulach@678
|
10838 |
return camelCaseName.replace(/[A-Z]/g, function(all) {
|
jtulach@678
|
10839 |
return '-' + all.toLowerCase();
|
jtulach@678
|
10840 |
});
|
jtulach@678
|
10841 |
}
|
jtulach@678
|
10842 |
return camelCaseName;
|
jtulach@678
|
10843 |
};
|
jtulach@678
|
10844 |
|
jtulach@678
|
10845 |
CSS2Properties = function(element){
|
jtulach@678
|
10846 |
//console.log('css2properties %s', __cssproperties__++);
|
jtulach@678
|
10847 |
this.styleIndex = __supportedStyles__;//non-standard
|
jtulach@678
|
10848 |
this.type = element.tagName;//non-standard
|
jtulach@678
|
10849 |
__setArray__(this, []);
|
jtulach@678
|
10850 |
__cssTextToStyles__(this, element.cssText || '');
|
jtulach@678
|
10851 |
};
|
jtulach@678
|
10852 |
__extend__(CSS2Properties.prototype, {
|
jtulach@678
|
10853 |
get cssText() {
|
jtulach@678
|
10854 |
var i, css = [];
|
jtulach@678
|
10855 |
for (i = 0; i < this.length; ++i) {
|
jtulach@678
|
10856 |
css.push(this[i] + ': ' + this.getPropertyValue(this[i]) + ';');
|
jtulach@678
|
10857 |
}
|
jtulach@678
|
10858 |
return css.join(' ');
|
jtulach@678
|
10859 |
},
|
jtulach@678
|
10860 |
set cssText(cssText) {
|
jtulach@678
|
10861 |
__cssTextToStyles__(this, cssText);
|
jtulach@678
|
10862 |
},
|
jtulach@678
|
10863 |
getPropertyCSSValue: function(name) {
|
jtulach@678
|
10864 |
//?
|
jtulach@678
|
10865 |
},
|
jtulach@678
|
10866 |
getPropertyPriority: function() {
|
jtulach@678
|
10867 |
|
jtulach@678
|
10868 |
},
|
jtulach@678
|
10869 |
getPropertyValue: function(name) {
|
jtulach@678
|
10870 |
var index, cname = __toCamelCase__(name);
|
jtulach@678
|
10871 |
if (cname in this.styleIndex) {
|
jtulach@678
|
10872 |
return this[cname];
|
jtulach@678
|
10873 |
} else {
|
jtulach@678
|
10874 |
index = Array.prototype.indexOf.apply(this, [name]);
|
jtulach@678
|
10875 |
if (index > -1) {
|
jtulach@678
|
10876 |
return this[index];
|
jtulach@678
|
10877 |
}
|
jtulach@678
|
10878 |
}
|
jtulach@678
|
10879 |
return null;
|
jtulach@678
|
10880 |
},
|
jtulach@678
|
10881 |
item: function(index) {
|
jtulach@678
|
10882 |
return this[index];
|
jtulach@678
|
10883 |
},
|
jtulach@678
|
10884 |
removeProperty: function(name) {
|
jtulach@678
|
10885 |
this.styleIndex[name] = null;
|
jtulach@678
|
10886 |
name = __toDashed__(name);
|
jtulach@678
|
10887 |
var index = Array.prototype.indexOf.apply(this, [name]);
|
jtulach@678
|
10888 |
if (index > -1) {
|
jtulach@678
|
10889 |
Array.prototype.splice.apply(this, [1,index]);
|
jtulach@678
|
10890 |
}
|
jtulach@678
|
10891 |
},
|
jtulach@678
|
10892 |
setProperty: function(name, value, priority) {
|
jtulach@678
|
10893 |
var nval;
|
jtulach@678
|
10894 |
name = __toCamelCase__(name);
|
jtulach@678
|
10895 |
if (value !== undefined && name in this.styleIndex) {
|
jtulach@678
|
10896 |
// NOTE: parseFloat('300px') ==> 300 no
|
jtulach@678
|
10897 |
// NOTE: Number('300px') ==> Nan yes
|
jtulach@678
|
10898 |
nval = Number(value);
|
jtulach@678
|
10899 |
this.styleIndex[name] = isNaN(nval) ? value : nval;
|
jtulach@678
|
10900 |
name = __toDashed__(name);
|
jtulach@678
|
10901 |
if (Array.prototype.indexOf.apply(this, [name]) === -1 ){
|
jtulach@678
|
10902 |
Array.prototype.push.apply(this,[name]);
|
jtulach@678
|
10903 |
}
|
jtulach@678
|
10904 |
}
|
jtulach@678
|
10905 |
},
|
jtulach@678
|
10906 |
toString: function() {
|
jtulach@678
|
10907 |
return '[object CSS2Properties]';
|
jtulach@678
|
10908 |
}
|
jtulach@678
|
10909 |
});
|
jtulach@678
|
10910 |
|
jtulach@678
|
10911 |
|
jtulach@678
|
10912 |
|
jtulach@678
|
10913 |
var __cssTextToStyles__ = function(css2props, cssText) {
|
jtulach@678
|
10914 |
//console.log('__cssTextToStyles__ %s %s', css2props, cssText);
|
jtulach@678
|
10915 |
//var styleArray=[];
|
jtulach@678
|
10916 |
var i, style, styles = cssText.split(';');
|
jtulach@678
|
10917 |
for (i = 0; i < styles.length; ++i) {
|
jtulach@678
|
10918 |
style = styles[i].split(':');
|
jtulach@678
|
10919 |
if (style.length === 2) {
|
jtulach@678
|
10920 |
css2props.setProperty(style[0].replace(' ', '', 'g'),
|
jtulach@678
|
10921 |
style[1].replace(' ', '', 'g'));
|
jtulach@678
|
10922 |
}
|
jtulach@678
|
10923 |
}
|
jtulach@678
|
10924 |
};
|
jtulach@678
|
10925 |
|
jtulach@678
|
10926 |
//Obviously these arent all supported but by commenting out various
|
jtulach@678
|
10927 |
//sections this provides a single location to configure what is
|
jtulach@678
|
10928 |
//exposed as supported.
|
jtulach@678
|
10929 |
var __supportedStyles__ = {
|
jtulach@678
|
10930 |
azimuth: null,
|
jtulach@678
|
10931 |
background: null,
|
jtulach@678
|
10932 |
backgroundAttachment: null,
|
jtulach@678
|
10933 |
backgroundColor: 'rgb(0,0,0)',
|
jtulach@678
|
10934 |
backgroundImage: null,
|
jtulach@678
|
10935 |
backgroundPosition: null,
|
jtulach@678
|
10936 |
backgroundRepeat: null,
|
jtulach@678
|
10937 |
border: null,
|
jtulach@678
|
10938 |
borderBottom: null,
|
jtulach@678
|
10939 |
borderBottomColor: null,
|
jtulach@678
|
10940 |
borderBottomStyle: null,
|
jtulach@678
|
10941 |
borderBottomWidth: null,
|
jtulach@678
|
10942 |
borderCollapse: null,
|
jtulach@678
|
10943 |
borderColor: null,
|
jtulach@678
|
10944 |
borderLeft: null,
|
jtulach@678
|
10945 |
borderLeftColor: null,
|
jtulach@678
|
10946 |
borderLeftStyle: null,
|
jtulach@678
|
10947 |
borderLeftWidth: null,
|
jtulach@678
|
10948 |
borderRight: null,
|
jtulach@678
|
10949 |
borderRightColor: null,
|
jtulach@678
|
10950 |
borderRightStyle: null,
|
jtulach@678
|
10951 |
borderRightWidth: null,
|
jtulach@678
|
10952 |
borderSpacing: null,
|
jtulach@678
|
10953 |
borderStyle: null,
|
jtulach@678
|
10954 |
borderTop: null,
|
jtulach@678
|
10955 |
borderTopColor: null,
|
jtulach@678
|
10956 |
borderTopStyle: null,
|
jtulach@678
|
10957 |
borderTopWidth: null,
|
jtulach@678
|
10958 |
borderWidth: null,
|
jtulach@678
|
10959 |
bottom: null,
|
jtulach@678
|
10960 |
captionSide: null,
|
jtulach@678
|
10961 |
clear: null,
|
jtulach@678
|
10962 |
clip: null,
|
jtulach@678
|
10963 |
color: null,
|
jtulach@678
|
10964 |
content: null,
|
jtulach@678
|
10965 |
counterIncrement: null,
|
jtulach@678
|
10966 |
counterReset: null,
|
jtulach@678
|
10967 |
cssFloat: null,
|
jtulach@678
|
10968 |
cue: null,
|
jtulach@678
|
10969 |
cueAfter: null,
|
jtulach@678
|
10970 |
cueBefore: null,
|
jtulach@678
|
10971 |
cursor: null,
|
jtulach@678
|
10972 |
direction: 'ltr',
|
jtulach@678
|
10973 |
display: null,
|
jtulach@678
|
10974 |
elevation: null,
|
jtulach@678
|
10975 |
emptyCells: null,
|
jtulach@678
|
10976 |
font: null,
|
jtulach@678
|
10977 |
fontFamily: null,
|
jtulach@678
|
10978 |
fontSize: '1em',
|
jtulach@678
|
10979 |
fontSizeAdjust: null,
|
jtulach@678
|
10980 |
fontStretch: null,
|
jtulach@678
|
10981 |
fontStyle: null,
|
jtulach@678
|
10982 |
fontVariant: null,
|
jtulach@678
|
10983 |
fontWeight: null,
|
jtulach@678
|
10984 |
height: '',
|
jtulach@678
|
10985 |
left: null,
|
jtulach@678
|
10986 |
letterSpacing: null,
|
jtulach@678
|
10987 |
lineHeight: null,
|
jtulach@678
|
10988 |
listStyle: null,
|
jtulach@678
|
10989 |
listStyleImage: null,
|
jtulach@678
|
10990 |
listStylePosition: null,
|
jtulach@678
|
10991 |
listStyleType: null,
|
jtulach@678
|
10992 |
margin: null,
|
jtulach@678
|
10993 |
marginBottom: '0px',
|
jtulach@678
|
10994 |
marginLeft: '0px',
|
jtulach@678
|
10995 |
marginRight: '0px',
|
jtulach@678
|
10996 |
marginTop: '0px',
|
jtulach@678
|
10997 |
markerOffset: null,
|
jtulach@678
|
10998 |
marks: null,
|
jtulach@678
|
10999 |
maxHeight: null,
|
jtulach@678
|
11000 |
maxWidth: null,
|
jtulach@678
|
11001 |
minHeight: null,
|
jtulach@678
|
11002 |
minWidth: null,
|
jtulach@678
|
11003 |
opacity: 1,
|
jtulach@678
|
11004 |
orphans: null,
|
jtulach@678
|
11005 |
outline: null,
|
jtulach@678
|
11006 |
outlineColor: null,
|
jtulach@678
|
11007 |
outlineOffset: null,
|
jtulach@678
|
11008 |
outlineStyle: null,
|
jtulach@678
|
11009 |
outlineWidth: null,
|
jtulach@678
|
11010 |
overflow: null,
|
jtulach@678
|
11011 |
overflowX: null,
|
jtulach@678
|
11012 |
overflowY: null,
|
jtulach@678
|
11013 |
padding: null,
|
jtulach@678
|
11014 |
paddingBottom: '0px',
|
jtulach@678
|
11015 |
paddingLeft: '0px',
|
jtulach@678
|
11016 |
paddingRight: '0px',
|
jtulach@678
|
11017 |
paddingTop: '0px',
|
jtulach@678
|
11018 |
page: null,
|
jtulach@678
|
11019 |
pageBreakAfter: null,
|
jtulach@678
|
11020 |
pageBreakBefore: null,
|
jtulach@678
|
11021 |
pageBreakInside: null,
|
jtulach@678
|
11022 |
pause: null,
|
jtulach@678
|
11023 |
pauseAfter: null,
|
jtulach@678
|
11024 |
pauseBefore: null,
|
jtulach@678
|
11025 |
pitch: null,
|
jtulach@678
|
11026 |
pitchRange: null,
|
jtulach@678
|
11027 |
position: null,
|
jtulach@678
|
11028 |
quotes: null,
|
jtulach@678
|
11029 |
richness: null,
|
jtulach@678
|
11030 |
right: null,
|
jtulach@678
|
11031 |
size: null,
|
jtulach@678
|
11032 |
speak: null,
|
jtulach@678
|
11033 |
speakHeader: null,
|
jtulach@678
|
11034 |
speakNumeral: null,
|
jtulach@678
|
11035 |
speakPunctuation: null,
|
jtulach@678
|
11036 |
speechRate: null,
|
jtulach@678
|
11037 |
stress: null,
|
jtulach@678
|
11038 |
tableLayout: null,
|
jtulach@678
|
11039 |
textAlign: null,
|
jtulach@678
|
11040 |
textDecoration: null,
|
jtulach@678
|
11041 |
textIndent: null,
|
jtulach@678
|
11042 |
textShadow: null,
|
jtulach@678
|
11043 |
textTransform: null,
|
jtulach@678
|
11044 |
top: null,
|
jtulach@678
|
11045 |
unicodeBidi: null,
|
jtulach@678
|
11046 |
verticalAlign: null,
|
jtulach@678
|
11047 |
visibility: '',
|
jtulach@678
|
11048 |
voiceFamily: null,
|
jtulach@678
|
11049 |
volume: null,
|
jtulach@678
|
11050 |
whiteSpace: null,
|
jtulach@678
|
11051 |
widows: null,
|
jtulach@678
|
11052 |
width: '1px',
|
jtulach@678
|
11053 |
wordSpacing: null,
|
jtulach@678
|
11054 |
zIndex: 1
|
jtulach@678
|
11055 |
};
|
jtulach@678
|
11056 |
|
jtulach@678
|
11057 |
var __displayMap__ = {
|
jtulach@678
|
11058 |
DIV : 'block',
|
jtulach@678
|
11059 |
P : 'block',
|
jtulach@678
|
11060 |
A : 'inline',
|
jtulach@678
|
11061 |
CODE : 'inline',
|
jtulach@678
|
11062 |
PRE : 'block',
|
jtulach@678
|
11063 |
SPAN : 'inline',
|
jtulach@678
|
11064 |
TABLE : 'table',
|
jtulach@678
|
11065 |
THEAD : 'table-header-group',
|
jtulach@678
|
11066 |
TBODY : 'table-row-group',
|
jtulach@678
|
11067 |
TR : 'table-row',
|
jtulach@678
|
11068 |
TH : 'table-cell',
|
jtulach@678
|
11069 |
TD : 'table-cell',
|
jtulach@678
|
11070 |
UL : 'block',
|
jtulach@678
|
11071 |
LI : 'list-item'
|
jtulach@678
|
11072 |
};
|
jtulach@678
|
11073 |
|
jtulach@678
|
11074 |
for (var style in __supportedStyles__) {
|
jtulach@678
|
11075 |
if (__supportedStyles__.hasOwnProperty(style)) {
|
jtulach@678
|
11076 |
(function(name) {
|
jtulach@678
|
11077 |
if (name === 'width' || name === 'height') {
|
jtulach@678
|
11078 |
CSS2Properties.prototype.__defineGetter__(name, function() {
|
jtulach@678
|
11079 |
if (this.display === 'none'){
|
jtulach@678
|
11080 |
return '0px';
|
jtulach@678
|
11081 |
}
|
jtulach@678
|
11082 |
return this.styleIndex[name];
|
jtulach@678
|
11083 |
});
|
jtulach@678
|
11084 |
} else if (name === 'display') {
|
jtulach@678
|
11085 |
//display will be set to a tagName specific value if ''
|
jtulach@678
|
11086 |
CSS2Properties.prototype.__defineGetter__(name, function() {
|
jtulach@678
|
11087 |
var val = this.styleIndex[name];
|
jtulach@678
|
11088 |
val = val ? val :__displayMap__[this.type];
|
jtulach@678
|
11089 |
return val;
|
jtulach@678
|
11090 |
});
|
jtulach@678
|
11091 |
} else {
|
jtulach@678
|
11092 |
CSS2Properties.prototype.__defineGetter__(name, function() {
|
jtulach@678
|
11093 |
return this.styleIndex[name];
|
jtulach@678
|
11094 |
});
|
jtulach@678
|
11095 |
}
|
jtulach@678
|
11096 |
CSS2Properties.prototype.__defineSetter__(name, function(value) {
|
jtulach@678
|
11097 |
this.setProperty(name, value);
|
jtulach@678
|
11098 |
});
|
jtulach@678
|
11099 |
}(style));
|
jtulach@678
|
11100 |
}
|
jtulach@678
|
11101 |
}
|
jtulach@678
|
11102 |
|
jtulach@678
|
11103 |
/*
|
jtulach@678
|
11104 |
* CSSRule - DOM Level 2
|
jtulach@678
|
11105 |
*/
|
jtulach@678
|
11106 |
CSSRule = function(options) {
|
jtulach@678
|
11107 |
|
jtulach@678
|
11108 |
|
jtulach@678
|
11109 |
|
jtulach@678
|
11110 |
var $style,
|
jtulach@678
|
11111 |
$selectorText = options.selectorText ? options.selectorText : '';
|
jtulach@678
|
11112 |
$style = new CSS2Properties({
|
jtulach@678
|
11113 |
cssText: options.cssText ? options.cssText : null
|
jtulach@678
|
11114 |
});
|
jtulach@678
|
11115 |
|
jtulach@678
|
11116 |
return __extend__(this, {
|
jtulach@678
|
11117 |
get style(){
|
jtulach@678
|
11118 |
return $style;
|
jtulach@678
|
11119 |
},
|
jtulach@678
|
11120 |
get selectorText(){
|
jtulach@678
|
11121 |
return $selectorText;
|
jtulach@678
|
11122 |
},
|
jtulach@678
|
11123 |
set selectorText(selectorText){
|
jtulach@678
|
11124 |
$selectorText = selectorText;
|
jtulach@678
|
11125 |
},
|
jtulach@678
|
11126 |
toString : function(){
|
jtulach@678
|
11127 |
return "[object CSSRule]";
|
jtulach@678
|
11128 |
}
|
jtulach@678
|
11129 |
});
|
jtulach@678
|
11130 |
};
|
jtulach@678
|
11131 |
CSSRule.STYLE_RULE = 1;
|
jtulach@678
|
11132 |
CSSRule.IMPORT_RULE = 3;
|
jtulach@678
|
11133 |
CSSRule.MEDIA_RULE = 4;
|
jtulach@678
|
11134 |
CSSRule.FONT_FACE_RULE = 5;
|
jtulach@678
|
11135 |
CSSRule.PAGE_RULE = 6;
|
jtulach@678
|
11136 |
//CSSRule.NAMESPACE_RULE = 10;
|
jtulach@678
|
11137 |
|
jtulach@678
|
11138 |
|
jtulach@678
|
11139 |
CSSStyleRule = function() {
|
jtulach@678
|
11140 |
|
jtulach@678
|
11141 |
};
|
jtulach@678
|
11142 |
|
jtulach@678
|
11143 |
CSSImportRule = function() {
|
jtulach@678
|
11144 |
|
jtulach@678
|
11145 |
};
|
jtulach@678
|
11146 |
|
jtulach@678
|
11147 |
CSSMediaRule = function() {
|
jtulach@678
|
11148 |
|
jtulach@678
|
11149 |
};
|
jtulach@678
|
11150 |
|
jtulach@678
|
11151 |
CSSFontFaceRule = function() {
|
jtulach@678
|
11152 |
|
jtulach@678
|
11153 |
};
|
jtulach@678
|
11154 |
|
jtulach@678
|
11155 |
CSSPageRule = function() {
|
jtulach@678
|
11156 |
|
jtulach@678
|
11157 |
};
|
jtulach@678
|
11158 |
|
jtulach@678
|
11159 |
|
jtulach@678
|
11160 |
CSSRuleList = function(data) {
|
jtulach@678
|
11161 |
this.length = 0;
|
jtulach@678
|
11162 |
__setArray__(this, data);
|
jtulach@678
|
11163 |
};
|
jtulach@678
|
11164 |
|
jtulach@678
|
11165 |
__extend__(CSSRuleList.prototype, {
|
jtulach@678
|
11166 |
item : function(index) {
|
jtulach@678
|
11167 |
if ((index >= 0) && (index < this.length)) {
|
jtulach@678
|
11168 |
// bounds check
|
jtulach@678
|
11169 |
return this[index];
|
jtulach@678
|
11170 |
}
|
jtulach@678
|
11171 |
return null;
|
jtulach@678
|
11172 |
},
|
jtulach@678
|
11173 |
toString: function() {
|
jtulach@678
|
11174 |
return '[object CSSRuleList]';
|
jtulach@678
|
11175 |
}
|
jtulach@678
|
11176 |
});
|
jtulach@678
|
11177 |
|
jtulach@678
|
11178 |
/**
|
jtulach@678
|
11179 |
* StyleSheet
|
jtulach@678
|
11180 |
* http://dev.w3.org/csswg/cssom/#stylesheet
|
jtulach@678
|
11181 |
*
|
jtulach@678
|
11182 |
* interface StyleSheet {
|
jtulach@678
|
11183 |
* readonly attribute DOMString type;
|
jtulach@678
|
11184 |
* readonly attribute DOMString href;
|
jtulach@678
|
11185 |
* readonly attribute Node ownerNode;
|
jtulach@678
|
11186 |
* readonly attribute StyleSheet parentStyleSheet;
|
jtulach@678
|
11187 |
* readonly attribute DOMString title;
|
jtulach@678
|
11188 |
* [PutForwards=mediaText] readonly attribute MediaList media;
|
jtulach@678
|
11189 |
* attribute boolean disabled;
|
jtulach@678
|
11190 |
* };
|
jtulach@678
|
11191 |
*/
|
jtulach@678
|
11192 |
StyleSheet = function() {
|
jtulach@678
|
11193 |
}
|
jtulach@678
|
11194 |
|
jtulach@678
|
11195 |
/*
|
jtulach@678
|
11196 |
* CSSStyleSheet
|
jtulach@678
|
11197 |
* http://dev.w3.org/csswg/cssom/#cssstylesheet
|
jtulach@678
|
11198 |
*
|
jtulach@678
|
11199 |
* interface CSSStyleSheet : StyleSheet {
|
jtulach@678
|
11200 |
* readonly attribute CSSRule ownerRule;
|
jtulach@678
|
11201 |
* readonly attribute CSSRuleList cssRules;
|
jtulach@678
|
11202 |
* unsigned long insertRule(DOMString rule, unsigned long index);
|
jtulach@678
|
11203 |
* void deleteRule(unsigned long index);
|
jtulach@678
|
11204 |
* };
|
jtulach@678
|
11205 |
*/
|
jtulach@678
|
11206 |
CSSStyleSheet = function(options){
|
jtulach@678
|
11207 |
var $cssRules,
|
jtulach@678
|
11208 |
$disabled = options.disabled ? options.disabled : false,
|
jtulach@678
|
11209 |
$href = options.href ? options.href : null,
|
jtulach@678
|
11210 |
$parentStyleSheet = options.parentStyleSheet ? options.parentStyleSheet : null,
|
jtulach@678
|
11211 |
$title = options.title ? options.title : "",
|
jtulach@678
|
11212 |
$type = "text/css";
|
jtulach@678
|
11213 |
|
jtulach@678
|
11214 |
function parseStyleSheet(text){
|
jtulach@678
|
11215 |
//$debug("parsing css");
|
jtulach@678
|
11216 |
//this is pretty ugly, but text is the entire text of a stylesheet
|
jtulach@678
|
11217 |
var cssRules = [];
|
jtulach@678
|
11218 |
if (!text) {
|
jtulach@678
|
11219 |
text = '';
|
jtulach@678
|
11220 |
}
|
jtulach@678
|
11221 |
text = __trim__(text.replace(/\/\*(\r|\n|.)*\*\//g,""));
|
jtulach@678
|
11222 |
// TODO: @import
|
jtulach@678
|
11223 |
var blocks = text.split("}");
|
jtulach@678
|
11224 |
blocks.pop();
|
jtulach@678
|
11225 |
var i, j, len = blocks.length;
|
jtulach@678
|
11226 |
var definition_block, properties, selectors;
|
jtulach@678
|
11227 |
for (i=0; i<len; i++) {
|
jtulach@678
|
11228 |
definition_block = blocks[i].split("{");
|
jtulach@678
|
11229 |
if (definition_block.length === 2) {
|
jtulach@678
|
11230 |
selectors = definition_block[0].split(",");
|
jtulach@678
|
11231 |
for (j=0; j<selectors.length; j++) {
|
jtulach@678
|
11232 |
cssRules.push(new CSSRule({
|
jtulach@678
|
11233 |
selectorText : __trim__(selectors[j]),
|
jtulach@678
|
11234 |
cssText : definition_block[1]
|
jtulach@678
|
11235 |
}));
|
jtulach@678
|
11236 |
}
|
jtulach@678
|
11237 |
}
|
jtulach@678
|
11238 |
}
|
jtulach@678
|
11239 |
return cssRules;
|
jtulach@678
|
11240 |
}
|
jtulach@678
|
11241 |
|
jtulach@678
|
11242 |
$cssRules = new CSSRuleList(parseStyleSheet(options.textContent));
|
jtulach@678
|
11243 |
|
jtulach@678
|
11244 |
return __extend__(this, {
|
jtulach@678
|
11245 |
get cssRules(){
|
jtulach@678
|
11246 |
return $cssRules;
|
jtulach@678
|
11247 |
},
|
jtulach@678
|
11248 |
get rule(){
|
jtulach@678
|
11249 |
return $cssRules;
|
jtulach@678
|
11250 |
},//IE - may be deprecated
|
jtulach@678
|
11251 |
get href(){
|
jtulach@678
|
11252 |
return $href;
|
jtulach@678
|
11253 |
},
|
jtulach@678
|
11254 |
get parentStyleSheet(){
|
jtulach@678
|
11255 |
return $parentStyleSheet;
|
jtulach@678
|
11256 |
},
|
jtulach@678
|
11257 |
get title(){
|
jtulach@678
|
11258 |
return $title;
|
jtulach@678
|
11259 |
},
|
jtulach@678
|
11260 |
get type(){
|
jtulach@678
|
11261 |
return $type;
|
jtulach@678
|
11262 |
},
|
jtulach@678
|
11263 |
addRule: function(selector, style, index){/*TODO*/},
|
jtulach@678
|
11264 |
deleteRule: function(index){/*TODO*/},
|
jtulach@678
|
11265 |
insertRule: function(rule, index){/*TODO*/},
|
jtulach@678
|
11266 |
//IE - may be deprecated
|
jtulach@678
|
11267 |
removeRule: function(index){
|
jtulach@678
|
11268 |
this.deleteRule(index);
|
jtulach@678
|
11269 |
}
|
jtulach@678
|
11270 |
});
|
jtulach@678
|
11271 |
};
|
jtulach@678
|
11272 |
|
jtulach@678
|
11273 |
StyleSheetList = function() {
|
jtulach@678
|
11274 |
}
|
jtulach@678
|
11275 |
StyleSheetList.prototype = new Array();
|
jtulach@678
|
11276 |
__extend__(StyleSheetList.prototype, {
|
jtulach@678
|
11277 |
item : function(index) {
|
jtulach@678
|
11278 |
if ((index >= 0) && (index < this.length)) {
|
jtulach@678
|
11279 |
// bounds check
|
jtulach@678
|
11280 |
return this[index];
|
jtulach@678
|
11281 |
}
|
jtulach@678
|
11282 |
return null;
|
jtulach@678
|
11283 |
},
|
jtulach@678
|
11284 |
toString: function() {
|
jtulach@678
|
11285 |
return '[object StyleSheetList]';
|
jtulach@678
|
11286 |
}
|
jtulach@678
|
11287 |
});
|
jtulach@678
|
11288 |
/**
|
jtulach@678
|
11289 |
* This extends HTMLElement to handle CSS-specific interfaces.
|
jtulach@678
|
11290 |
*
|
jtulach@678
|
11291 |
* More work / research would be needed to extend just (DOM) Element
|
jtulach@678
|
11292 |
* for xml use and additional changes for just HTMLElement.
|
jtulach@678
|
11293 |
*/
|
jtulach@678
|
11294 |
|
jtulach@678
|
11295 |
|
jtulach@678
|
11296 |
/**
|
jtulach@678
|
11297 |
* Replace or add the getter for 'style'
|
jtulach@678
|
11298 |
*
|
jtulach@678
|
11299 |
* This could be wrapped in a closure
|
jtulach@678
|
11300 |
*/
|
jtulach@678
|
11301 |
var $css2properties = [{}];
|
jtulach@678
|
11302 |
|
jtulach@678
|
11303 |
__extend__(HTMLElement.prototype, {
|
jtulach@678
|
11304 |
get style(){
|
jtulach@678
|
11305 |
if ( !this.css2uuid ) {
|
jtulach@678
|
11306 |
this.css2uuid = $css2properties.length;
|
jtulach@678
|
11307 |
$css2properties[this.css2uuid] = new CSS2Properties(this);
|
jtulach@678
|
11308 |
}
|
jtulach@678
|
11309 |
return $css2properties[this.css2uuid];
|
jtulach@678
|
11310 |
},
|
jtulach@678
|
11311 |
});
|
jtulach@678
|
11312 |
|
jtulach@678
|
11313 |
/**
|
jtulach@678
|
11314 |
* Change for how 'setAttribute("style", ...)' works
|
jtulach@678
|
11315 |
*
|
jtulach@678
|
11316 |
* We are truly adding functionality to HtmlElement.setAttribute, not
|
jtulach@678
|
11317 |
* replacing it. So we need to save the old one first, call it, then
|
jtulach@678
|
11318 |
* do our stuff. If we need to do more hacks like this, HTMLElement
|
jtulach@678
|
11319 |
* (or regular Element) needs to have a hooks array or dispatch table
|
jtulach@678
|
11320 |
* for global changes.
|
jtulach@678
|
11321 |
*
|
jtulach@678
|
11322 |
* This could be wrapped in a closure if desired.
|
jtulach@678
|
11323 |
*/
|
jtulach@678
|
11324 |
var updateCss2Props = function(elem, values) {
|
jtulach@678
|
11325 |
//console.log('__updateCss2Props__ %s %s', elem, values);
|
jtulach@678
|
11326 |
if ( !elem.css2uuid ) {
|
jtulach@678
|
11327 |
elem.css2uuid = $css2properties.length;
|
jtulach@678
|
11328 |
$css2properties[elem.css2uuid] = new CSS2Properties(elem);
|
jtulach@678
|
11329 |
}
|
jtulach@678
|
11330 |
__cssTextToStyles__($css2properties[elem.css2uuid], values);
|
jtulach@678
|
11331 |
}
|
jtulach@678
|
11332 |
|
jtulach@678
|
11333 |
var origSetAttribute = HTMLElement.prototype.setAttribute;
|
jtulach@678
|
11334 |
|
jtulach@678
|
11335 |
HTMLElement.prototype.setAttribute = function(name, value) {
|
jtulach@678
|
11336 |
//console.log("CSS set attribute: " + name + ", " + value);
|
jtulach@678
|
11337 |
origSetAttribute.apply(this, arguments);
|
jtulach@678
|
11338 |
if (name === "style") {
|
jtulach@678
|
11339 |
updateCss2Props(this, value);
|
jtulach@678
|
11340 |
}
|
jtulach@678
|
11341 |
}
|
jtulach@678
|
11342 |
|
jtulach@678
|
11343 |
/**
|
jtulach@678
|
11344 |
* @author john resig & the envjs team
|
jtulach@678
|
11345 |
* @uri http://www.envjs.com/
|
jtulach@678
|
11346 |
* @copyright 2008-2010
|
jtulach@678
|
11347 |
* @license MIT
|
jtulach@678
|
11348 |
*/
|
jtulach@678
|
11349 |
//CLOSURE_END
|
jtulach@678
|
11350 |
}());
|
jtulach@678
|
11351 |
|
jtulach@678
|
11352 |
//these are both non-standard globals that
|
jtulach@678
|
11353 |
//provide static namespaces and functions
|
jtulach@678
|
11354 |
//to support the html 5 parser from nu.
|
jtulach@678
|
11355 |
var XMLParser = {},
|
jtulach@678
|
11356 |
HTMLParser = {};
|
jtulach@678
|
11357 |
|
jtulach@678
|
11358 |
|
jtulach@678
|
11359 |
/*
|
jtulach@678
|
11360 |
* Envjs parser.1.2.13
|
jtulach@678
|
11361 |
* Pure JavaScript Browser Environment
|
jtulach@678
|
11362 |
* By John Resig <http://ejohn.org/> and the Envjs Team
|
jtulach@678
|
11363 |
* Copyright 2008-2010 John Resig, under the MIT License
|
jtulach@678
|
11364 |
*/
|
jtulach@678
|
11365 |
|
jtulach@678
|
11366 |
//CLOSURE_START
|
jtulach@678
|
11367 |
(function(){
|
jtulach@678
|
11368 |
|
jtulach@678
|
11369 |
|
jtulach@678
|
11370 |
|
jtulach@678
|
11371 |
|
jtulach@678
|
11372 |
|
jtulach@678
|
11373 |
/**
|
jtulach@678
|
11374 |
* @author john resig
|
jtulach@678
|
11375 |
*/
|
jtulach@678
|
11376 |
// Helper method for extending one object with another.
|
jtulach@678
|
11377 |
function __extend__(a,b) {
|
jtulach@678
|
11378 |
for ( var i in b ) {
|
jtulach@678
|
11379 |
var g = b.__lookupGetter__(i), s = b.__lookupSetter__(i);
|
jtulach@678
|
11380 |
if ( g || s ) {
|
jtulach@678
|
11381 |
if ( g ) { a.__defineGetter__(i, g); }
|
jtulach@678
|
11382 |
if ( s ) { a.__defineSetter__(i, s); }
|
jtulach@678
|
11383 |
} else {
|
jtulach@678
|
11384 |
a[i] = b[i];
|
jtulach@678
|
11385 |
}
|
jtulach@678
|
11386 |
} return a;
|
jtulach@678
|
11387 |
}
|
jtulach@678
|
11388 |
|
jtulach@678
|
11389 |
/**
|
jtulach@678
|
11390 |
* @author john resig
|
jtulach@678
|
11391 |
*/
|
jtulach@678
|
11392 |
//from jQuery
|
jtulach@678
|
11393 |
function __setArray__( target, array ) {
|
jtulach@678
|
11394 |
// Resetting the length to 0, then using the native Array push
|
jtulach@678
|
11395 |
// is a super-fast way to populate an object with array-like properties
|
jtulach@678
|
11396 |
target.length = 0;
|
jtulach@678
|
11397 |
Array.prototype.push.apply( target, array );
|
jtulach@678
|
11398 |
}
|
jtulach@678
|
11399 |
var __defineParser__;
|
jtulach@678
|
11400 |
(function () {var $gwt_version = "1.5.1";var $wnd = {};var $doc = {};var $moduleName, $moduleBase;var $stats = $wnd.__gwtStatsEvent ? function(a) {$wnd.__gwtStatsEvent(a)} : null;var _, N8000000000000000_longLit = [0, -9223372036854775808], P1000000_longLit = [16777216, 0], P7fffffffffffffff_longLit = [4294967295, 9223372032559808512];
|
jtulach@678
|
11401 |
function equals_1(other){
|
jtulach@678
|
11402 |
return (this == null?null:this) === (other == null?null:other);
|
jtulach@678
|
11403 |
}
|
jtulach@678
|
11404 |
|
jtulach@678
|
11405 |
function getClass_13(){
|
jtulach@678
|
11406 |
return Ljava_lang_Object_2_classLit;
|
jtulach@678
|
11407 |
}
|
jtulach@678
|
11408 |
|
jtulach@678
|
11409 |
function hashCode_2(){
|
jtulach@678
|
11410 |
return this.$H || (this.$H = ++sNextHashId);
|
jtulach@678
|
11411 |
}
|
jtulach@678
|
11412 |
|
jtulach@678
|
11413 |
function toString_3(){
|
jtulach@678
|
11414 |
return (this.typeMarker$ == nullMethod || this.typeId$ == 2?this.getClass$():Lcom_google_gwt_core_client_JavaScriptObject_2_classLit).typeName + '@' + toPowerOfTwoString(this.typeMarker$ == nullMethod || this.typeId$ == 2?this.hashCode$():this.$H || (this.$H = ++sNextHashId), 4);
|
jtulach@678
|
11415 |
}
|
jtulach@678
|
11416 |
|
jtulach@678
|
11417 |
function Object_0(){
|
jtulach@678
|
11418 |
}
|
jtulach@678
|
11419 |
|
jtulach@678
|
11420 |
_ = Object_0.prototype = {};
|
jtulach@678
|
11421 |
_.equals$ = equals_1;
|
jtulach@678
|
11422 |
_.getClass$ = getClass_13;
|
jtulach@678
|
11423 |
_.hashCode$ = hashCode_2;
|
jtulach@678
|
11424 |
_.toString$ = toString_3;
|
jtulach@678
|
11425 |
_.toString = function(){
|
jtulach@678
|
11426 |
return this.toString$();
|
jtulach@678
|
11427 |
}
|
jtulach@678
|
11428 |
;
|
jtulach@678
|
11429 |
_.typeMarker$ = nullMethod;
|
jtulach@678
|
11430 |
_.typeId$ = 1;
|
jtulach@678
|
11431 |
function $toString_1(this$static){
|
jtulach@678
|
11432 |
var className, msg;
|
jtulach@678
|
11433 |
className = this$static.getClass$().typeName;
|
jtulach@678
|
11434 |
msg = this$static.getMessage();
|
jtulach@678
|
11435 |
if (msg != null) {
|
jtulach@678
|
11436 |
return className + ': ' + msg;
|
jtulach@678
|
11437 |
}
|
jtulach@678
|
11438 |
else {
|
jtulach@678
|
11439 |
return className;
|
jtulach@678
|
11440 |
}
|
jtulach@678
|
11441 |
}
|
jtulach@678
|
11442 |
|
jtulach@678
|
11443 |
function getClass_19(){
|
jtulach@678
|
11444 |
return Ljava_lang_Throwable_2_classLit;
|
jtulach@678
|
11445 |
}
|
jtulach@678
|
11446 |
|
jtulach@678
|
11447 |
function getMessage(){
|
jtulach@678
|
11448 |
return this.detailMessage;
|
jtulach@678
|
11449 |
}
|
jtulach@678
|
11450 |
|
jtulach@678
|
11451 |
function toString_7(){
|
jtulach@678
|
11452 |
return $toString_1(this);
|
jtulach@678
|
11453 |
}
|
jtulach@678
|
11454 |
|
jtulach@678
|
11455 |
function Throwable(){
|
jtulach@678
|
11456 |
}
|
jtulach@678
|
11457 |
|
jtulach@678
|
11458 |
_ = Throwable.prototype = new Object_0();
|
jtulach@678
|
11459 |
_.getClass$ = getClass_19;
|
jtulach@678
|
11460 |
_.getMessage = getMessage;
|
jtulach@678
|
11461 |
_.toString$ = toString_7;
|
jtulach@678
|
11462 |
_.typeId$ = 3;
|
jtulach@678
|
11463 |
_.detailMessage = null;
|
jtulach@678
|
11464 |
function $Exception(this$static, message){
|
jtulach@678
|
11465 |
this$static.detailMessage = message;
|
jtulach@678
|
11466 |
return this$static;
|
jtulach@678
|
11467 |
}
|
jtulach@678
|
11468 |
|
jtulach@678
|
11469 |
function getClass_9(){
|
jtulach@678
|
11470 |
return Ljava_lang_Exception_2_classLit;
|
jtulach@678
|
11471 |
}
|
jtulach@678
|
11472 |
|
jtulach@678
|
11473 |
function Exception(){
|
jtulach@678
|
11474 |
}
|
jtulach@678
|
11475 |
|
jtulach@678
|
11476 |
_ = Exception.prototype = new Throwable();
|
jtulach@678
|
11477 |
_.getClass$ = getClass_9;
|
jtulach@678
|
11478 |
_.typeId$ = 4;
|
jtulach@678
|
11479 |
function $RuntimeException(this$static, message){
|
jtulach@678
|
11480 |
this$static.detailMessage = message;
|
jtulach@678
|
11481 |
return this$static;
|
jtulach@678
|
11482 |
}
|
jtulach@678
|
11483 |
|
jtulach@678
|
11484 |
function getClass_14(){
|
jtulach@678
|
11485 |
return Ljava_lang_RuntimeException_2_classLit;
|
jtulach@678
|
11486 |
}
|
jtulach@678
|
11487 |
|
jtulach@678
|
11488 |
function RuntimeException(){
|
jtulach@678
|
11489 |
}
|
jtulach@678
|
11490 |
|
jtulach@678
|
11491 |
_ = RuntimeException.prototype = new Exception();
|
jtulach@678
|
11492 |
_.getClass$ = getClass_14;
|
jtulach@678
|
11493 |
_.typeId$ = 5;
|
jtulach@678
|
11494 |
function $JavaScriptException(this$static, e){
|
jtulach@678
|
11495 |
$Exception(this$static, '(' + getName(e) + '): ' + getDescription(e) + (e != null && (e.typeMarker$ != nullMethod && e.typeId$ != 2)?getProperties0(dynamicCastJso(e)):''));
|
jtulach@678
|
11496 |
getName(e);
|
jtulach@678
|
11497 |
getDescription(e);
|
jtulach@678
|
11498 |
getException(e);
|
jtulach@678
|
11499 |
return this$static;
|
jtulach@678
|
11500 |
}
|
jtulach@678
|
11501 |
|
jtulach@678
|
11502 |
function getClass_0(){
|
jtulach@678
|
11503 |
return Lcom_google_gwt_core_client_JavaScriptException_2_classLit;
|
jtulach@678
|
11504 |
}
|
jtulach@678
|
11505 |
|
jtulach@678
|
11506 |
function getDescription(e){
|
jtulach@678
|
11507 |
if (e != null && (e.typeMarker$ != nullMethod && e.typeId$ != 2)) {
|
jtulach@678
|
11508 |
return getDescription0(dynamicCastJso(e));
|
jtulach@678
|
11509 |
}
|
jtulach@678
|
11510 |
else {
|
jtulach@678
|
11511 |
return e + '';
|
jtulach@678
|
11512 |
}
|
jtulach@678
|
11513 |
}
|
jtulach@678
|
11514 |
|
jtulach@678
|
11515 |
function getDescription0(e){
|
jtulach@678
|
11516 |
return e == null?null:e.message;
|
jtulach@678
|
11517 |
}
|
jtulach@678
|
11518 |
|
jtulach@678
|
11519 |
function getException(e){
|
jtulach@678
|
11520 |
if (e != null && (e.typeMarker$ != nullMethod && e.typeId$ != 2)) {
|
jtulach@678
|
11521 |
return dynamicCastJso(e);
|
jtulach@678
|
11522 |
}
|
jtulach@678
|
11523 |
else {
|
jtulach@678
|
11524 |
return null;
|
jtulach@678
|
11525 |
}
|
jtulach@678
|
11526 |
}
|
jtulach@678
|
11527 |
|
jtulach@678
|
11528 |
function getName(e){
|
jtulach@678
|
11529 |
if (e == null) {
|
jtulach@678
|
11530 |
return 'null';
|
jtulach@678
|
11531 |
}
|
jtulach@678
|
11532 |
else if (e != null && (e.typeMarker$ != nullMethod && e.typeId$ != 2)) {
|
jtulach@678
|
11533 |
return getName0(dynamicCastJso(e));
|
jtulach@678
|
11534 |
}
|
jtulach@678
|
11535 |
else if (e != null && canCast(e.typeId$, 1)) {
|
jtulach@678
|
11536 |
return 'String';
|
jtulach@678
|
11537 |
}
|
jtulach@678
|
11538 |
else {
|
jtulach@678
|
11539 |
return (e.typeMarker$ == nullMethod || e.typeId$ == 2?e.getClass$():Lcom_google_gwt_core_client_JavaScriptObject_2_classLit).typeName;
|
jtulach@678
|
11540 |
}
|
jtulach@678
|
11541 |
}
|
jtulach@678
|
11542 |
|
jtulach@678
|
11543 |
function getName0(e){
|
jtulach@678
|
11544 |
return e == null?null:e.name;
|
jtulach@678
|
11545 |
}
|
jtulach@678
|
11546 |
|
jtulach@678
|
11547 |
function getProperties0(e){
|
jtulach@678
|
11548 |
var result = '';
|
jtulach@678
|
11549 |
for (prop in e) {
|
jtulach@678
|
11550 |
if (prop != 'name' && prop != 'message') {
|
jtulach@678
|
11551 |
result += '\n ' + prop + ': ' + e[prop];
|
jtulach@678
|
11552 |
}
|
jtulach@678
|
11553 |
}
|
jtulach@678
|
11554 |
return result;
|
jtulach@678
|
11555 |
}
|
jtulach@678
|
11556 |
|
jtulach@678
|
11557 |
function JavaScriptException(){
|
jtulach@678
|
11558 |
}
|
jtulach@678
|
11559 |
|
jtulach@678
|
11560 |
_ = JavaScriptException.prototype = new RuntimeException();
|
jtulach@678
|
11561 |
_.getClass$ = getClass_0;
|
jtulach@678
|
11562 |
_.typeId$ = 6;
|
jtulach@678
|
11563 |
function createFunction(){
|
jtulach@678
|
11564 |
return function(){
|
jtulach@678
|
11565 |
}
|
jtulach@678
|
11566 |
;
|
jtulach@678
|
11567 |
}
|
jtulach@678
|
11568 |
|
jtulach@678
|
11569 |
function equals__devirtual$(this$static, other){
|
jtulach@678
|
11570 |
return this$static.typeMarker$ == nullMethod || this$static.typeId$ == 2?this$static.equals$(other):(this$static == null?null:this$static) === (other == null?null:other);
|
jtulach@678
|
11571 |
}
|
jtulach@678
|
11572 |
|
jtulach@678
|
11573 |
function hashCode__devirtual$(this$static){
|
jtulach@678
|
11574 |
return this$static.typeMarker$ == nullMethod || this$static.typeId$ == 2?this$static.hashCode$():this$static.$H || (this$static.$H = ++sNextHashId);
|
jtulach@678
|
11575 |
}
|
jtulach@678
|
11576 |
|
jtulach@678
|
11577 |
var sNextHashId = 0;
|
jtulach@678
|
11578 |
function createFromSeed(seedType, length){
|
jtulach@678
|
11579 |
var seedArray = [null, 0, false, [0, 0]];
|
jtulach@678
|
11580 |
var value = seedArray[seedType];
|
jtulach@678
|
11581 |
var array = new Array(length);
|
jtulach@678
|
11582 |
for (var i = 0; i < length; ++i) {
|
jtulach@678
|
11583 |
array[i] = value;
|
jtulach@678
|
11584 |
}
|
jtulach@678
|
11585 |
return array;
|
jtulach@678
|
11586 |
}
|
jtulach@678
|
11587 |
|
jtulach@678
|
11588 |
function getClass_2(){
|
jtulach@678
|
11589 |
return this.arrayClass$;
|
jtulach@678
|
11590 |
}
|
jtulach@678
|
11591 |
|
jtulach@678
|
11592 |
function initDim(arrayClass, typeId, queryId, length, seedType){
|
jtulach@678
|
11593 |
var result;
|
jtulach@678
|
11594 |
result = createFromSeed(seedType, length);
|
jtulach@678
|
11595 |
initValues(arrayClass, typeId, queryId, result);
|
jtulach@678
|
11596 |
return result;
|
jtulach@678
|
11597 |
}
|
jtulach@678
|
11598 |
|
jtulach@678
|
11599 |
function initValues(arrayClass, typeId, queryId, array){
|
jtulach@678
|
11600 |
if (!protoTypeArray_0) {
|
jtulach@678
|
11601 |
protoTypeArray_0 = new Array_0();
|
jtulach@678
|
11602 |
}
|
jtulach@678
|
11603 |
wrapArray(array, protoTypeArray_0);
|
jtulach@678
|
11604 |
array.arrayClass$ = arrayClass;
|
jtulach@678
|
11605 |
array.typeId$ = typeId;
|
jtulach@678
|
11606 |
array.queryId$ = queryId;
|
jtulach@678
|
11607 |
return array;
|
jtulach@678
|
11608 |
}
|
jtulach@678
|
11609 |
|
jtulach@678
|
11610 |
function setCheck(array, index, value){
|
jtulach@678
|
11611 |
if (value != null) {
|
jtulach@678
|
11612 |
if (array.queryId$ > 0 && !canCastUnsafe(value.typeId$, array.queryId$)) {
|
jtulach@678
|
11613 |
throw new ArrayStoreException();
|
jtulach@678
|
11614 |
}
|
jtulach@678
|
11615 |
if (array.queryId$ < 0 && (value.typeMarker$ == nullMethod || value.typeId$ == 2)) {
|
jtulach@678
|
11616 |
throw new ArrayStoreException();
|
jtulach@678
|
11617 |
}
|
jtulach@678
|
11618 |
}
|
jtulach@678
|
11619 |
return array[index] = value;
|
jtulach@678
|
11620 |
}
|
jtulach@678
|
11621 |
|
jtulach@678
|
11622 |
function wrapArray(array, protoTypeArray){
|
jtulach@678
|
11623 |
for (var i in protoTypeArray) {
|
jtulach@678
|
11624 |
var toCopy = protoTypeArray[i];
|
jtulach@678
|
11625 |
if (toCopy) {
|
jtulach@678
|
11626 |
array[i] = toCopy;
|
jtulach@678
|
11627 |
}
|
jtulach@678
|
11628 |
}
|
jtulach@678
|
11629 |
return array;
|
jtulach@678
|
11630 |
}
|
jtulach@678
|
11631 |
|
jtulach@678
|
11632 |
function Array_0(){
|
jtulach@678
|
11633 |
}
|
jtulach@678
|
11634 |
|
jtulach@678
|
11635 |
_ = Array_0.prototype = new Object_0();
|
jtulach@678
|
11636 |
_.getClass$ = getClass_2;
|
jtulach@678
|
11637 |
_.typeId$ = 0;
|
jtulach@678
|
11638 |
_.arrayClass$ = null;
|
jtulach@678
|
11639 |
_.length = 0;
|
jtulach@678
|
11640 |
_.queryId$ = 0;
|
jtulach@678
|
11641 |
var protoTypeArray_0 = null;
|
jtulach@678
|
11642 |
function canCast(srcId, dstId){
|
jtulach@678
|
11643 |
return srcId && !!typeIdArray[srcId][dstId];
|
jtulach@678
|
11644 |
}
|
jtulach@678
|
11645 |
|
jtulach@678
|
11646 |
function canCastUnsafe(srcId, dstId){
|
jtulach@678
|
11647 |
return srcId && typeIdArray[srcId][dstId];
|
jtulach@678
|
11648 |
}
|
jtulach@678
|
11649 |
|
jtulach@678
|
11650 |
function dynamicCast(src, dstId){
|
jtulach@678
|
11651 |
if (src != null && !canCastUnsafe(src.typeId$, dstId)) {
|
jtulach@678
|
11652 |
throw new ClassCastException();
|
jtulach@678
|
11653 |
}
|
jtulach@678
|
11654 |
return src;
|
jtulach@678
|
11655 |
}
|
jtulach@678
|
11656 |
|
jtulach@678
|
11657 |
function dynamicCastJso(src){
|
jtulach@678
|
11658 |
if (src != null && (src.typeMarker$ == nullMethod || src.typeId$ == 2)) {
|
jtulach@678
|
11659 |
throw new ClassCastException();
|
jtulach@678
|
11660 |
}
|
jtulach@678
|
11661 |
return src;
|
jtulach@678
|
11662 |
}
|
jtulach@678
|
11663 |
|
jtulach@678
|
11664 |
function instanceOf(src, dstId){
|
jtulach@678
|
11665 |
return src != null && canCast(src.typeId$, dstId);
|
jtulach@678
|
11666 |
}
|
jtulach@678
|
11667 |
|
jtulach@678
|
11668 |
var typeIdArray = [{}, {}, {1:1, 6:1, 7:1, 8:1}, {2:1, 6:1}, {2:1, 6:1}, {2:1, 6:1}, {2:1, 6:1, 19:1}, {4:1}, {2:1, 6:1}, {2:1, 6:1}, {2:1, 6:1}, {2:1, 6:1}, {2:1, 6:1}, {6:1, 8:1}, {2:1, 6:1}, {2:1, 6:1}, {2:1, 6:1}, {7:1}, {7:1}, {2:1, 6:1}, {2:1, 6:1}, {18:1}, {14:1}, {14:1}, {14:1}, {15:1}, {15:1}, {6:1, 15:1}, {6:1, 16:1}, {6:1, 15:1}, {2:1, 6:1, 17:1}, {6:1, 8:1}, {6:1, 8:1}, {6:1, 8:1}, {20:1}, {3:1}, {9:1}, {10:1}, {11:1}, {21:1}, {2:1, 6:1, 22:1}, {2:1, 6:1, 22:1}, {12:1}, {13:1}, {5:1}, {5:1}, {5:1}, {5:1}, {5:1}, {5:1}, {5:1}, {5:1}, {5:1}, {5:1}];
|
jtulach@678
|
11669 |
function caught(e){
|
jtulach@678
|
11670 |
if (e != null && canCast(e.typeId$, 2)) {
|
jtulach@678
|
11671 |
return e;
|
jtulach@678
|
11672 |
}
|
jtulach@678
|
11673 |
return $JavaScriptException(new JavaScriptException(), e);
|
jtulach@678
|
11674 |
}
|
jtulach@678
|
11675 |
|
jtulach@678
|
11676 |
function create(valueLow, valueHigh){
|
jtulach@678
|
11677 |
var diffHigh, diffLow;
|
jtulach@678
|
11678 |
valueHigh %= 1.8446744073709552E19;
|
jtulach@678
|
11679 |
valueLow %= 1.8446744073709552E19;
|
jtulach@678
|
11680 |
diffHigh = valueHigh % 4294967296;
|
jtulach@678
|
11681 |
diffLow = Math.floor(valueLow / 4294967296) * 4294967296;
|
jtulach@678
|
11682 |
valueHigh = valueHigh - diffHigh + diffLow;
|
jtulach@678
|
11683 |
valueLow = valueLow - diffLow + diffHigh;
|
jtulach@678
|
11684 |
while (valueLow < 0) {
|
jtulach@678
|
11685 |
valueLow += 4294967296;
|
jtulach@678
|
11686 |
valueHigh -= 4294967296;
|
jtulach@678
|
11687 |
}
|
jtulach@678
|
11688 |
while (valueLow > 4294967295) {
|
jtulach@678
|
11689 |
valueLow -= 4294967296;
|
jtulach@678
|
11690 |
valueHigh += 4294967296;
|
jtulach@678
|
11691 |
}
|
jtulach@678
|
11692 |
valueHigh = valueHigh % 1.8446744073709552E19;
|
jtulach@678
|
11693 |
while (valueHigh > 9223372032559808512) {
|
jtulach@678
|
11694 |
valueHigh -= 1.8446744073709552E19;
|
jtulach@678
|
11695 |
}
|
jtulach@678
|
11696 |
while (valueHigh < -9223372036854775808) {
|
jtulach@678
|
11697 |
valueHigh += 1.8446744073709552E19;
|
jtulach@678
|
11698 |
}
|
jtulach@678
|
11699 |
return [valueLow, valueHigh];
|
jtulach@678
|
11700 |
}
|
jtulach@678
|
11701 |
|
jtulach@678
|
11702 |
function fromDouble(value){
|
jtulach@678
|
11703 |
if (isNaN(value)) {
|
jtulach@678
|
11704 |
return $clinit_7() , ZERO;
|
jtulach@678
|
11705 |
}
|
jtulach@678
|
11706 |
if (value < -9223372036854775808) {
|
jtulach@678
|
11707 |
return $clinit_7() , MIN_VALUE;
|
jtulach@678
|
11708 |
}
|
jtulach@678
|
11709 |
if (value >= 9223372036854775807) {
|
jtulach@678
|
11710 |
return $clinit_7() , MAX_VALUE;
|
jtulach@678
|
11711 |
}
|
jtulach@678
|
11712 |
if (value > 0) {
|
jtulach@678
|
11713 |
return create(Math.floor(value), 0);
|
jtulach@678
|
11714 |
}
|
jtulach@678
|
11715 |
else {
|
jtulach@678
|
11716 |
return create(Math.ceil(value), 0);
|
jtulach@678
|
11717 |
}
|
jtulach@678
|
11718 |
}
|
jtulach@678
|
11719 |
|
jtulach@678
|
11720 |
function fromInt(value){
|
jtulach@678
|
11721 |
var rebase, result;
|
jtulach@678
|
11722 |
if (value > -129 && value < 128) {
|
jtulach@678
|
11723 |
rebase = value + 128;
|
jtulach@678
|
11724 |
result = ($clinit_6() , boxedValues)[rebase];
|
jtulach@678
|
11725 |
if (result == null) {
|
jtulach@678
|
11726 |
result = boxedValues[rebase] = internalFromInt(value);
|
jtulach@678
|
11727 |
}
|
jtulach@678
|
11728 |
return result;
|
jtulach@678
|
11729 |
}
|
jtulach@678
|
11730 |
return internalFromInt(value);
|
jtulach@678
|
11731 |
}
|
jtulach@678
|
11732 |
|
jtulach@678
|
11733 |
function internalFromInt(value){
|
jtulach@678
|
11734 |
if (value >= 0) {
|
jtulach@678
|
11735 |
return [value, 0];
|
jtulach@678
|
11736 |
}
|
jtulach@678
|
11737 |
else {
|
jtulach@678
|
11738 |
return [value + 4294967296, -4294967296];
|
jtulach@678
|
11739 |
}
|
jtulach@678
|
11740 |
}
|
jtulach@678
|
11741 |
|
jtulach@678
|
11742 |
function $clinit_6(){
|
jtulach@678
|
11743 |
$clinit_6 = nullMethod;
|
jtulach@678
|
11744 |
boxedValues = initDim(_3_3D_classLit, 53, 13, 256, 0);
|
jtulach@678
|
11745 |
}
|
jtulach@678
|
11746 |
|
jtulach@678
|
11747 |
var boxedValues;
|
jtulach@678
|
11748 |
function $clinit_7(){
|
jtulach@678
|
11749 |
$clinit_7 = nullMethod;
|
jtulach@678
|
11750 |
Math.log(2);
|
jtulach@678
|
11751 |
MAX_VALUE = P7fffffffffffffff_longLit;
|
jtulach@678
|
11752 |
MIN_VALUE = N8000000000000000_longLit;
|
jtulach@678
|
11753 |
fromInt(-1);
|
jtulach@678
|
11754 |
fromInt(1);
|
jtulach@678
|
11755 |
fromInt(2);
|
jtulach@678
|
11756 |
ZERO = fromInt(0);
|
jtulach@678
|
11757 |
}
|
jtulach@678
|
11758 |
|
jtulach@678
|
11759 |
var MAX_VALUE, MIN_VALUE, ZERO;
|
jtulach@678
|
11760 |
function $clinit_12(){
|
jtulach@678
|
11761 |
$clinit_12 = nullMethod;
|
jtulach@678
|
11762 |
timers = $ArrayList(new ArrayList());
|
jtulach@678
|
11763 |
addWindowCloseListener(new Timer$1());
|
jtulach@678
|
11764 |
}
|
jtulach@678
|
11765 |
|
jtulach@678
|
11766 |
function $cancel(this$static){
|
jtulach@678
|
11767 |
if (this$static.isRepeating) {
|
jtulach@678
|
11768 |
clearInterval(this$static.timerId);
|
jtulach@678
|
11769 |
}
|
jtulach@678
|
11770 |
else {
|
jtulach@678
|
11771 |
clearTimeout(this$static.timerId);
|
jtulach@678
|
11772 |
}
|
jtulach@678
|
11773 |
$remove_0(timers, this$static);
|
jtulach@678
|
11774 |
}
|
jtulach@678
|
11775 |
|
jtulach@678
|
11776 |
function $fireImpl(this$static){
|
jtulach@678
|
11777 |
if (!this$static.isRepeating) {
|
jtulach@678
|
11778 |
$remove_0(timers, this$static);
|
jtulach@678
|
11779 |
}
|
jtulach@678
|
11780 |
$run(this$static);
|
jtulach@678
|
11781 |
}
|
jtulach@678
|
11782 |
|
jtulach@678
|
11783 |
function $schedule(this$static, delayMillis){
|
jtulach@678
|
11784 |
if (delayMillis <= 0) {
|
jtulach@678
|
11785 |
throw $IllegalArgumentException(new IllegalArgumentException(), 'must be positive');
|
jtulach@678
|
11786 |
}
|
jtulach@678
|
11787 |
$cancel(this$static);
|
jtulach@678
|
11788 |
this$static.isRepeating = false;
|
jtulach@678
|
11789 |
this$static.timerId = createTimeout(this$static, delayMillis);
|
jtulach@678
|
11790 |
$add(timers, this$static);
|
jtulach@678
|
11791 |
}
|
jtulach@678
|
11792 |
|
jtulach@678
|
11793 |
function createTimeout(timer, delay){
|
jtulach@678
|
11794 |
return setTimeout(function(){
|
jtulach@678
|
11795 |
timer.fire();
|
jtulach@678
|
11796 |
}
|
jtulach@678
|
11797 |
, delay);
|
jtulach@678
|
11798 |
}
|
jtulach@678
|
11799 |
|
jtulach@678
|
11800 |
function fire(){
|
jtulach@678
|
11801 |
$fireImpl(this);
|
jtulach@678
|
11802 |
}
|
jtulach@678
|
11803 |
|
jtulach@678
|
11804 |
function getClass_4(){
|
jtulach@678
|
11805 |
return Lcom_google_gwt_user_client_Timer_2_classLit;
|
jtulach@678
|
11806 |
}
|
jtulach@678
|
11807 |
|
jtulach@678
|
11808 |
function Timer(){
|
jtulach@678
|
11809 |
}
|
jtulach@678
|
11810 |
|
jtulach@678
|
11811 |
_ = Timer.prototype = new Object_0();
|
jtulach@678
|
11812 |
_.fire = fire;
|
jtulach@678
|
11813 |
_.getClass$ = getClass_4;
|
jtulach@678
|
11814 |
_.typeId$ = 0;
|
jtulach@678
|
11815 |
_.isRepeating = false;
|
jtulach@678
|
11816 |
_.timerId = 0;
|
jtulach@678
|
11817 |
var timers;
|
jtulach@678
|
11818 |
function $onWindowClosed(){
|
jtulach@678
|
11819 |
while (($clinit_12() , timers).size > 0) {
|
jtulach@678
|
11820 |
$cancel(dynamicCast($get_0(timers, 0), 3));
|
jtulach@678
|
11821 |
}
|
jtulach@678
|
11822 |
}
|
jtulach@678
|
11823 |
|
jtulach@678
|
11824 |
function getClass_3(){
|
jtulach@678
|
11825 |
return Lcom_google_gwt_user_client_Timer$1_2_classLit;
|
jtulach@678
|
11826 |
}
|
jtulach@678
|
11827 |
|
jtulach@678
|
11828 |
function Timer$1(){
|
jtulach@678
|
11829 |
}
|
jtulach@678
|
11830 |
|
jtulach@678
|
11831 |
_ = Timer$1.prototype = new Object_0();
|
jtulach@678
|
11832 |
_.getClass$ = getClass_3;
|
jtulach@678
|
11833 |
_.typeId$ = 7;
|
jtulach@678
|
11834 |
function addWindowCloseListener(listener){
|
jtulach@678
|
11835 |
maybeInitializeHandlers();
|
jtulach@678
|
11836 |
if (!closingListeners) {
|
jtulach@678
|
11837 |
closingListeners = $ArrayList(new ArrayList());
|
jtulach@678
|
11838 |
}
|
jtulach@678
|
11839 |
$add(closingListeners, listener);
|
jtulach@678
|
11840 |
}
|
jtulach@678
|
11841 |
|
jtulach@678
|
11842 |
function fireClosedImpl(){
|
jtulach@678
|
11843 |
var listener$iterator;
|
jtulach@678
|
11844 |
if (closingListeners) {
|
jtulach@678
|
11845 |
for (listener$iterator = $AbstractList$IteratorImpl(new AbstractList$IteratorImpl(), closingListeners); listener$iterator.i < listener$iterator.this$0.size_0();) {
|
jtulach@678
|
11846 |
dynamicCast($next(listener$iterator), 4);
|
jtulach@678
|
11847 |
$onWindowClosed();
|
jtulach@678
|
11848 |
}
|
jtulach@678
|
11849 |
}
|
jtulach@678
|
11850 |
}
|
jtulach@678
|
11851 |
|
jtulach@678
|
11852 |
function fireClosingImpl(){
|
jtulach@678
|
11853 |
var listener$iterator, ret;
|
jtulach@678
|
11854 |
ret = null;
|
jtulach@678
|
11855 |
if (closingListeners) {
|
jtulach@678
|
11856 |
for (listener$iterator = $AbstractList$IteratorImpl(new AbstractList$IteratorImpl(), closingListeners); listener$iterator.i < listener$iterator.this$0.size_0();) {
|
jtulach@678
|
11857 |
dynamicCast($next(listener$iterator), 4);
|
jtulach@678
|
11858 |
ret = null;
|
jtulach@678
|
11859 |
}
|
jtulach@678
|
11860 |
}
|
jtulach@678
|
11861 |
return ret;
|
jtulach@678
|
11862 |
}
|
jtulach@678
|
11863 |
|
jtulach@678
|
11864 |
function __init__xxx__(){
|
jtulach@678
|
11865 |
__gwt_initHandlers(function(){
|
jtulach@678
|
11866 |
}
|
jtulach@678
|
11867 |
, function(){
|
jtulach@678
|
11868 |
return fireClosingImpl();
|
jtulach@678
|
11869 |
}
|
jtulach@678
|
11870 |
, function(){
|
jtulach@678
|
11871 |
fireClosedImpl();
|
jtulach@678
|
11872 |
}
|
jtulach@678
|
11873 |
);
|
jtulach@678
|
11874 |
}
|
jtulach@678
|
11875 |
|
jtulach@678
|
11876 |
function maybeInitializeHandlers(){
|
jtulach@678
|
11877 |
if (!handlersAreInitialized) {
|
jtulach@678
|
11878 |
// __init__xxx__();
|
jtulach@678
|
11879 |
handlersAreInitialized = true;
|
jtulach@678
|
11880 |
}
|
jtulach@678
|
11881 |
}
|
jtulach@678
|
11882 |
|
jtulach@678
|
11883 |
var closingListeners = null, handlersAreInitialized = false;
|
jtulach@678
|
11884 |
function $ArrayStoreException(this$static, message){
|
jtulach@678
|
11885 |
this$static.detailMessage = message;
|
jtulach@678
|
11886 |
return this$static;
|
jtulach@678
|
11887 |
}
|
jtulach@678
|
11888 |
|
jtulach@678
|
11889 |
function getClass_5(){
|
jtulach@678
|
11890 |
return Ljava_lang_ArrayStoreException_2_classLit;
|
jtulach@678
|
11891 |
}
|
jtulach@678
|
11892 |
|
jtulach@678
|
11893 |
function ArrayStoreException(){
|
jtulach@678
|
11894 |
}
|
jtulach@678
|
11895 |
|
jtulach@678
|
11896 |
_ = ArrayStoreException.prototype = new RuntimeException();
|
jtulach@678
|
11897 |
_.getClass$ = getClass_5;
|
jtulach@678
|
11898 |
_.typeId$ = 9;
|
jtulach@678
|
11899 |
function createForArray(packageName, className){
|
jtulach@678
|
11900 |
var clazz;
|
jtulach@678
|
11901 |
clazz = new Class();
|
jtulach@678
|
11902 |
clazz.typeName = packageName + className;
|
jtulach@678
|
11903 |
clazz.modifiers = 4;
|
jtulach@678
|
11904 |
return clazz;
|
jtulach@678
|
11905 |
}
|
jtulach@678
|
11906 |
|
jtulach@678
|
11907 |
function createForClass(packageName, className){
|
jtulach@678
|
11908 |
var clazz;
|
jtulach@678
|
11909 |
clazz = new Class();
|
jtulach@678
|
11910 |
clazz.typeName = packageName + className;
|
jtulach@678
|
11911 |
return clazz;
|
jtulach@678
|
11912 |
}
|
jtulach@678
|
11913 |
|
jtulach@678
|
11914 |
function createForEnum(packageName, className){
|
jtulach@678
|
11915 |
var clazz;
|
jtulach@678
|
11916 |
clazz = new Class();
|
jtulach@678
|
11917 |
clazz.typeName = packageName + className;
|
jtulach@678
|
11918 |
clazz.modifiers = 8;
|
jtulach@678
|
11919 |
return clazz;
|
jtulach@678
|
11920 |
}
|
jtulach@678
|
11921 |
|
jtulach@678
|
11922 |
function getClass_7(){
|
jtulach@678
|
11923 |
return Ljava_lang_Class_2_classLit;
|
jtulach@678
|
11924 |
}
|
jtulach@678
|
11925 |
|
jtulach@678
|
11926 |
function toString_1(){
|
jtulach@678
|
11927 |
return ((this.modifiers & 2) != 0?'interface ':(this.modifiers & 1) != 0?'':'class ') + this.typeName;
|
jtulach@678
|
11928 |
}
|
jtulach@678
|
11929 |
|
jtulach@678
|
11930 |
function Class(){
|
jtulach@678
|
11931 |
}
|
jtulach@678
|
11932 |
|
jtulach@678
|
11933 |
_ = Class.prototype = new Object_0();
|
jtulach@678
|
11934 |
_.getClass$ = getClass_7;
|
jtulach@678
|
11935 |
_.toString$ = toString_1;
|
jtulach@678
|
11936 |
_.typeId$ = 0;
|
jtulach@678
|
11937 |
_.modifiers = 0;
|
jtulach@678
|
11938 |
_.typeName = null;
|
jtulach@678
|
11939 |
function getClass_6(){
|
jtulach@678
|
11940 |
return Ljava_lang_ClassCastException_2_classLit;
|
jtulach@678
|
11941 |
}
|
jtulach@678
|
11942 |
|
jtulach@678
|
11943 |
function ClassCastException(){
|
jtulach@678
|
11944 |
}
|
jtulach@678
|
11945 |
|
jtulach@678
|
11946 |
_ = ClassCastException.prototype = new RuntimeException();
|
jtulach@678
|
11947 |
_.getClass$ = getClass_6;
|
jtulach@678
|
11948 |
_.typeId$ = 12;
|
jtulach@678
|
11949 |
function compareTo(other){
|
jtulach@678
|
11950 |
return this.ordinal - other.ordinal;
|
jtulach@678
|
11951 |
}
|
jtulach@678
|
11952 |
|
jtulach@678
|
11953 |
function equals_0(other){
|
jtulach@678
|
11954 |
return (this == null?null:this) === (other == null?null:other);
|
jtulach@678
|
11955 |
}
|
jtulach@678
|
11956 |
|
jtulach@678
|
11957 |
function getClass_8(){
|
jtulach@678
|
11958 |
return Ljava_lang_Enum_2_classLit;
|
jtulach@678
|
11959 |
}
|
jtulach@678
|
11960 |
|
jtulach@678
|
11961 |
function hashCode_1(){
|
jtulach@678
|
11962 |
return this.$H || (this.$H = ++sNextHashId);
|
jtulach@678
|
11963 |
}
|
jtulach@678
|
11964 |
|
jtulach@678
|
11965 |
function toString_2(){
|
jtulach@678
|
11966 |
return this.name_0;
|
jtulach@678
|
11967 |
}
|
jtulach@678
|
11968 |
|
jtulach@678
|
11969 |
function Enum(){
|
jtulach@678
|
11970 |
}
|
jtulach@678
|
11971 |
|
jtulach@678
|
11972 |
_ = Enum.prototype = new Object_0();
|
jtulach@678
|
11973 |
_.compareTo$ = compareTo;
|
jtulach@678
|
11974 |
_.equals$ = equals_0;
|
jtulach@678
|
11975 |
_.getClass$ = getClass_8;
|
jtulach@678
|
11976 |
_.hashCode$ = hashCode_1;
|
jtulach@678
|
11977 |
_.toString$ = toString_2;
|
jtulach@678
|
11978 |
_.typeId$ = 13;
|
jtulach@678
|
11979 |
_.name_0 = null;
|
jtulach@678
|
11980 |
_.ordinal = 0;
|
jtulach@678
|
11981 |
function $IllegalArgumentException(this$static, message){
|
jtulach@678
|
11982 |
this$static.detailMessage = message;
|
jtulach@678
|
11983 |
return this$static;
|
jtulach@678
|
11984 |
}
|
jtulach@678
|
11985 |
|
jtulach@678
|
11986 |
function getClass_10(){
|
jtulach@678
|
11987 |
return Ljava_lang_IllegalArgumentException_2_classLit;
|
jtulach@678
|
11988 |
}
|
jtulach@678
|
11989 |
|
jtulach@678
|
11990 |
function IllegalArgumentException(){
|
jtulach@678
|
11991 |
}
|
jtulach@678
|
11992 |
|
jtulach@678
|
11993 |
_ = IllegalArgumentException.prototype = new RuntimeException();
|
jtulach@678
|
11994 |
_.getClass$ = getClass_10;
|
jtulach@678
|
11995 |
_.typeId$ = 14;
|
jtulach@678
|
11996 |
function $IndexOutOfBoundsException(this$static, message){
|
jtulach@678
|
11997 |
this$static.detailMessage = message;
|
jtulach@678
|
11998 |
return this$static;
|
jtulach@678
|
11999 |
}
|
jtulach@678
|
12000 |
|
jtulach@678
|
12001 |
function getClass_11(){
|
jtulach@678
|
12002 |
return Ljava_lang_IndexOutOfBoundsException_2_classLit;
|
jtulach@678
|
12003 |
}
|
jtulach@678
|
12004 |
|
jtulach@678
|
12005 |
function IndexOutOfBoundsException(){
|
jtulach@678
|
12006 |
}
|
jtulach@678
|
12007 |
|
jtulach@678
|
12008 |
_ = IndexOutOfBoundsException.prototype = new RuntimeException();
|
jtulach@678
|
12009 |
_.getClass$ = getClass_11;
|
jtulach@678
|
12010 |
_.typeId$ = 15;
|
jtulach@678
|
12011 |
function toPowerOfTwoString(value, shift){
|
jtulach@678
|
12012 |
var bitMask, buf, bufSize, pos;
|
jtulach@678
|
12013 |
bufSize = ~~(32 / shift);
|
jtulach@678
|
12014 |
bitMask = (1 << shift) - 1;
|
jtulach@678
|
12015 |
buf = initDim(_3C_classLit, 42, -1, bufSize, 1);
|
jtulach@678
|
12016 |
pos = bufSize - 1;
|
jtulach@678
|
12017 |
if (value >= 0) {
|
jtulach@678
|
12018 |
while (value > bitMask) {
|
jtulach@678
|
12019 |
buf[pos--] = ($clinit_31() , digits)[value & bitMask];
|
jtulach@678
|
12020 |
value >>= shift;
|
jtulach@678
|
12021 |
}
|
jtulach@678
|
12022 |
}
|
jtulach@678
|
12023 |
else {
|
jtulach@678
|
12024 |
while (pos > 0) {
|
jtulach@678
|
12025 |
buf[pos--] = ($clinit_31() , digits)[value & bitMask];
|
jtulach@678
|
12026 |
value >>= shift;
|
jtulach@678
|
12027 |
}
|
jtulach@678
|
12028 |
}
|
jtulach@678
|
12029 |
buf[pos] = ($clinit_31() , digits)[value & bitMask];
|
jtulach@678
|
12030 |
return __valueOf(buf, pos, bufSize);
|
jtulach@678
|
12031 |
}
|
jtulach@678
|
12032 |
|
jtulach@678
|
12033 |
function getClass_12(){
|
jtulach@678
|
12034 |
return Ljava_lang_NullPointerException_2_classLit;
|
jtulach@678
|
12035 |
}
|
jtulach@678
|
12036 |
|
jtulach@678
|
12037 |
function NullPointerException(){
|
jtulach@678
|
12038 |
}
|
jtulach@678
|
12039 |
|
jtulach@678
|
12040 |
_ = NullPointerException.prototype = new RuntimeException();
|
jtulach@678
|
12041 |
_.getClass$ = getClass_12;
|
jtulach@678
|
12042 |
_.typeId$ = 16;
|
jtulach@678
|
12043 |
function $clinit_31(){
|
jtulach@678
|
12044 |
$clinit_31 = nullMethod;
|
jtulach@678
|
12045 |
digits = initValues(_3C_classLit, 42, -1, [48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 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, 122]);
|
jtulach@678
|
12046 |
}
|
jtulach@678
|
12047 |
|
jtulach@678
|
12048 |
var digits;
|
jtulach@678
|
12049 |
function $equals_0(this$static, other){
|
jtulach@678
|
12050 |
if (!(other != null && canCast(other.typeId$, 1))) {
|
jtulach@678
|
12051 |
return false;
|
jtulach@678
|
12052 |
}
|
jtulach@678
|
12053 |
return String(this$static) == other;
|
jtulach@678
|
12054 |
}
|
jtulach@678
|
12055 |
|
jtulach@678
|
12056 |
function $getChars_0(this$static, srcBegin, srcEnd, dst, dstBegin){
|
jtulach@678
|
12057 |
var srcIdx;
|
jtulach@678
|
12058 |
for (srcIdx = srcBegin; srcIdx < srcEnd; ++srcIdx) {
|
jtulach@678
|
12059 |
dst[dstBegin++] = this$static.charCodeAt(srcIdx);
|
jtulach@678
|
12060 |
}
|
jtulach@678
|
12061 |
}
|
jtulach@678
|
12062 |
|
jtulach@678
|
12063 |
function $toCharArray(this$static){
|
jtulach@678
|
12064 |
var charArr, n;
|
jtulach@678
|
12065 |
n = this$static.length;
|
jtulach@678
|
12066 |
charArr = initDim(_3C_classLit, 42, -1, n, 1);
|
jtulach@678
|
12067 |
$getChars_0(this$static, 0, n, charArr, 0);
|
jtulach@678
|
12068 |
return charArr;
|
jtulach@678
|
12069 |
}
|
jtulach@678
|
12070 |
|
jtulach@678
|
12071 |
function __checkBounds(legalCount, start, end){
|
jtulach@678
|
12072 |
if (start < 0) {
|
jtulach@678
|
12073 |
throw $StringIndexOutOfBoundsException(new StringIndexOutOfBoundsException(), start);
|
jtulach@678
|
12074 |
}
|
jtulach@678
|
12075 |
if (end < start) {
|
jtulach@678
|
12076 |
throw $StringIndexOutOfBoundsException(new StringIndexOutOfBoundsException(), end - start);
|
jtulach@678
|
12077 |
}
|
jtulach@678
|
12078 |
if (end > legalCount) {
|
jtulach@678
|
12079 |
throw $StringIndexOutOfBoundsException(new StringIndexOutOfBoundsException(), end);
|
jtulach@678
|
12080 |
}
|
jtulach@678
|
12081 |
}
|
jtulach@678
|
12082 |
|
jtulach@678
|
12083 |
function __valueOf(x, start, end){
|
jtulach@678
|
12084 |
x = x.slice(start, end);
|
jtulach@678
|
12085 |
return String.fromCharCode.apply(null, x);
|
jtulach@678
|
12086 |
}
|
jtulach@678
|
12087 |
|
jtulach@678
|
12088 |
function compareTo_1(thisStr, otherStr){
|
jtulach@678
|
12089 |
thisStr = String(thisStr);
|
jtulach@678
|
12090 |
if (thisStr == otherStr) {
|
jtulach@678
|
12091 |
return 0;
|
jtulach@678
|
12092 |
}
|
jtulach@678
|
12093 |
return thisStr < otherStr?-1:1;
|
jtulach@678
|
12094 |
}
|
jtulach@678
|
12095 |
|
jtulach@678
|
12096 |
function compareTo_0(other){
|
jtulach@678
|
12097 |
return compareTo_1(this, other);
|
jtulach@678
|
12098 |
}
|
jtulach@678
|
12099 |
|
jtulach@678
|
12100 |
function equals_2(other){
|
jtulach@678
|
12101 |
return $equals_0(this, other);
|
jtulach@678
|
12102 |
}
|
jtulach@678
|
12103 |
|
jtulach@678
|
12104 |
function getClass_18(){
|
jtulach@678
|
12105 |
return Ljava_lang_String_2_classLit;
|
jtulach@678
|
12106 |
}
|
jtulach@678
|
12107 |
|
jtulach@678
|
12108 |
function hashCode_3(){
|
jtulach@678
|
12109 |
return getHashCode_0(this);
|
jtulach@678
|
12110 |
}
|
jtulach@678
|
12111 |
|
jtulach@678
|
12112 |
function toString_6(){
|
jtulach@678
|
12113 |
return this;
|
jtulach@678
|
12114 |
}
|
jtulach@678
|
12115 |
|
jtulach@678
|
12116 |
function valueOf_1(x, offset, count){
|
jtulach@678
|
12117 |
var end;
|
jtulach@678
|
12118 |
end = offset + count;
|
jtulach@678
|
12119 |
__checkBounds(x.length, offset, end);
|
jtulach@678
|
12120 |
return __valueOf(x, offset, end);
|
jtulach@678
|
12121 |
}
|
jtulach@678
|
12122 |
|
jtulach@678
|
12123 |
_ = String.prototype;
|
jtulach@678
|
12124 |
_.compareTo$ = compareTo_0;
|
jtulach@678
|
12125 |
_.equals$ = equals_2;
|
jtulach@678
|
12126 |
_.getClass$ = getClass_18;
|
jtulach@678
|
12127 |
_.hashCode$ = hashCode_3;
|
jtulach@678
|
12128 |
_.toString$ = toString_6;
|
jtulach@678
|
12129 |
_.typeId$ = 2;
|
jtulach@678
|
12130 |
function $clinit_35(){
|
jtulach@678
|
12131 |
$clinit_35 = nullMethod;
|
jtulach@678
|
12132 |
back = {};
|
jtulach@678
|
12133 |
front = {};
|
jtulach@678
|
12134 |
}
|
jtulach@678
|
12135 |
|
jtulach@678
|
12136 |
function compute(str){
|
jtulach@678
|
12137 |
var hashCode, i, inc, n;
|
jtulach@678
|
12138 |
n = str.length;
|
jtulach@678
|
12139 |
inc = n < 64?1:~~(n / 32);
|
jtulach@678
|
12140 |
hashCode = 0;
|
jtulach@678
|
12141 |
for (i = 0; i < n; i += inc) {
|
jtulach@678
|
12142 |
hashCode <<= 1;
|
jtulach@678
|
12143 |
hashCode += str.charCodeAt(i);
|
jtulach@678
|
12144 |
}
|
jtulach@678
|
12145 |
hashCode |= 0;
|
jtulach@678
|
12146 |
return hashCode;
|
jtulach@678
|
12147 |
}
|
jtulach@678
|
12148 |
|
jtulach@678
|
12149 |
function getHashCode_0(str){
|
jtulach@678
|
12150 |
$clinit_35();
|
jtulach@678
|
12151 |
var key = ':' + str;
|
jtulach@678
|
12152 |
var result = front[key];
|
jtulach@678
|
12153 |
if (result != null) {
|
jtulach@678
|
12154 |
return result;
|
jtulach@678
|
12155 |
}
|
jtulach@678
|
12156 |
result = back[key];
|
jtulach@678
|
12157 |
if (result == null) {
|
jtulach@678
|
12158 |
result = compute(str);
|
jtulach@678
|
12159 |
}
|
jtulach@678
|
12160 |
increment();
|
jtulach@678
|
12161 |
return front[key] = result;
|
jtulach@678
|
12162 |
}
|
jtulach@678
|
12163 |
|
jtulach@678
|
12164 |
function increment(){
|
jtulach@678
|
12165 |
if (count_0 == 256) {
|
jtulach@678
|
12166 |
back = front;
|
jtulach@678
|
12167 |
front = {};
|
jtulach@678
|
12168 |
count_0 = 0;
|
jtulach@678
|
12169 |
}
|
jtulach@678
|
12170 |
++count_0;
|
jtulach@678
|
12171 |
}
|
jtulach@678
|
12172 |
|
jtulach@678
|
12173 |
var back, count_0 = 0, front;
|
jtulach@678
|
12174 |
function $StringBuffer(this$static){
|
jtulach@678
|
12175 |
this$static.builder = $StringBuilder(new StringBuilder());
|
jtulach@678
|
12176 |
return this$static;
|
jtulach@678
|
12177 |
}
|
jtulach@678
|
12178 |
|
jtulach@678
|
12179 |
function $append(this$static, toAppend){
|
jtulach@678
|
12180 |
$append_0(this$static.builder, toAppend);
|
jtulach@678
|
12181 |
return this$static;
|
jtulach@678
|
12182 |
}
|
jtulach@678
|
12183 |
|
jtulach@678
|
12184 |
function getClass_15(){
|
jtulach@678
|
12185 |
return Ljava_lang_StringBuffer_2_classLit;
|
jtulach@678
|
12186 |
}
|
jtulach@678
|
12187 |
|
jtulach@678
|
12188 |
function toString_4(){
|
jtulach@678
|
12189 |
return $toString_0(this.builder);
|
jtulach@678
|
12190 |
}
|
jtulach@678
|
12191 |
|
jtulach@678
|
12192 |
function StringBuffer(){
|
jtulach@678
|
12193 |
}
|
jtulach@678
|
12194 |
|
jtulach@678
|
12195 |
_ = StringBuffer.prototype = new Object_0();
|
jtulach@678
|
12196 |
_.getClass$ = getClass_15;
|
jtulach@678
|
12197 |
_.toString$ = toString_4;
|
jtulach@678
|
12198 |
_.typeId$ = 17;
|
jtulach@678
|
12199 |
function $StringBuilder(this$static){
|
jtulach@678
|
12200 |
this$static.stringArray = initDim(_3Ljava_lang_String_2_classLit, 48, 1, 0, 0);
|
jtulach@678
|
12201 |
return this$static;
|
jtulach@678
|
12202 |
}
|
jtulach@678
|
12203 |
|
jtulach@678
|
12204 |
function $append_0(this$static, toAppend){
|
jtulach@678
|
12205 |
var appendLength;
|
jtulach@678
|
12206 |
if (toAppend == null) {
|
jtulach@678
|
12207 |
toAppend = 'null';
|
jtulach@678
|
12208 |
}
|
jtulach@678
|
12209 |
appendLength = toAppend.length;
|
jtulach@678
|
12210 |
if (appendLength > 0) {
|
jtulach@678
|
12211 |
this$static.stringArray[this$static.arrayLen++] = toAppend;
|
jtulach@678
|
12212 |
this$static.stringLength += appendLength;
|
jtulach@678
|
12213 |
if (this$static.arrayLen > 1024) {
|
jtulach@678
|
12214 |
$toString_0(this$static);
|
jtulach@678
|
12215 |
this$static.stringArray.length = 1024;
|
jtulach@678
|
12216 |
}
|
jtulach@678
|
12217 |
}
|
jtulach@678
|
12218 |
return this$static;
|
jtulach@678
|
12219 |
}
|
jtulach@678
|
12220 |
|
jtulach@678
|
12221 |
function $getChars(this$static, srcStart, srcEnd, dst, dstStart){
|
jtulach@678
|
12222 |
var s;
|
jtulach@678
|
12223 |
__checkBounds(this$static.stringLength, srcStart, srcEnd);
|
jtulach@678
|
12224 |
__checkBounds(dst.length, dstStart, dstStart + (srcEnd - srcStart));
|
jtulach@678
|
12225 |
s = $toString_0(this$static);
|
jtulach@678
|
12226 |
while (srcStart < srcEnd) {
|
jtulach@678
|
12227 |
dst[dstStart++] = s.charCodeAt(srcStart++);
|
jtulach@678
|
12228 |
}
|
jtulach@678
|
12229 |
}
|
jtulach@678
|
12230 |
|
jtulach@678
|
12231 |
function $setLength(this$static, newLength){
|
jtulach@678
|
12232 |
var oldLength, s;
|
jtulach@678
|
12233 |
oldLength = this$static.stringLength;
|
jtulach@678
|
12234 |
if (newLength < oldLength) {
|
jtulach@678
|
12235 |
s = $toString_0(this$static);
|
jtulach@678
|
12236 |
this$static.stringArray = initValues(_3Ljava_lang_String_2_classLit, 48, 1, [s.substr(0, newLength - 0), '', s.substr(oldLength, s.length - oldLength)]);
|
jtulach@678
|
12237 |
this$static.arrayLen = 3;
|
jtulach@678
|
12238 |
this$static.stringLength += ''.length - (oldLength - newLength);
|
jtulach@678
|
12239 |
}
|
jtulach@678
|
12240 |
else if (newLength > oldLength) {
|
jtulach@678
|
12241 |
$append_0(this$static, String.fromCharCode.apply(null, initDim(_3C_classLit, 42, -1, newLength - oldLength, 1)));
|
jtulach@678
|
12242 |
}
|
jtulach@678
|
12243 |
}
|
jtulach@678
|
12244 |
|
jtulach@678
|
12245 |
function $toString_0(this$static){
|
jtulach@678
|
12246 |
var s;
|
jtulach@678
|
12247 |
if (this$static.arrayLen != 1) {
|
jtulach@678
|
12248 |
this$static.stringArray.length = this$static.arrayLen;
|
jtulach@678
|
12249 |
s = this$static.stringArray.join('');
|
jtulach@678
|
12250 |
this$static.stringArray = initValues(_3Ljava_lang_String_2_classLit, 48, 1, [s]);
|
jtulach@678
|
12251 |
this$static.arrayLen = 1;
|
jtulach@678
|
12252 |
}
|
jtulach@678
|
12253 |
return this$static.stringArray[0];
|
jtulach@678
|
12254 |
}
|
jtulach@678
|
12255 |
|
jtulach@678
|
12256 |
function getClass_16(){
|
jtulach@678
|
12257 |
return Ljava_lang_StringBuilder_2_classLit;
|
jtulach@678
|
12258 |
}
|
jtulach@678
|
12259 |
|
jtulach@678
|
12260 |
function toString_5(){
|
jtulach@678
|
12261 |
return $toString_0(this);
|
jtulach@678
|
12262 |
}
|
jtulach@678
|
12263 |
|
jtulach@678
|
12264 |
function StringBuilder(){
|
jtulach@678
|
12265 |
}
|
jtulach@678
|
12266 |
|
jtulach@678
|
12267 |
_ = StringBuilder.prototype = new Object_0();
|
jtulach@678
|
12268 |
_.getClass$ = getClass_16;
|
jtulach@678
|
12269 |
_.toString$ = toString_5;
|
jtulach@678
|
12270 |
_.typeId$ = 18;
|
jtulach@678
|
12271 |
_.arrayLen = 0;
|
jtulach@678
|
12272 |
_.stringLength = 0;
|
jtulach@678
|
12273 |
function $StringIndexOutOfBoundsException(this$static, index){
|
jtulach@678
|
12274 |
this$static.detailMessage = 'String index out of range: ' + index;
|
jtulach@678
|
12275 |
return this$static;
|
jtulach@678
|
12276 |
}
|
jtulach@678
|
12277 |
|
jtulach@678
|
12278 |
function getClass_17(){
|
jtulach@678
|
12279 |
return Ljava_lang_StringIndexOutOfBoundsException_2_classLit;
|
jtulach@678
|
12280 |
}
|
jtulach@678
|
12281 |
|
jtulach@678
|
12282 |
function StringIndexOutOfBoundsException(){
|
jtulach@678
|
12283 |
}
|
jtulach@678
|
12284 |
|
jtulach@678
|
12285 |
_ = StringIndexOutOfBoundsException.prototype = new IndexOutOfBoundsException();
|
jtulach@678
|
12286 |
_.getClass$ = getClass_17;
|
jtulach@678
|
12287 |
_.typeId$ = 19;
|
jtulach@678
|
12288 |
function arraycopy(src, srcOfs, dest, destOfs, len){
|
jtulach@678
|
12289 |
var destArray, destEnd, destTypeName, destlen, srcArray, srcTypeName, srclen;
|
jtulach@678
|
12290 |
if (src == null || dest == null) {
|
jtulach@678
|
12291 |
throw new NullPointerException();
|
jtulach@678
|
12292 |
}
|
jtulach@678
|
12293 |
srcTypeName = (src.typeMarker$ == nullMethod || src.typeId$ == 2?src.getClass$():Lcom_google_gwt_core_client_JavaScriptObject_2_classLit).typeName;
|
jtulach@678
|
12294 |
destTypeName = (dest.typeMarker$ == nullMethod || dest.typeId$ == 2?dest.getClass$():Lcom_google_gwt_core_client_JavaScriptObject_2_classLit).typeName;
|
jtulach@678
|
12295 |
if (srcTypeName.charCodeAt(0) != 91 || destTypeName.charCodeAt(0) != 91) {
|
jtulach@678
|
12296 |
throw $ArrayStoreException(new ArrayStoreException(), 'Must be array types');
|
jtulach@678
|
12297 |
}
|
jtulach@678
|
12298 |
if (srcTypeName.charCodeAt(1) != destTypeName.charCodeAt(1)) {
|
jtulach@678
|
12299 |
throw $ArrayStoreException(new ArrayStoreException(), 'Array types must match');
|
jtulach@678
|
12300 |
}
|
jtulach@678
|
12301 |
srclen = src.length;
|
jtulach@678
|
12302 |
destlen = dest.length;
|
jtulach@678
|
12303 |
if (srcOfs < 0 || destOfs < 0 || len < 0 || srcOfs + len > srclen || destOfs + len > destlen) {
|
jtulach@678
|
12304 |
throw new IndexOutOfBoundsException();
|
jtulach@678
|
12305 |
}
|
jtulach@678
|
12306 |
if ((srcTypeName.charCodeAt(1) == 76 || srcTypeName.charCodeAt(1) == 91) && !$equals_0(srcTypeName, destTypeName)) {
|
jtulach@678
|
12307 |
srcArray = dynamicCast(src, 5);
|
jtulach@678
|
12308 |
destArray = dynamicCast(dest, 5);
|
jtulach@678
|
12309 |
if ((src == null?null:src) === (dest == null?null:dest) && srcOfs < destOfs) {
|
jtulach@678
|
12310 |
srcOfs += len;
|
jtulach@678
|
12311 |
for (destEnd = destOfs + len; destEnd-- > destOfs;) {
|
jtulach@678
|
12312 |
setCheck(destArray, destEnd, srcArray[--srcOfs]);
|
jtulach@678
|
12313 |
}
|
jtulach@678
|
12314 |
}
|
jtulach@678
|
12315 |
else {
|
jtulach@678
|
12316 |
for (destEnd = destOfs + len; destOfs < destEnd;) {
|
jtulach@678
|
12317 |
setCheck(destArray, destOfs++, srcArray[srcOfs++]);
|
jtulach@678
|
12318 |
}
|
jtulach@678
|
12319 |
}
|
jtulach@678
|
12320 |
}
|
jtulach@678
|
12321 |
else {
|
jtulach@678
|
12322 |
Array.prototype.splice.apply(dest, [destOfs, len].concat(src.slice(srcOfs, srcOfs + len)));
|
jtulach@678
|
12323 |
}
|
jtulach@678
|
12324 |
}
|
jtulach@678
|
12325 |
|
jtulach@678
|
12326 |
function $UnsupportedOperationException(this$static, message){
|
jtulach@678
|
12327 |
this$static.detailMessage = message;
|
jtulach@678
|
12328 |
return this$static;
|
jtulach@678
|
12329 |
}
|
jtulach@678
|
12330 |
|
jtulach@678
|
12331 |
function getClass_20(){
|
jtulach@678
|
12332 |
return Ljava_lang_UnsupportedOperationException_2_classLit;
|
jtulach@678
|
12333 |
}
|
jtulach@678
|
12334 |
|
jtulach@678
|
12335 |
function UnsupportedOperationException(){
|
jtulach@678
|
12336 |
}
|
jtulach@678
|
12337 |
|
jtulach@678
|
12338 |
_ = UnsupportedOperationException.prototype = new RuntimeException();
|
jtulach@678
|
12339 |
_.getClass$ = getClass_20;
|
jtulach@678
|
12340 |
_.typeId$ = 20;
|
jtulach@678
|
12341 |
function $advanceToFind(iter, o){
|
jtulach@678
|
12342 |
var t;
|
jtulach@678
|
12343 |
while (iter.hasNext()) {
|
jtulach@678
|
12344 |
t = iter.next_0();
|
jtulach@678
|
12345 |
if (o == null?t == null:equals__devirtual$(o, t)) {
|
jtulach@678
|
12346 |
return iter;
|
jtulach@678
|
12347 |
}
|
jtulach@678
|
12348 |
}
|
jtulach@678
|
12349 |
return null;
|
jtulach@678
|
12350 |
}
|
jtulach@678
|
12351 |
|
jtulach@678
|
12352 |
function add(o){
|
jtulach@678
|
12353 |
throw $UnsupportedOperationException(new UnsupportedOperationException(), 'Add not supported on this collection');
|
jtulach@678
|
12354 |
}
|
jtulach@678
|
12355 |
|
jtulach@678
|
12356 |
function contains(o){
|
jtulach@678
|
12357 |
var iter;
|
jtulach@678
|
12358 |
iter = $advanceToFind(this.iterator(), o);
|
jtulach@678
|
12359 |
return !!iter;
|
jtulach@678
|
12360 |
}
|
jtulach@678
|
12361 |
|
jtulach@678
|
12362 |
function getClass_21(){
|
jtulach@678
|
12363 |
return Ljava_util_AbstractCollection_2_classLit;
|
jtulach@678
|
12364 |
}
|
jtulach@678
|
12365 |
|
jtulach@678
|
12366 |
function toString_8(){
|
jtulach@678
|
12367 |
var comma, iter, sb;
|
jtulach@678
|
12368 |
sb = $StringBuffer(new StringBuffer());
|
jtulach@678
|
12369 |
comma = null;
|
jtulach@678
|
12370 |
$append_0(sb.builder, '[');
|
jtulach@678
|
12371 |
iter = this.iterator();
|
jtulach@678
|
12372 |
while (iter.hasNext()) {
|
jtulach@678
|
12373 |
if (comma != null) {
|
jtulach@678
|
12374 |
$append_0(sb.builder, comma);
|
jtulach@678
|
12375 |
}
|
jtulach@678
|
12376 |
else {
|
jtulach@678
|
12377 |
comma = ', ';
|
jtulach@678
|
12378 |
}
|
jtulach@678
|
12379 |
$append(sb, '' + iter.next_0());
|
jtulach@678
|
12380 |
}
|
jtulach@678
|
12381 |
$append_0(sb.builder, ']');
|
jtulach@678
|
12382 |
return $toString_0(sb.builder);
|
jtulach@678
|
12383 |
}
|
jtulach@678
|
12384 |
|
jtulach@678
|
12385 |
function AbstractCollection(){
|
jtulach@678
|
12386 |
}
|
jtulach@678
|
12387 |
|
jtulach@678
|
12388 |
_ = AbstractCollection.prototype = new Object_0();
|
jtulach@678
|
12389 |
_.add_1 = add;
|
jtulach@678
|
12390 |
_.contains = contains;
|
jtulach@678
|
12391 |
_.getClass$ = getClass_21;
|
jtulach@678
|
12392 |
_.toString$ = toString_8;
|
jtulach@678
|
12393 |
_.typeId$ = 0;
|
jtulach@678
|
12394 |
function equals_5(obj){
|
jtulach@678
|
12395 |
var entry, entry$iterator, otherKey, otherMap, otherValue;
|
jtulach@678
|
12396 |
if ((obj == null?null:obj) === (this == null?null:this)) {
|
jtulach@678
|
12397 |
return true;
|
jtulach@678
|
12398 |
}
|
jtulach@678
|
12399 |
if (!(obj != null && canCast(obj.typeId$, 16))) {
|
jtulach@678
|
12400 |
return false;
|
jtulach@678
|
12401 |
}
|
jtulach@678
|
12402 |
otherMap = dynamicCast(obj, 16);
|
jtulach@678
|
12403 |
if (dynamicCast(this, 16).size != otherMap.size) {
|
jtulach@678
|
12404 |
return false;
|
jtulach@678
|
12405 |
}
|
jtulach@678
|
12406 |
for (entry$iterator = $AbstractHashMap$EntrySetIterator(new AbstractHashMap$EntrySetIterator(), $AbstractHashMap$EntrySet(new AbstractHashMap$EntrySet(), otherMap).this$0); $hasNext(entry$iterator.iter);) {
|
jtulach@678
|
12407 |
entry = dynamicCast($next(entry$iterator.iter), 14);
|
jtulach@678
|
12408 |
otherKey = entry.getKey();
|
jtulach@678
|
12409 |
otherValue = entry.getValue();
|
jtulach@678
|
12410 |
if (!(otherKey == null?dynamicCast(this, 16).nullSlotLive:otherKey != null?$hasStringValue(dynamicCast(this, 16), otherKey):$hasHashValue(dynamicCast(this, 16), otherKey, ~~getHashCode_0(otherKey)))) {
|
jtulach@678
|
12411 |
return false;
|
jtulach@678
|
12412 |
}
|
jtulach@678
|
12413 |
if (!equalsWithNullCheck(otherValue, otherKey == null?dynamicCast(this, 16).nullSlot:otherKey != null?dynamicCast(this, 16).stringMap[':' + otherKey]:$getHashValue(dynamicCast(this, 16), otherKey, ~~getHashCode_0(otherKey)))) {
|
jtulach@678
|
12414 |
return false;
|
jtulach@678
|
12415 |
}
|
jtulach@678
|
12416 |
}
|
jtulach@678
|
12417 |
return true;
|
jtulach@678
|
12418 |
}
|
jtulach@678
|
12419 |
|
jtulach@678
|
12420 |
function getClass_31(){
|
jtulach@678
|
12421 |
return Ljava_util_AbstractMap_2_classLit;
|
jtulach@678
|
12422 |
}
|
jtulach@678
|
12423 |
|
jtulach@678
|
12424 |
function hashCode_6(){
|
jtulach@678
|
12425 |
var entry, entry$iterator, hashCode;
|
jtulach@678
|
12426 |
hashCode = 0;
|
jtulach@678
|
12427 |
for (entry$iterator = $AbstractHashMap$EntrySetIterator(new AbstractHashMap$EntrySetIterator(), $AbstractHashMap$EntrySet(new AbstractHashMap$EntrySet(), dynamicCast(this, 16)).this$0); $hasNext(entry$iterator.iter);) {
|
jtulach@678
|
12428 |
entry = dynamicCast($next(entry$iterator.iter), 14);
|
jtulach@678
|
12429 |
hashCode += entry.hashCode$();
|
jtulach@678
|
12430 |
hashCode = ~~hashCode;
|
jtulach@678
|
12431 |
}
|
jtulach@678
|
12432 |
return hashCode;
|
jtulach@678
|
12433 |
}
|
jtulach@678
|
12434 |
|
jtulach@678
|
12435 |
function toString_10(){
|
jtulach@678
|
12436 |
var comma, entry, iter, s;
|
jtulach@678
|
12437 |
s = '{';
|
jtulach@678
|
12438 |
comma = false;
|
jtulach@678
|
12439 |
for (iter = $AbstractHashMap$EntrySetIterator(new AbstractHashMap$EntrySetIterator(), $AbstractHashMap$EntrySet(new AbstractHashMap$EntrySet(), dynamicCast(this, 16)).this$0); $hasNext(iter.iter);) {
|
jtulach@678
|
12440 |
entry = dynamicCast($next(iter.iter), 14);
|
jtulach@678
|
12441 |
if (comma) {
|
jtulach@678
|
12442 |
s += ', ';
|
jtulach@678
|
12443 |
}
|
jtulach@678
|
12444 |
else {
|
jtulach@678
|
12445 |
comma = true;
|
jtulach@678
|
12446 |
}
|
jtulach@678
|
12447 |
s += '' + entry.getKey();
|
jtulach@678
|
12448 |
s += '=';
|
jtulach@678
|
12449 |
s += '' + entry.getValue();
|
jtulach@678
|
12450 |
}
|
jtulach@678
|
12451 |
return s + '}';
|
jtulach@678
|
12452 |
}
|
jtulach@678
|
12453 |
|
jtulach@678
|
12454 |
function AbstractMap(){
|
jtulach@678
|
12455 |
}
|
jtulach@678
|
12456 |
|
jtulach@678
|
12457 |
_ = AbstractMap.prototype = new Object_0();
|
jtulach@678
|
12458 |
_.equals$ = equals_5;
|
jtulach@678
|
12459 |
_.getClass$ = getClass_31;
|
jtulach@678
|
12460 |
_.hashCode$ = hashCode_6;
|
jtulach@678
|
12461 |
_.toString$ = toString_10;
|
jtulach@678
|
12462 |
_.typeId$ = 0;
|
jtulach@678
|
12463 |
function $addAllHashEntries(this$static, dest){
|
jtulach@678
|
12464 |
var hashCodeMap = this$static.hashCodeMap;
|
jtulach@678
|
12465 |
for (var hashCode in hashCodeMap) {
|
jtulach@678
|
12466 |
if (hashCode == parseInt(hashCode)) {
|
jtulach@678
|
12467 |
var array = hashCodeMap[hashCode];
|
jtulach@678
|
12468 |
for (var i = 0, c = array.length; i < c; ++i) {
|
jtulach@678
|
12469 |
dest.add_1(array[i]);
|
jtulach@678
|
12470 |
}
|
jtulach@678
|
12471 |
}
|
jtulach@678
|
12472 |
}
|
jtulach@678
|
12473 |
}
|
jtulach@678
|
12474 |
|
jtulach@678
|
12475 |
function $addAllStringEntries(this$static, dest){
|
jtulach@678
|
12476 |
var stringMap = this$static.stringMap;
|
jtulach@678
|
12477 |
for (var key in stringMap) {
|
jtulach@678
|
12478 |
if (key.charCodeAt(0) == 58) {
|
jtulach@678
|
12479 |
var entry = new_$(this$static, key.substring(1));
|
jtulach@678
|
12480 |
dest.add_1(entry);
|
jtulach@678
|
12481 |
}
|
jtulach@678
|
12482 |
}
|
jtulach@678
|
12483 |
}
|
jtulach@678
|
12484 |
|
jtulach@678
|
12485 |
function $clearImpl(this$static){
|
jtulach@678
|
12486 |
this$static.hashCodeMap = [];
|
jtulach@678
|
12487 |
this$static.stringMap = {};
|
jtulach@678
|
12488 |
this$static.nullSlotLive = false;
|
jtulach@678
|
12489 |
this$static.nullSlot = null;
|
jtulach@678
|
12490 |
this$static.size = 0;
|
jtulach@678
|
12491 |
}
|
jtulach@678
|
12492 |
|
jtulach@678
|
12493 |
function $containsKey(this$static, key){
|
jtulach@678
|
12494 |
return key == null?this$static.nullSlotLive:key != null?':' + key in this$static.stringMap:$hasHashValue(this$static, key, ~~getHashCode_0(key));
|
jtulach@678
|
12495 |
}
|
jtulach@678
|
12496 |
|
jtulach@678
|
12497 |
function $get(this$static, key){
|
jtulach@678
|
12498 |
return key == null?this$static.nullSlot:key != null?this$static.stringMap[':' + key]:$getHashValue(this$static, key, ~~getHashCode_0(key));
|
jtulach@678
|
12499 |
}
|
jtulach@678
|
12500 |
|
jtulach@678
|
12501 |
function $getHashValue(this$static, key, hashCode){
|
jtulach@678
|
12502 |
var array = this$static.hashCodeMap[hashCode];
|
jtulach@678
|
12503 |
if (array) {
|
jtulach@678
|
12504 |
for (var i = 0, c = array.length; i < c; ++i) {
|
jtulach@678
|
12505 |
var entry = array[i];
|
jtulach@678
|
12506 |
var entryKey = entry.getKey();
|
jtulach@678
|
12507 |
if (this$static.equalsBridge(key, entryKey)) {
|
jtulach@678
|
12508 |
return entry.getValue();
|
jtulach@678
|
12509 |
}
|
jtulach@678
|
12510 |
}
|
jtulach@678
|
12511 |
}
|
jtulach@678
|
12512 |
return null;
|
jtulach@678
|
12513 |
}
|
jtulach@678
|
12514 |
|
jtulach@678
|
12515 |
function $hasHashValue(this$static, key, hashCode){
|
jtulach@678
|
12516 |
var array = this$static.hashCodeMap[hashCode];
|
jtulach@678
|
12517 |
if (array) {
|
jtulach@678
|
12518 |
for (var i = 0, c = array.length; i < c; ++i) {
|
jtulach@678
|
12519 |
var entry = array[i];
|
jtulach@678
|
12520 |
var entryKey = entry.getKey();
|
jtulach@678
|
12521 |
if (this$static.equalsBridge(key, entryKey)) {
|
jtulach@678
|
12522 |
return true;
|
jtulach@678
|
12523 |
}
|
jtulach@678
|
12524 |
}
|
jtulach@678
|
12525 |
}
|
jtulach@678
|
12526 |
return false;
|
jtulach@678
|
12527 |
}
|
jtulach@678
|
12528 |
|
jtulach@678
|
12529 |
function $hasStringValue(this$static, key){
|
jtulach@678
|
12530 |
return ':' + key in this$static.stringMap;
|
jtulach@678
|
12531 |
}
|
jtulach@678
|
12532 |
|
jtulach@678
|
12533 |
function equalsBridge(value1, value2){
|
jtulach@678
|
12534 |
return (value1 == null?null:value1) === (value2 == null?null:value2) || value1 != null && equals__devirtual$(value1, value2);
|
jtulach@678
|
12535 |
}
|
jtulach@678
|
12536 |
|
jtulach@678
|
12537 |
function getClass_26(){
|
jtulach@678
|
12538 |
return Ljava_util_AbstractHashMap_2_classLit;
|
jtulach@678
|
12539 |
}
|
jtulach@678
|
12540 |
|
jtulach@678
|
12541 |
function AbstractHashMap(){
|
jtulach@678
|
12542 |
}
|
jtulach@678
|
12543 |
|
jtulach@678
|
12544 |
_ = AbstractHashMap.prototype = new AbstractMap();
|
jtulach@678
|
12545 |
_.equalsBridge = equalsBridge;
|
jtulach@678
|
12546 |
_.getClass$ = getClass_26;
|
jtulach@678
|
12547 |
_.typeId$ = 0;
|
jtulach@678
|
12548 |
_.hashCodeMap = null;
|
jtulach@678
|
12549 |
_.nullSlot = null;
|
jtulach@678
|
12550 |
_.nullSlotLive = false;
|
jtulach@678
|
12551 |
_.size = 0;
|
jtulach@678
|
12552 |
_.stringMap = null;
|
jtulach@678
|
12553 |
function equals_6(o){
|
jtulach@678
|
12554 |
var iter, other, otherItem;
|
jtulach@678
|
12555 |
if ((o == null?null:o) === (this == null?null:this)) {
|
jtulach@678
|
12556 |
return true;
|
jtulach@678
|
12557 |
}
|
jtulach@678
|
12558 |
if (!(o != null && canCast(o.typeId$, 18))) {
|
jtulach@678
|
12559 |
return false;
|
jtulach@678
|
12560 |
}
|
jtulach@678
|
12561 |
other = dynamicCast(o, 18);
|
jtulach@678
|
12562 |
if (other.this$0.size != this.size_0()) {
|
jtulach@678
|
12563 |
return false;
|
jtulach@678
|
12564 |
}
|
jtulach@678
|
12565 |
for (iter = $AbstractHashMap$EntrySetIterator(new AbstractHashMap$EntrySetIterator(), other.this$0); $hasNext(iter.iter);) {
|
jtulach@678
|
12566 |
otherItem = dynamicCast($next(iter.iter), 14);
|
jtulach@678
|
12567 |
if (!this.contains(otherItem)) {
|
jtulach@678
|
12568 |
return false;
|
jtulach@678
|
12569 |
}
|
jtulach@678
|
12570 |
}
|
jtulach@678
|
12571 |
return true;
|
jtulach@678
|
12572 |
}
|
jtulach@678
|
12573 |
|
jtulach@678
|
12574 |
function getClass_33(){
|
jtulach@678
|
12575 |
return Ljava_util_AbstractSet_2_classLit;
|
jtulach@678
|
12576 |
}
|
jtulach@678
|
12577 |
|
jtulach@678
|
12578 |
function hashCode_7(){
|
jtulach@678
|
12579 |
var hashCode, iter, next;
|
jtulach@678
|
12580 |
hashCode = 0;
|
jtulach@678
|
12581 |
for (iter = this.iterator(); iter.hasNext();) {
|
jtulach@678
|
12582 |
next = iter.next_0();
|
jtulach@678
|
12583 |
if (next != null) {
|
jtulach@678
|
12584 |
hashCode += hashCode__devirtual$(next);
|
jtulach@678
|
12585 |
hashCode = ~~hashCode;
|
jtulach@678
|
12586 |
}
|
jtulach@678
|
12587 |
}
|
jtulach@678
|
12588 |
return hashCode;
|
jtulach@678
|
12589 |
}
|
jtulach@678
|
12590 |
|
jtulach@678
|
12591 |
function AbstractSet(){
|
jtulach@678
|
12592 |
}
|
jtulach@678
|
12593 |
|
jtulach@678
|
12594 |
_ = AbstractSet.prototype = new AbstractCollection();
|
jtulach@678
|
12595 |
_.equals$ = equals_6;
|
jtulach@678
|
12596 |
_.getClass$ = getClass_33;
|
jtulach@678
|
12597 |
_.hashCode$ = hashCode_7;
|
jtulach@678
|
12598 |
_.typeId$ = 0;
|
jtulach@678
|
12599 |
function $AbstractHashMap$EntrySet(this$static, this$0){
|
jtulach@678
|
12600 |
this$static.this$0 = this$0;
|
jtulach@678
|
12601 |
return this$static;
|
jtulach@678
|
12602 |
}
|
jtulach@678
|
12603 |
|
jtulach@678
|
12604 |
function contains_0(o){
|
jtulach@678
|
12605 |
var entry, key, value;
|
jtulach@678
|
12606 |
if (o != null && canCast(o.typeId$, 14)) {
|
jtulach@678
|
12607 |
entry = dynamicCast(o, 14);
|
jtulach@678
|
12608 |
key = entry.getKey();
|
jtulach@678
|
12609 |
if ($containsKey(this.this$0, key)) {
|
jtulach@678
|
12610 |
value = $get(this.this$0, key);
|
jtulach@678
|
12611 |
return $equals_1(entry.getValue(), value);
|
jtulach@678
|
12612 |
}
|
jtulach@678
|
12613 |
}
|
jtulach@678
|
12614 |
return false;
|
jtulach@678
|
12615 |
}
|
jtulach@678
|
12616 |
|
jtulach@678
|
12617 |
function getClass_23(){
|
jtulach@678
|
12618 |
return Ljava_util_AbstractHashMap$EntrySet_2_classLit;
|
jtulach@678
|
12619 |
}
|
jtulach@678
|
12620 |
|
jtulach@678
|
12621 |
function iterator(){
|
jtulach@678
|
12622 |
return $AbstractHashMap$EntrySetIterator(new AbstractHashMap$EntrySetIterator(), this.this$0);
|
jtulach@678
|
12623 |
}
|
jtulach@678
|
12624 |
|
jtulach@678
|
12625 |
function size_0(){
|
jtulach@678
|
12626 |
return this.this$0.size;
|
jtulach@678
|
12627 |
}
|
jtulach@678
|
12628 |
|
jtulach@678
|
12629 |
function AbstractHashMap$EntrySet(){
|
jtulach@678
|
12630 |
}
|
jtulach@678
|
12631 |
|
jtulach@678
|
12632 |
_ = AbstractHashMap$EntrySet.prototype = new AbstractSet();
|
jtulach@678
|
12633 |
_.contains = contains_0;
|
jtulach@678
|
12634 |
_.getClass$ = getClass_23;
|
jtulach@678
|
12635 |
_.iterator = iterator;
|
jtulach@678
|
12636 |
_.size_0 = size_0;
|
jtulach@678
|
12637 |
_.typeId$ = 21;
|
jtulach@678
|
12638 |
_.this$0 = null;
|
jtulach@678
|
12639 |
function $AbstractHashMap$EntrySetIterator(this$static, this$0){
|
jtulach@678
|
12640 |
var list;
|
jtulach@678
|
12641 |
this$static.this$0 = this$0;
|
jtulach@678
|
12642 |
list = $ArrayList(new ArrayList());
|
jtulach@678
|
12643 |
if (this$static.this$0.nullSlotLive) {
|
jtulach@678
|
12644 |
$add(list, $AbstractHashMap$MapEntryNull(new AbstractHashMap$MapEntryNull(), this$static.this$0));
|
jtulach@678
|
12645 |
}
|
jtulach@678
|
12646 |
$addAllStringEntries(this$static.this$0, list);
|
jtulach@678
|
12647 |
$addAllHashEntries(this$static.this$0, list);
|
jtulach@678
|
12648 |
this$static.iter = $AbstractList$IteratorImpl(new AbstractList$IteratorImpl(), list);
|
jtulach@678
|
12649 |
return this$static;
|
jtulach@678
|
12650 |
}
|
jtulach@678
|
12651 |
|
jtulach@678
|
12652 |
function getClass_22(){
|
jtulach@678
|
12653 |
return Ljava_util_AbstractHashMap$EntrySetIterator_2_classLit;
|
jtulach@678
|
12654 |
}
|
jtulach@678
|
12655 |
|
jtulach@678
|
12656 |
function hasNext(){
|
jtulach@678
|
12657 |
return $hasNext(this.iter);
|
jtulach@678
|
12658 |
}
|
jtulach@678
|
12659 |
|
jtulach@678
|
12660 |
function next_0(){
|
jtulach@678
|
12661 |
return dynamicCast($next(this.iter), 14);
|
jtulach@678
|
12662 |
}
|
jtulach@678
|
12663 |
|
jtulach@678
|
12664 |
function AbstractHashMap$EntrySetIterator(){
|
jtulach@678
|
12665 |
}
|
jtulach@678
|
12666 |
|
jtulach@678
|
12667 |
_ = AbstractHashMap$EntrySetIterator.prototype = new Object_0();
|
jtulach@678
|
12668 |
_.getClass$ = getClass_22;
|
jtulach@678
|
12669 |
_.hasNext = hasNext;
|
jtulach@678
|
12670 |
_.next_0 = next_0;
|
jtulach@678
|
12671 |
_.typeId$ = 0;
|
jtulach@678
|
12672 |
_.iter = null;
|
jtulach@678
|
12673 |
_.this$0 = null;
|
jtulach@678
|
12674 |
function equals_4(other){
|
jtulach@678
|
12675 |
var entry;
|
jtulach@678
|
12676 |
if (other != null && canCast(other.typeId$, 14)) {
|
jtulach@678
|
12677 |
entry = dynamicCast(other, 14);
|
jtulach@678
|
12678 |
if (equalsWithNullCheck(this.getKey(), entry.getKey()) && equalsWithNullCheck(this.getValue(), entry.getValue())) {
|
jtulach@678
|
12679 |
return true;
|
jtulach@678
|
12680 |
}
|
jtulach@678
|
12681 |
}
|
jtulach@678
|
12682 |
return false;
|
jtulach@678
|
12683 |
}
|
jtulach@678
|
12684 |
|
jtulach@678
|
12685 |
function getClass_30(){
|
jtulach@678
|
12686 |
return Ljava_util_AbstractMapEntry_2_classLit;
|
jtulach@678
|
12687 |
}
|
jtulach@678
|
12688 |
|
jtulach@678
|
12689 |
function hashCode_5(){
|
jtulach@678
|
12690 |
var keyHash, valueHash;
|
jtulach@678
|
12691 |
keyHash = 0;
|
jtulach@678
|
12692 |
valueHash = 0;
|
jtulach@678
|
12693 |
if (this.getKey() != null) {
|
jtulach@678
|
12694 |
keyHash = getHashCode_0(this.getKey());
|
jtulach@678
|
12695 |
}
|
jtulach@678
|
12696 |
if (this.getValue() != null) {
|
jtulach@678
|
12697 |
valueHash = hashCode__devirtual$(this.getValue());
|
jtulach@678
|
12698 |
}
|
jtulach@678
|
12699 |
return keyHash ^ valueHash;
|
jtulach@678
|
12700 |
}
|
jtulach@678
|
12701 |
|
jtulach@678
|
12702 |
function toString_9(){
|
jtulach@678
|
12703 |
return this.getKey() + '=' + this.getValue();
|
jtulach@678
|
12704 |
}
|
jtulach@678
|
12705 |
|
jtulach@678
|
12706 |
function AbstractMapEntry(){
|
jtulach@678
|
12707 |
}
|
jtulach@678
|
12708 |
|
jtulach@678
|
12709 |
_ = AbstractMapEntry.prototype = new Object_0();
|
jtulach@678
|
12710 |
_.equals$ = equals_4;
|
jtulach@678
|
12711 |
_.getClass$ = getClass_30;
|
jtulach@678
|
12712 |
_.hashCode$ = hashCode_5;
|
jtulach@678
|
12713 |
_.toString$ = toString_9;
|
jtulach@678
|
12714 |
_.typeId$ = 22;
|
jtulach@678
|
12715 |
function $AbstractHashMap$MapEntryNull(this$static, this$0){
|
jtulach@678
|
12716 |
this$static.this$0 = this$0;
|
jtulach@678
|
12717 |
return this$static;
|
jtulach@678
|
12718 |
}
|
jtulach@678
|
12719 |
|
jtulach@678
|
12720 |
function getClass_24(){
|
jtulach@678
|
12721 |
return Ljava_util_AbstractHashMap$MapEntryNull_2_classLit;
|
jtulach@678
|
12722 |
}
|
jtulach@678
|
12723 |
|
jtulach@678
|
12724 |
function getKey(){
|
jtulach@678
|
12725 |
return null;
|
jtulach@678
|
12726 |
}
|
jtulach@678
|
12727 |
|
jtulach@678
|
12728 |
function getValue(){
|
jtulach@678
|
12729 |
return this.this$0.nullSlot;
|
jtulach@678
|
12730 |
}
|
jtulach@678
|
12731 |
|
jtulach@678
|
12732 |
function AbstractHashMap$MapEntryNull(){
|
jtulach@678
|
12733 |
}
|
jtulach@678
|
12734 |
|
jtulach@678
|
12735 |
_ = AbstractHashMap$MapEntryNull.prototype = new AbstractMapEntry();
|
jtulach@678
|
12736 |
_.getClass$ = getClass_24;
|
jtulach@678
|
12737 |
_.getKey = getKey;
|
jtulach@678
|
12738 |
_.getValue = getValue;
|
jtulach@678
|
12739 |
_.typeId$ = 23;
|
jtulach@678
|
12740 |
_.this$0 = null;
|
jtulach@678
|
12741 |
function $AbstractHashMap$MapEntryString(this$static, key, this$0){
|
jtulach@678
|
12742 |
this$static.this$0 = this$0;
|
jtulach@678
|
12743 |
this$static.key = key;
|
jtulach@678
|
12744 |
return this$static;
|
jtulach@678
|
12745 |
}
|
jtulach@678
|
12746 |
|
jtulach@678
|
12747 |
function getClass_25(){
|
jtulach@678
|
12748 |
return Ljava_util_AbstractHashMap$MapEntryString_2_classLit;
|
jtulach@678
|
12749 |
}
|
jtulach@678
|
12750 |
|
jtulach@678
|
12751 |
function getKey_0(){
|
jtulach@678
|
12752 |
return this.key;
|
jtulach@678
|
12753 |
}
|
jtulach@678
|
12754 |
|
jtulach@678
|
12755 |
function getValue_0(){
|
jtulach@678
|
12756 |
return this.this$0.stringMap[':' + this.key];
|
jtulach@678
|
12757 |
}
|
jtulach@678
|
12758 |
|
jtulach@678
|
12759 |
function new_$(this$outer, key){
|
jtulach@678
|
12760 |
return $AbstractHashMap$MapEntryString(new AbstractHashMap$MapEntryString(), key, this$outer);
|
jtulach@678
|
12761 |
}
|
jtulach@678
|
12762 |
|
jtulach@678
|
12763 |
function AbstractHashMap$MapEntryString(){
|
jtulach@678
|
12764 |
}
|
jtulach@678
|
12765 |
|
jtulach@678
|
12766 |
_ = AbstractHashMap$MapEntryString.prototype = new AbstractMapEntry();
|
jtulach@678
|
12767 |
_.getClass$ = getClass_25;
|
jtulach@678
|
12768 |
_.getKey = getKey_0;
|
jtulach@678
|
12769 |
_.getValue = getValue_0;
|
jtulach@678
|
12770 |
_.typeId$ = 24;
|
jtulach@678
|
12771 |
_.key = null;
|
jtulach@678
|
12772 |
_.this$0 = null;
|
jtulach@678
|
12773 |
function add_1(obj){
|
jtulach@678
|
12774 |
this.add_0(this.size_0(), obj);
|
jtulach@678
|
12775 |
return true;
|
jtulach@678
|
12776 |
}
|
jtulach@678
|
12777 |
|
jtulach@678
|
12778 |
function add_0(index, element){
|
jtulach@678
|
12779 |
throw $UnsupportedOperationException(new UnsupportedOperationException(), 'Add not supported on this list');
|
jtulach@678
|
12780 |
}
|
jtulach@678
|
12781 |
|
jtulach@678
|
12782 |
function checkIndex(index, size){
|
jtulach@678
|
12783 |
if (index < 0 || index >= size) {
|
jtulach@678
|
12784 |
indexOutOfBounds(index, size);
|
jtulach@678
|
12785 |
}
|
jtulach@678
|
12786 |
}
|
jtulach@678
|
12787 |
|
jtulach@678
|
12788 |
function equals_3(o){
|
jtulach@678
|
12789 |
var elem, elemOther, iter, iterOther, other;
|
jtulach@678
|
12790 |
if ((o == null?null:o) === (this == null?null:this)) {
|
jtulach@678
|
12791 |
return true;
|
jtulach@678
|
12792 |
}
|
jtulach@678
|
12793 |
if (!(o != null && canCast(o.typeId$, 15))) {
|
jtulach@678
|
12794 |
return false;
|
jtulach@678
|
12795 |
}
|
jtulach@678
|
12796 |
other = dynamicCast(o, 15);
|
jtulach@678
|
12797 |
if (this.size_0() != other.size_0()) {
|
jtulach@678
|
12798 |
return false;
|
jtulach@678
|
12799 |
}
|
jtulach@678
|
12800 |
iter = this.iterator();
|
jtulach@678
|
12801 |
iterOther = other.iterator();
|
jtulach@678
|
12802 |
while (iter.i < iter.this$0.size_0()) {
|
jtulach@678
|
12803 |
elem = $next(iter);
|
jtulach@678
|
12804 |
elemOther = $next(iterOther);
|
jtulach@678
|
12805 |
if (!(elem == null?elemOther == null:equals__devirtual$(elem, elemOther))) {
|
jtulach@678
|
12806 |
return false;
|
jtulach@678
|
12807 |
}
|
jtulach@678
|
12808 |
}
|
jtulach@678
|
12809 |
return true;
|
jtulach@678
|
12810 |
}
|
jtulach@678
|
12811 |
|
jtulach@678
|
12812 |
function getClass_29(){
|
jtulach@678
|
12813 |
return Ljava_util_AbstractList_2_classLit;
|
jtulach@678
|
12814 |
}
|
jtulach@678
|
12815 |
|
jtulach@678
|
12816 |
function hashCode_4(){
|
jtulach@678
|
12817 |
var iter, k, obj;
|
jtulach@678
|
12818 |
k = 1;
|
jtulach@678
|
12819 |
iter = this.iterator();
|
jtulach@678
|
12820 |
while (iter.i < iter.this$0.size_0()) {
|
jtulach@678
|
12821 |
obj = $next(iter);
|
jtulach@678
|
12822 |
k = 31 * k + (obj == null?0:hashCode__devirtual$(obj));
|
jtulach@678
|
12823 |
k = ~~k;
|
jtulach@678
|
12824 |
}
|
jtulach@678
|
12825 |
return k;
|
jtulach@678
|
12826 |
}
|
jtulach@678
|
12827 |
|
jtulach@678
|
12828 |
function indexOutOfBounds(index, size){
|
jtulach@678
|
12829 |
throw $IndexOutOfBoundsException(new IndexOutOfBoundsException(), 'Index: ' + index + ', Size: ' + size);
|
jtulach@678
|
12830 |
}
|
jtulach@678
|
12831 |
|
jtulach@678
|
12832 |
function iterator_0(){
|
jtulach@678
|
12833 |
return $AbstractList$IteratorImpl(new AbstractList$IteratorImpl(), this);
|
jtulach@678
|
12834 |
}
|
jtulach@678
|
12835 |
|
jtulach@678
|
12836 |
function AbstractList(){
|
jtulach@678
|
12837 |
}
|
jtulach@678
|
12838 |
|
jtulach@678
|
12839 |
_ = AbstractList.prototype = new AbstractCollection();
|
jtulach@678
|
12840 |
_.add_1 = add_1;
|
jtulach@678
|
12841 |
_.add_0 = add_0;
|
jtulach@678
|
12842 |
_.equals$ = equals_3;
|
jtulach@678
|
12843 |
_.getClass$ = getClass_29;
|
jtulach@678
|
12844 |
_.hashCode$ = hashCode_4;
|
jtulach@678
|
12845 |
_.iterator = iterator_0;
|
jtulach@678
|
12846 |
_.typeId$ = 25;
|
jtulach@678
|
12847 |
function $AbstractList$IteratorImpl(this$static, this$0){
|
jtulach@678
|
12848 |
this$static.this$0 = this$0;
|
jtulach@678
|
12849 |
return this$static;
|
jtulach@678
|
12850 |
}
|
jtulach@678
|
12851 |
|
jtulach@678
|
12852 |
function $hasNext(this$static){
|
jtulach@678
|
12853 |
return this$static.i < this$static.this$0.size_0();
|
jtulach@678
|
12854 |
}
|
jtulach@678
|
12855 |
|
jtulach@678
|
12856 |
function $next(this$static){
|
jtulach@678
|
12857 |
if (this$static.i >= this$static.this$0.size_0()) {
|
jtulach@678
|
12858 |
throw new NoSuchElementException();
|
jtulach@678
|
12859 |
}
|
jtulach@678
|
12860 |
return this$static.this$0.get(this$static.i++);
|
jtulach@678
|
12861 |
}
|
jtulach@678
|
12862 |
|
jtulach@678
|
12863 |
function getClass_27(){
|
jtulach@678
|
12864 |
return Ljava_util_AbstractList$IteratorImpl_2_classLit;
|
jtulach@678
|
12865 |
}
|
jtulach@678
|
12866 |
|
jtulach@678
|
12867 |
function hasNext_0(){
|
jtulach@678
|
12868 |
return this.i < this.this$0.size_0();
|
jtulach@678
|
12869 |
}
|
jtulach@678
|
12870 |
|
jtulach@678
|
12871 |
function next_1(){
|
jtulach@678
|
12872 |
return $next(this);
|
jtulach@678
|
12873 |
}
|
jtulach@678
|
12874 |
|
jtulach@678
|
12875 |
function AbstractList$IteratorImpl(){
|
jtulach@678
|
12876 |
}
|
jtulach@678
|
12877 |
|
jtulach@678
|
12878 |
_ = AbstractList$IteratorImpl.prototype = new Object_0();
|
jtulach@678
|
12879 |
_.getClass$ = getClass_27;
|
jtulach@678
|
12880 |
_.hasNext = hasNext_0;
|
jtulach@678
|
12881 |
_.next_0 = next_1;
|
jtulach@678
|
12882 |
_.typeId$ = 0;
|
jtulach@678
|
12883 |
_.i = 0;
|
jtulach@678
|
12884 |
_.this$0 = null;
|
jtulach@678
|
12885 |
function $AbstractList$ListIteratorImpl(this$static, this$0){
|
jtulach@678
|
12886 |
this$static.this$0 = this$0;
|
jtulach@678
|
12887 |
return this$static;
|
jtulach@678
|
12888 |
}
|
jtulach@678
|
12889 |
|
jtulach@678
|
12890 |
function getClass_28(){
|
jtulach@678
|
12891 |
return Ljava_util_AbstractList$ListIteratorImpl_2_classLit;
|
jtulach@678
|
12892 |
}
|
jtulach@678
|
12893 |
|
jtulach@678
|
12894 |
function AbstractList$ListIteratorImpl(){
|
jtulach@678
|
12895 |
}
|
jtulach@678
|
12896 |
|
jtulach@678
|
12897 |
_ = AbstractList$ListIteratorImpl.prototype = new AbstractList$IteratorImpl();
|
jtulach@678
|
12898 |
_.getClass$ = getClass_28;
|
jtulach@678
|
12899 |
_.typeId$ = 0;
|
jtulach@678
|
12900 |
function add_2(index, element){
|
jtulach@678
|
12901 |
var iter;
|
jtulach@678
|
12902 |
iter = $listIterator(this, index);
|
jtulach@678
|
12903 |
$addBefore(iter.this$0, element, iter.currentNode);
|
jtulach@678
|
12904 |
++iter.currentIndex;
|
jtulach@678
|
12905 |
iter.lastNode = null;
|
jtulach@678
|
12906 |
}
|
jtulach@678
|
12907 |
|
jtulach@678
|
12908 |
function get(index){
|
jtulach@678
|
12909 |
var $e0, iter;
|
jtulach@678
|
12910 |
iter = $listIterator(this, index);
|
jtulach@678
|
12911 |
try {
|
jtulach@678
|
12912 |
return $next_0(iter);
|
jtulach@678
|
12913 |
}
|
jtulach@678
|
12914 |
catch ($e0) {
|
jtulach@678
|
12915 |
$e0 = caught($e0);
|
jtulach@678
|
12916 |
if (instanceOf($e0, 17)) {
|
jtulach@678
|
12917 |
throw $IndexOutOfBoundsException(new IndexOutOfBoundsException(), "Can't get element " + index);
|
jtulach@678
|
12918 |
}
|
jtulach@678
|
12919 |
else
|
jtulach@678
|
12920 |
throw $e0;
|
jtulach@678
|
12921 |
}
|
jtulach@678
|
12922 |
}
|
jtulach@678
|
12923 |
|
jtulach@678
|
12924 |
function getClass_32(){
|
jtulach@678
|
12925 |
return Ljava_util_AbstractSequentialList_2_classLit;
|
jtulach@678
|
12926 |
}
|
jtulach@678
|
12927 |
|
jtulach@678
|
12928 |
function iterator_1(){
|
jtulach@678
|
12929 |
return $AbstractList$ListIteratorImpl(new AbstractList$ListIteratorImpl(), this);
|
jtulach@678
|
12930 |
}
|
jtulach@678
|
12931 |
|
jtulach@678
|
12932 |
function AbstractSequentialList(){
|
jtulach@678
|
12933 |
}
|
jtulach@678
|
12934 |
|
jtulach@678
|
12935 |
_ = AbstractSequentialList.prototype = new AbstractList();
|
jtulach@678
|
12936 |
_.add_0 = add_2;
|
jtulach@678
|
12937 |
_.get = get;
|
jtulach@678
|
12938 |
_.getClass$ = getClass_32;
|
jtulach@678
|
12939 |
_.iterator = iterator_1;
|
jtulach@678
|
12940 |
_.typeId$ = 26;
|
jtulach@678
|
12941 |
function $ArrayList(this$static){
|
jtulach@678
|
12942 |
this$static.array = initDim(_3Ljava_lang_Object_2_classLit, 47, 0, 0, 0);
|
jtulach@678
|
12943 |
this$static.size = 0;
|
jtulach@678
|
12944 |
return this$static;
|
jtulach@678
|
12945 |
}
|
jtulach@678
|
12946 |
|
jtulach@678
|
12947 |
function $add(this$static, o){
|
jtulach@678
|
12948 |
setCheck(this$static.array, this$static.size++, o);
|
jtulach@678
|
12949 |
return true;
|
jtulach@678
|
12950 |
}
|
jtulach@678
|
12951 |
|
jtulach@678
|
12952 |
function $get_0(this$static, index){
|
jtulach@678
|
12953 |
checkIndex(index, this$static.size);
|
jtulach@678
|
12954 |
return this$static.array[index];
|
jtulach@678
|
12955 |
}
|
jtulach@678
|
12956 |
|
jtulach@678
|
12957 |
function $indexOf_0(this$static, o, index){
|
jtulach@678
|
12958 |
for (; index < this$static.size; ++index) {
|
jtulach@678
|
12959 |
if (equalsWithNullCheck(o, this$static.array[index])) {
|
jtulach@678
|
12960 |
return index;
|
jtulach@678
|
12961 |
}
|
jtulach@678
|
12962 |
}
|
jtulach@678
|
12963 |
return -1;
|
jtulach@678
|
12964 |
}
|
jtulach@678
|
12965 |
|
jtulach@678
|
12966 |
function $remove_0(this$static, o){
|
jtulach@678
|
12967 |
var i, previous;
|
jtulach@678
|
12968 |
i = $indexOf_0(this$static, o, 0);
|
jtulach@678
|
12969 |
if (i == -1) {
|
jtulach@678
|
12970 |
return false;
|
jtulach@678
|
12971 |
}
|
jtulach@678
|
12972 |
previous = (checkIndex(i, this$static.size) , this$static.array[i]);
|
jtulach@678
|
12973 |
this$static.array.splice(i, 1);
|
jtulach@678
|
12974 |
--this$static.size;
|
jtulach@678
|
12975 |
return true;
|
jtulach@678
|
12976 |
}
|
jtulach@678
|
12977 |
|
jtulach@678
|
12978 |
function add_4(o){
|
jtulach@678
|
12979 |
return setCheck(this.array, this.size++, o) , true;
|
jtulach@678
|
12980 |
}
|
jtulach@678
|
12981 |
|
jtulach@678
|
12982 |
function add_3(index, o){
|
jtulach@678
|
12983 |
if (index < 0 || index > this.size) {
|
jtulach@678
|
12984 |
indexOutOfBounds(index, this.size);
|
jtulach@678
|
12985 |
}
|
jtulach@678
|
12986 |
this.array.splice(index, 0, o);
|
jtulach@678
|
12987 |
++this.size;
|
jtulach@678
|
12988 |
}
|
jtulach@678
|
12989 |
|
jtulach@678
|
12990 |
function contains_1(o){
|
jtulach@678
|
12991 |
return $indexOf_0(this, o, 0) != -1;
|
jtulach@678
|
12992 |
}
|
jtulach@678
|
12993 |
|
jtulach@678
|
12994 |
function get_0(index){
|
jtulach@678
|
12995 |
return checkIndex(index, this.size) , this.array[index];
|
jtulach@678
|
12996 |
}
|
jtulach@678
|
12997 |
|
jtulach@678
|
12998 |
function getClass_34(){
|
jtulach@678
|
12999 |
return Ljava_util_ArrayList_2_classLit;
|
jtulach@678
|
13000 |
}
|
jtulach@678
|
13001 |
|
jtulach@678
|
13002 |
function size_1(){
|
jtulach@678
|
13003 |
return this.size;
|
jtulach@678
|
13004 |
}
|
jtulach@678
|
13005 |
|
jtulach@678
|
13006 |
function ArrayList(){
|
jtulach@678
|
13007 |
}
|
jtulach@678
|
13008 |
|
jtulach@678
|
13009 |
_ = ArrayList.prototype = new AbstractList();
|
jtulach@678
|
13010 |
_.add_1 = add_4;
|
jtulach@678
|
13011 |
_.add_0 = add_3;
|
jtulach@678
|
13012 |
_.contains = contains_1;
|
jtulach@678
|
13013 |
_.get = get_0;
|
jtulach@678
|
13014 |
_.getClass$ = getClass_34;
|
jtulach@678
|
13015 |
_.size_0 = size_1;
|
jtulach@678
|
13016 |
_.typeId$ = 27;
|
jtulach@678
|
13017 |
_.array = null;
|
jtulach@678
|
13018 |
_.size = 0;
|
jtulach@678
|
13019 |
function binarySearch(sortedArray, key){
|
jtulach@678
|
13020 |
var high, low, mid, midVal;
|
jtulach@678
|
13021 |
low = 0;
|
jtulach@678
|
13022 |
high = sortedArray.length - 1;
|
jtulach@678
|
13023 |
while (low <= high) {
|
jtulach@678
|
13024 |
mid = low + (high - low >> 1);
|
jtulach@678
|
13025 |
midVal = sortedArray[mid];
|
jtulach@678
|
13026 |
if (midVal < key) {
|
jtulach@678
|
13027 |
low = mid + 1;
|
jtulach@678
|
13028 |
}
|
jtulach@678
|
13029 |
else if (midVal > key) {
|
jtulach@678
|
13030 |
high = mid - 1;
|
jtulach@678
|
13031 |
}
|
jtulach@678
|
13032 |
else {
|
jtulach@678
|
13033 |
return mid;
|
jtulach@678
|
13034 |
}
|
jtulach@678
|
13035 |
}
|
jtulach@678
|
13036 |
return -low - 1;
|
jtulach@678
|
13037 |
}
|
jtulach@678
|
13038 |
|
jtulach@678
|
13039 |
function binarySearch_0(sortedArray, key, comparator){
|
jtulach@678
|
13040 |
var compareResult, high, low, mid, midVal;
|
jtulach@678
|
13041 |
if (!comparator) {
|
jtulach@678
|
13042 |
comparator = ($clinit_61() , NATURAL);
|
jtulach@678
|
13043 |
}
|
jtulach@678
|
13044 |
low = 0;
|
jtulach@678
|
13045 |
high = sortedArray.length - 1;
|
jtulach@678
|
13046 |
while (low <= high) {
|
jtulach@678
|
13047 |
mid = low + (high - low >> 1);
|
jtulach@678
|
13048 |
midVal = sortedArray[mid];
|
jtulach@678
|
13049 |
compareResult = midVal.compareTo$(key);
|
jtulach@678
|
13050 |
if (compareResult < 0) {
|
jtulach@678
|
13051 |
low = mid + 1;
|
jtulach@678
|
13052 |
}
|
jtulach@678
|
13053 |
else if (compareResult > 0) {
|
jtulach@678
|
13054 |
high = mid - 1;
|
jtulach@678
|
13055 |
}
|
jtulach@678
|
13056 |
else {
|
jtulach@678
|
13057 |
return mid;
|
jtulach@678
|
13058 |
}
|
jtulach@678
|
13059 |
}
|
jtulach@678
|
13060 |
return -low - 1;
|
jtulach@678
|
13061 |
}
|
jtulach@678
|
13062 |
|
jtulach@678
|
13063 |
function $clinit_61(){
|
jtulach@678
|
13064 |
$clinit_61 = nullMethod;
|
jtulach@678
|
13065 |
NATURAL = new Comparators$1();
|
jtulach@678
|
13066 |
}
|
jtulach@678
|
13067 |
|
jtulach@678
|
13068 |
var NATURAL;
|
jtulach@678
|
13069 |
function getClass_35(){
|
jtulach@678
|
13070 |
return Ljava_util_Comparators$1_2_classLit;
|
jtulach@678
|
13071 |
}
|
jtulach@678
|
13072 |
|
jtulach@678
|
13073 |
function Comparators$1(){
|
jtulach@678
|
13074 |
}
|
jtulach@678
|
13075 |
|
jtulach@678
|
13076 |
_ = Comparators$1.prototype = new Object_0();
|
jtulach@678
|
13077 |
_.getClass$ = getClass_35;
|
jtulach@678
|
13078 |
_.typeId$ = 0;
|
jtulach@678
|
13079 |
function $HashMap(this$static){
|
jtulach@678
|
13080 |
$clearImpl(this$static);
|
jtulach@678
|
13081 |
return this$static;
|
jtulach@678
|
13082 |
}
|
jtulach@678
|
13083 |
|
jtulach@678
|
13084 |
function $equals_1(value1, value2){
|
jtulach@678
|
13085 |
return (value1 == null?null:value1) === (value2 == null?null:value2) || value1 != null && equals__devirtual$(value1, value2);
|
jtulach@678
|
13086 |
}
|
jtulach@678
|
13087 |
|
jtulach@678
|
13088 |
function getClass_36(){
|
jtulach@678
|
13089 |
return Ljava_util_HashMap_2_classLit;
|
jtulach@678
|
13090 |
}
|
jtulach@678
|
13091 |
|
jtulach@678
|
13092 |
function HashMap(){
|
jtulach@678
|
13093 |
}
|
jtulach@678
|
13094 |
|
jtulach@678
|
13095 |
_ = HashMap.prototype = new AbstractHashMap();
|
jtulach@678
|
13096 |
_.getClass$ = getClass_36;
|
jtulach@678
|
13097 |
_.typeId$ = 28;
|
jtulach@678
|
13098 |
function $LinkedList(this$static){
|
jtulach@678
|
13099 |
this$static.header = $LinkedList$Node(new LinkedList$Node());
|
jtulach@678
|
13100 |
this$static.size = 0;
|
jtulach@678
|
13101 |
return this$static;
|
jtulach@678
|
13102 |
}
|
jtulach@678
|
13103 |
|
jtulach@678
|
13104 |
function $addBefore(this$static, o, target){
|
jtulach@678
|
13105 |
$LinkedList$Node_0(new LinkedList$Node(), o, target);
|
jtulach@678
|
13106 |
++this$static.size;
|
jtulach@678
|
13107 |
}
|
jtulach@678
|
13108 |
|
jtulach@678
|
13109 |
function $addLast(this$static, o){
|
jtulach@678
|
13110 |
$LinkedList$Node_0(new LinkedList$Node(), o, this$static.header);
|
jtulach@678
|
13111 |
++this$static.size;
|
jtulach@678
|
13112 |
}
|
jtulach@678
|
13113 |
|
jtulach@678
|
13114 |
function $clear(this$static){
|
jtulach@678
|
13115 |
this$static.header = $LinkedList$Node(new LinkedList$Node());
|
jtulach@678
|
13116 |
this$static.size = 0;
|
jtulach@678
|
13117 |
}
|
jtulach@678
|
13118 |
|
jtulach@678
|
13119 |
function $getLast(this$static){
|
jtulach@678
|
13120 |
$throwEmptyException(this$static);
|
jtulach@678
|
13121 |
return this$static.header.prev.value;
|
jtulach@678
|
13122 |
}
|
jtulach@678
|
13123 |
|
jtulach@678
|
13124 |
function $listIterator(this$static, index){
|
jtulach@678
|
13125 |
var i, node;
|
jtulach@678
|
13126 |
if (index < 0 || index > this$static.size) {
|
jtulach@678
|
13127 |
indexOutOfBounds(index, this$static.size);
|
jtulach@678
|
13128 |
}
|
jtulach@678
|
13129 |
if (index >= this$static.size >> 1) {
|
jtulach@678
|
13130 |
node = this$static.header;
|
jtulach@678
|
13131 |
for (i = this$static.size; i > index; --i) {
|
jtulach@678
|
13132 |
node = node.prev;
|
jtulach@678
|
13133 |
}
|
jtulach@678
|
13134 |
}
|
jtulach@678
|
13135 |
else {
|
jtulach@678
|
13136 |
node = this$static.header.next;
|
jtulach@678
|
13137 |
for (i = 0; i < index; ++i) {
|
jtulach@678
|
13138 |
node = node.next;
|
jtulach@678
|
13139 |
}
|
jtulach@678
|
13140 |
}
|
jtulach@678
|
13141 |
return $LinkedList$ListIteratorImpl(new LinkedList$ListIteratorImpl(), index, node, this$static);
|
jtulach@678
|
13142 |
}
|
jtulach@678
|
13143 |
|
jtulach@678
|
13144 |
function $removeLast(this$static){
|
jtulach@678
|
13145 |
var node;
|
jtulach@678
|
13146 |
$throwEmptyException(this$static);
|
jtulach@678
|
13147 |
--this$static.size;
|
jtulach@678
|
13148 |
node = this$static.header.prev;
|
jtulach@678
|
13149 |
node.next.prev = node.prev;
|
jtulach@678
|
13150 |
node.prev.next = node.next;
|
jtulach@678
|
13151 |
node.next = node.prev = node;
|
jtulach@678
|
13152 |
return node.value;
|
jtulach@678
|
13153 |
}
|
jtulach@678
|
13154 |
|
jtulach@678
|
13155 |
function $throwEmptyException(this$static){
|
jtulach@678
|
13156 |
if (this$static.size == 0) {
|
jtulach@678
|
13157 |
throw new NoSuchElementException();
|
jtulach@678
|
13158 |
}
|
jtulach@678
|
13159 |
}
|
jtulach@678
|
13160 |
|
jtulach@678
|
13161 |
function add_5(o){
|
jtulach@678
|
13162 |
$LinkedList$Node_0(new LinkedList$Node(), o, this.header);
|
jtulach@678
|
13163 |
++this.size;
|
jtulach@678
|
13164 |
return true;
|
jtulach@678
|
13165 |
}
|
jtulach@678
|
13166 |
|
jtulach@678
|
13167 |
function getClass_39(){
|
jtulach@678
|
13168 |
return Ljava_util_LinkedList_2_classLit;
|
jtulach@678
|
13169 |
}
|
jtulach@678
|
13170 |
|
jtulach@678
|
13171 |
function size_2(){
|
jtulach@678
|
13172 |
return this.size;
|
jtulach@678
|
13173 |
}
|
jtulach@678
|
13174 |
|
jtulach@678
|
13175 |
function LinkedList(){
|
jtulach@678
|
13176 |
}
|
jtulach@678
|
13177 |
|
jtulach@678
|
13178 |
_ = LinkedList.prototype = new AbstractSequentialList();
|
jtulach@678
|
13179 |
_.add_1 = add_5;
|
jtulach@678
|
13180 |
_.getClass$ = getClass_39;
|
jtulach@678
|
13181 |
_.size_0 = size_2;
|
jtulach@678
|
13182 |
_.typeId$ = 29;
|
jtulach@678
|
13183 |
_.header = null;
|
jtulach@678
|
13184 |
_.size = 0;
|
jtulach@678
|
13185 |
function $LinkedList$ListIteratorImpl(this$static, index, startNode, this$0){
|
jtulach@678
|
13186 |
this$static.this$0 = this$0;
|
jtulach@678
|
13187 |
this$static.currentNode = startNode;
|
jtulach@678
|
13188 |
this$static.currentIndex = index;
|
jtulach@678
|
13189 |
return this$static;
|
jtulach@678
|
13190 |
}
|
jtulach@678
|
13191 |
|
jtulach@678
|
13192 |
function $next_0(this$static){
|
jtulach@678
|
13193 |
if (this$static.currentNode == this$static.this$0.header) {
|
jtulach@678
|
13194 |
throw new NoSuchElementException();
|
jtulach@678
|
13195 |
}
|
jtulach@678
|
13196 |
this$static.lastNode = this$static.currentNode;
|
jtulach@678
|
13197 |
this$static.currentNode = this$static.currentNode.next;
|
jtulach@678
|
13198 |
++this$static.currentIndex;
|
jtulach@678
|
13199 |
return this$static.lastNode.value;
|
jtulach@678
|
13200 |
}
|
jtulach@678
|
13201 |
|
jtulach@678
|
13202 |
function getClass_37(){
|
jtulach@678
|
13203 |
return Ljava_util_LinkedList$ListIteratorImpl_2_classLit;
|
jtulach@678
|
13204 |
}
|
jtulach@678
|
13205 |
|
jtulach@678
|
13206 |
function hasNext_1(){
|
jtulach@678
|
13207 |
return this.currentNode != this.this$0.header;
|
jtulach@678
|
13208 |
}
|
jtulach@678
|
13209 |
|
jtulach@678
|
13210 |
function next_2(){
|
jtulach@678
|
13211 |
return $next_0(this);
|
jtulach@678
|
13212 |
}
|
jtulach@678
|
13213 |
|
jtulach@678
|
13214 |
function LinkedList$ListIteratorImpl(){
|
jtulach@678
|
13215 |
}
|
jtulach@678
|
13216 |
|
jtulach@678
|
13217 |
_ = LinkedList$ListIteratorImpl.prototype = new Object_0();
|
jtulach@678
|
13218 |
_.getClass$ = getClass_37;
|
jtulach@678
|
13219 |
_.hasNext = hasNext_1;
|
jtulach@678
|
13220 |
_.next_0 = next_2;
|
jtulach@678
|
13221 |
_.typeId$ = 0;
|
jtulach@678
|
13222 |
_.currentIndex = 0;
|
jtulach@678
|
13223 |
_.currentNode = null;
|
jtulach@678
|
13224 |
_.lastNode = null;
|
jtulach@678
|
13225 |
_.this$0 = null;
|
jtulach@678
|
13226 |
function $LinkedList$Node(this$static){
|
jtulach@678
|
13227 |
this$static.next = this$static.prev = this$static;
|
jtulach@678
|
13228 |
return this$static;
|
jtulach@678
|
13229 |
}
|
jtulach@678
|
13230 |
|
jtulach@678
|
13231 |
function $LinkedList$Node_0(this$static, value, nextNode){
|
jtulach@678
|
13232 |
this$static.value = value;
|
jtulach@678
|
13233 |
this$static.next = nextNode;
|
jtulach@678
|
13234 |
this$static.prev = nextNode.prev;
|
jtulach@678
|
13235 |
nextNode.prev.next = this$static;
|
jtulach@678
|
13236 |
nextNode.prev = this$static;
|
jtulach@678
|
13237 |
return this$static;
|
jtulach@678
|
13238 |
}
|
jtulach@678
|
13239 |
|
jtulach@678
|
13240 |
function getClass_38(){
|
jtulach@678
|
13241 |
return Ljava_util_LinkedList$Node_2_classLit;
|
jtulach@678
|
13242 |
}
|
jtulach@678
|
13243 |
|
jtulach@678
|
13244 |
function LinkedList$Node(){
|
jtulach@678
|
13245 |
}
|
jtulach@678
|
13246 |
|
jtulach@678
|
13247 |
_ = LinkedList$Node.prototype = new Object_0();
|
jtulach@678
|
13248 |
_.getClass$ = getClass_38;
|
jtulach@678
|
13249 |
_.typeId$ = 0;
|
jtulach@678
|
13250 |
_.next = null;
|
jtulach@678
|
13251 |
_.prev = null;
|
jtulach@678
|
13252 |
_.value = null;
|
jtulach@678
|
13253 |
function getClass_40(){
|
jtulach@678
|
13254 |
return Ljava_util_NoSuchElementException_2_classLit;
|
jtulach@678
|
13255 |
}
|
jtulach@678
|
13256 |
|
jtulach@678
|
13257 |
function NoSuchElementException(){
|
jtulach@678
|
13258 |
}
|
jtulach@678
|
13259 |
|
jtulach@678
|
13260 |
_ = NoSuchElementException.prototype = new RuntimeException();
|
jtulach@678
|
13261 |
_.getClass$ = getClass_40;
|
jtulach@678
|
13262 |
_.typeId$ = 30;
|
jtulach@678
|
13263 |
function equalsWithNullCheck(a, b){
|
jtulach@678
|
13264 |
return (a == null?null:a) === (b == null?null:b) || a != null && equals__devirtual$(a, b);
|
jtulach@678
|
13265 |
}
|
jtulach@678
|
13266 |
|
jtulach@678
|
13267 |
function $clinit_77(){
|
jtulach@678
|
13268 |
$clinit_77 = nullMethod;
|
jtulach@678
|
13269 |
HTML = $DoctypeExpectation(new DoctypeExpectation(), 'HTML', 0);
|
jtulach@678
|
13270 |
$DoctypeExpectation(new DoctypeExpectation(), 'HTML401_TRANSITIONAL', 1);
|
jtulach@678
|
13271 |
$DoctypeExpectation(new DoctypeExpectation(), 'HTML401_STRICT', 2);
|
jtulach@678
|
13272 |
$DoctypeExpectation(new DoctypeExpectation(), 'AUTO', 3);
|
jtulach@678
|
13273 |
$DoctypeExpectation(new DoctypeExpectation(), 'NO_DOCTYPE_ERRORS', 4);
|
jtulach@678
|
13274 |
}
|
jtulach@678
|
13275 |
|
jtulach@678
|
13276 |
function $DoctypeExpectation(this$static, enum$name, enum$ordinal){
|
jtulach@678
|
13277 |
$clinit_77();
|
jtulach@678
|
13278 |
this$static.name_0 = enum$name;
|
jtulach@678
|
13279 |
this$static.ordinal = enum$ordinal;
|
jtulach@678
|
13280 |
return this$static;
|
jtulach@678
|
13281 |
}
|
jtulach@678
|
13282 |
|
jtulach@678
|
13283 |
function getClass_41(){
|
jtulach@678
|
13284 |
return Lnu_validator_htmlparser_common_DoctypeExpectation_2_classLit;
|
jtulach@678
|
13285 |
}
|
jtulach@678
|
13286 |
|
jtulach@678
|
13287 |
function DoctypeExpectation(){
|
jtulach@678
|
13288 |
}
|
jtulach@678
|
13289 |
|
jtulach@678
|
13290 |
_ = DoctypeExpectation.prototype = new Enum();
|
jtulach@678
|
13291 |
_.getClass$ = getClass_41;
|
jtulach@678
|
13292 |
_.typeId$ = 31;
|
jtulach@678
|
13293 |
var HTML;
|
jtulach@678
|
13294 |
function $clinit_78(){
|
jtulach@678
|
13295 |
$clinit_78 = nullMethod;
|
jtulach@678
|
13296 |
STANDARDS_MODE = $DocumentMode(new DocumentMode(), 'STANDARDS_MODE', 0);
|
jtulach@678
|
13297 |
ALMOST_STANDARDS_MODE = $DocumentMode(new DocumentMode(), 'ALMOST_STANDARDS_MODE', 1);
|
jtulach@678
|
13298 |
QUIRKS_MODE = $DocumentMode(new DocumentMode(), 'QUIRKS_MODE', 2);
|
jtulach@678
|
13299 |
}
|
jtulach@678
|
13300 |
|
jtulach@678
|
13301 |
function $DocumentMode(this$static, enum$name, enum$ordinal){
|
jtulach@678
|
13302 |
$clinit_78();
|
jtulach@678
|
13303 |
this$static.name_0 = enum$name;
|
jtulach@678
|
13304 |
this$static.ordinal = enum$ordinal;
|
jtulach@678
|
13305 |
return this$static;
|
jtulach@678
|
13306 |
}
|
jtulach@678
|
13307 |
|
jtulach@678
|
13308 |
function getClass_42(){
|
jtulach@678
|
13309 |
return Lnu_validator_htmlparser_common_DocumentMode_2_classLit;
|
jtulach@678
|
13310 |
}
|
jtulach@678
|
13311 |
|
jtulach@678
|
13312 |
function DocumentMode(){
|
jtulach@678
|
13313 |
}
|
jtulach@678
|
13314 |
|
jtulach@678
|
13315 |
_ = DocumentMode.prototype = new Enum();
|
jtulach@678
|
13316 |
_.getClass$ = getClass_42;
|
jtulach@678
|
13317 |
_.typeId$ = 32;
|
jtulach@678
|
13318 |
var ALMOST_STANDARDS_MODE, QUIRKS_MODE, STANDARDS_MODE;
|
jtulach@678
|
13319 |
function $clinit_80(){
|
jtulach@678
|
13320 |
$clinit_80 = nullMethod;
|
jtulach@678
|
13321 |
ALLOW = $XmlViolationPolicy(new XmlViolationPolicy(), 'ALLOW', 0);
|
jtulach@678
|
13322 |
FATAL = $XmlViolationPolicy(new XmlViolationPolicy(), 'FATAL', 1);
|
jtulach@678
|
13323 |
ALTER_INFOSET = $XmlViolationPolicy(new XmlViolationPolicy(), 'ALTER_INFOSET', 2);
|
jtulach@678
|
13324 |
}
|
jtulach@678
|
13325 |
|
jtulach@678
|
13326 |
function $XmlViolationPolicy(this$static, enum$name, enum$ordinal){
|
jtulach@678
|
13327 |
$clinit_80();
|
jtulach@678
|
13328 |
this$static.name_0 = enum$name;
|
jtulach@678
|
13329 |
this$static.ordinal = enum$ordinal;
|
jtulach@678
|
13330 |
return this$static;
|
jtulach@678
|
13331 |
}
|
jtulach@678
|
13332 |
|
jtulach@678
|
13333 |
function getClass_43(){
|
jtulach@678
|
13334 |
return Lnu_validator_htmlparser_common_XmlViolationPolicy_2_classLit;
|
jtulach@678
|
13335 |
}
|
jtulach@678
|
13336 |
|
jtulach@678
|
13337 |
function XmlViolationPolicy(){
|
jtulach@678
|
13338 |
}
|
jtulach@678
|
13339 |
|
jtulach@678
|
13340 |
_ = XmlViolationPolicy.prototype = new Enum();
|
jtulach@678
|
13341 |
_.getClass$ = getClass_43;
|
jtulach@678
|
13342 |
_.typeId$ = 33;
|
jtulach@678
|
13343 |
var ALLOW, ALTER_INFOSET, FATAL;
|
jtulach@678
|
13344 |
function $clinit_98(){
|
jtulach@678
|
13345 |
$clinit_98 = nullMethod;
|
jtulach@678
|
13346 |
ISINDEX_PROMPT = $toCharArray('This is a searchable index. Insert your search keywords here: ');
|
jtulach@678
|
13347 |
HTML4_PUBLIC_IDS = initValues(_3Ljava_lang_String_2_classLit, 48, 1, ['-//W3C//DTD HTML 4.0 Frameset//EN', '-//W3C//DTD HTML 4.0 Transitional//EN', '-//W3C//DTD HTML 4.0//EN', '-//W3C//DTD HTML 4.01 Frameset//EN', '-//W3C//DTD HTML 4.01 Transitional//EN', '-//W3C//DTD HTML 4.01//EN']);
|
jtulach@678
|
13348 |
QUIRKY_PUBLIC_IDS = initValues(_3Ljava_lang_String_2_classLit, 48, 1, ['+//silmaril//dtd html pro v0r11 19970101//', '-//advasoft ltd//dtd html 3.0 aswedit + extensions//', '-//as//dtd html 3.0 aswedit + extensions//', '-//ietf//dtd html 2.0 level 1//', '-//ietf//dtd html 2.0 level 2//', '-//ietf//dtd html 2.0 strict level 1//', '-//ietf//dtd html 2.0 strict level 2//', '-//ietf//dtd html 2.0 strict//', '-//ietf//dtd html 2.0//', '-//ietf//dtd html 2.1e//', '-//ietf//dtd html 3.0//', '-//ietf//dtd html 3.2 final//', '-//ietf//dtd html 3.2//', '-//ietf//dtd html 3//', '-//ietf//dtd html level 0//', '-//ietf//dtd html level 1//', '-//ietf//dtd html level 2//', '-//ietf//dtd html level 3//', '-//ietf//dtd html strict level 0//', '-//ietf//dtd html strict level 1//', '-//ietf//dtd html strict level 2//', '-//ietf//dtd html strict level 3//', '-//ietf//dtd html strict//', '-//ietf//dtd html//', '-//metrius//dtd metrius presentational//', '-//microsoft//dtd internet explorer 2.0 html strict//', '-//microsoft//dtd internet explorer 2.0 html//', '-//microsoft//dtd internet explorer 2.0 tables//', '-//microsoft//dtd internet explorer 3.0 html strict//', '-//microsoft//dtd internet explorer 3.0 html//', '-//microsoft//dtd internet explorer 3.0 tables//', '-//netscape comm. corp.//dtd html//', '-//netscape comm. corp.//dtd strict html//', "-//o'reilly and associates//dtd html 2.0//", "-//o'reilly and associates//dtd html extended 1.0//", "-//o'reilly and associates//dtd html extended relaxed 1.0//", '-//softquad software//dtd hotmetal pro 6.0::19990601::extensions to html 4.0//', '-//softquad//dtd hotmetal pro 4.0::19971010::extensions to html 4.0//', '-//spyglass//dtd html 2.0 extended//', '-//sq//dtd html 2.0 hotmetal + extensions//', '-//sun microsystems corp.//dtd hotjava html//', '-//sun microsystems corp.//dtd hotjava strict html//', '-//w3c//dtd html 3 1995-03-24//', '-//w3c//dtd html 3.2 draft//', '-//w3c//dtd html 3.2 final//', '-//w3c//dtd html 3.2//', '-//w3c//dtd html 3.2s draft//', '-//w3c//dtd html 4.0 frameset//', '-//w3c//dtd html 4.0 transitional//', '-//w3c//dtd html experimental 19960712//', '-//w3c//dtd html experimental 970421//', '-//w3c//dtd w3 html//', '-//w3o//dtd w3 html 3.0//', '-//webtechs//dtd mozilla html 2.0//', '-//webtechs//dtd mozilla html//']);
|
jtulach@678
|
13349 |
}
|
jtulach@678
|
13350 |
|
jtulach@678
|
13351 |
function $accumulateCharacter(this$static, c){
|
jtulach@678
|
13352 |
var newBuf, newLen;
|
jtulach@678
|
13353 |
newLen = this$static.charBufferLen + 1;
|
jtulach@678
|
13354 |
if (newLen > this$static.charBuffer.length) {
|
jtulach@678
|
13355 |
newBuf = initDim(_3C_classLit, 42, -1, newLen, 1);
|
jtulach@678
|
13356 |
arraycopy(this$static.charBuffer, 0, newBuf, 0, this$static.charBufferLen);
|
jtulach@678
|
13357 |
this$static.charBuffer = newBuf;
|
jtulach@678
|
13358 |
}
|
jtulach@678
|
13359 |
this$static.charBuffer[this$static.charBufferLen] = c;
|
jtulach@678
|
13360 |
this$static.charBufferLen = newLen;
|
jtulach@678
|
13361 |
}
|
jtulach@678
|
13362 |
|
jtulach@678
|
13363 |
function $addAttributesToBody(this$static, attributes){
|
jtulach@678
|
13364 |
var body;
|
jtulach@678
|
13365 |
$processNonNcNames(attributes, this$static, this$static.namePolicy);
|
jtulach@678
|
13366 |
if (this$static.currentPtr >= 1) {
|
jtulach@678
|
13367 |
body = this$static.stack[1];
|
jtulach@678
|
13368 |
if (body.group == 3) {
|
jtulach@678
|
13369 |
$addAttributesToElement(this$static, body.node, attributes);
|
jtulach@678
|
13370 |
}
|
jtulach@678
|
13371 |
}
|
jtulach@678
|
13372 |
}
|
jtulach@678
|
13373 |
|
jtulach@678
|
13374 |
function $adoptionAgencyEndTag(this$static, name){
|
jtulach@678
|
13375 |
var bookmark, clone, commonAncestor, formattingClone, formattingElt, formattingEltListPos, formattingEltStackPos, furthestBlock, furthestBlockPos, inScope, lastNode, listNode, newNode, node, nodeListPos, nodePos;
|
jtulach@678
|
13376 |
$flushCharacters(this$static);
|
jtulach@678
|
13377 |
for (;;) {
|
jtulach@678
|
13378 |
formattingEltListPos = this$static.listPtr;
|
jtulach@678
|
13379 |
while (formattingEltListPos > -1) {
|
jtulach@678
|
13380 |
listNode = this$static.listOfActiveFormattingElements[formattingEltListPos];
|
jtulach@678
|
13381 |
if (!listNode) {
|
jtulach@678
|
13382 |
formattingEltListPos = -1;
|
jtulach@678
|
13383 |
break;
|
jtulach@678
|
13384 |
}
|
jtulach@678
|
13385 |
else if (listNode.name_0 == name) {
|
jtulach@678
|
13386 |
break;
|
jtulach@678
|
13387 |
}
|
jtulach@678
|
13388 |
--formattingEltListPos;
|
jtulach@678
|
13389 |
}
|
jtulach@678
|
13390 |
if (formattingEltListPos == -1) {
|
jtulach@678
|
13391 |
return;
|
jtulach@678
|
13392 |
}
|
jtulach@678
|
13393 |
formattingElt = this$static.listOfActiveFormattingElements[formattingEltListPos];
|
jtulach@678
|
13394 |
formattingEltStackPos = this$static.currentPtr;
|
jtulach@678
|
13395 |
inScope = true;
|
jtulach@678
|
13396 |
while (formattingEltStackPos > -1) {
|
jtulach@678
|
13397 |
node = this$static.stack[formattingEltStackPos];
|
jtulach@678
|
13398 |
if (node == formattingElt) {
|
jtulach@678
|
13399 |
break;
|
jtulach@678
|
13400 |
}
|
jtulach@678
|
13401 |
else if (node.scoping) {
|
jtulach@678
|
13402 |
inScope = false;
|
jtulach@678
|
13403 |
}
|
jtulach@678
|
13404 |
--formattingEltStackPos;
|
jtulach@678
|
13405 |
}
|
jtulach@678
|
13406 |
if (formattingEltStackPos == -1) {
|
jtulach@678
|
13407 |
$removeFromListOfActiveFormattingElements(this$static, formattingEltListPos);
|
jtulach@678
|
13408 |
return;
|
jtulach@678
|
13409 |
}
|
jtulach@678
|
13410 |
if (!inScope) {
|
jtulach@678
|
13411 |
return;
|
jtulach@678
|
13412 |
}
|
jtulach@678
|
13413 |
furthestBlockPos = formattingEltStackPos + 1;
|
jtulach@678
|
13414 |
while (furthestBlockPos <= this$static.currentPtr) {
|
jtulach@678
|
13415 |
node = this$static.stack[furthestBlockPos];
|
jtulach@678
|
13416 |
if (node.scoping || node.special) {
|
jtulach@678
|
13417 |
break;
|
jtulach@678
|
13418 |
}
|
jtulach@678
|
13419 |
++furthestBlockPos;
|
jtulach@678
|
13420 |
}
|
jtulach@678
|
13421 |
if (furthestBlockPos > this$static.currentPtr) {
|
jtulach@678
|
13422 |
while (this$static.currentPtr >= formattingEltStackPos) {
|
jtulach@678
|
13423 |
$pop(this$static);
|
jtulach@678
|
13424 |
}
|
jtulach@678
|
13425 |
$removeFromListOfActiveFormattingElements(this$static, formattingEltListPos);
|
jtulach@678
|
13426 |
return;
|
jtulach@678
|
13427 |
}
|
jtulach@678
|
13428 |
commonAncestor = this$static.stack[formattingEltStackPos - 1];
|
jtulach@678
|
13429 |
furthestBlock = this$static.stack[furthestBlockPos];
|
jtulach@678
|
13430 |
bookmark = formattingEltListPos;
|
jtulach@678
|
13431 |
nodePos = furthestBlockPos;
|
jtulach@678
|
13432 |
lastNode = furthestBlock;
|
jtulach@678
|
13433 |
for (;;) {
|
jtulach@678
|
13434 |
--nodePos;
|
jtulach@678
|
13435 |
node = this$static.stack[nodePos];
|
jtulach@678
|
13436 |
nodeListPos = $findInListOfActiveFormattingElements(this$static, node);
|
jtulach@678
|
13437 |
if (nodeListPos == -1) {
|
jtulach@678
|
13438 |
$removeFromStack(this$static, nodePos);
|
jtulach@678
|
13439 |
--furthestBlockPos;
|
jtulach@678
|
13440 |
continue;
|
jtulach@678
|
13441 |
}
|
jtulach@678
|
13442 |
if (nodePos == formattingEltStackPos) {
|
jtulach@678
|
13443 |
break;
|
jtulach@678
|
13444 |
}
|
jtulach@678
|
13445 |
if (nodePos == furthestBlockPos) {
|
jtulach@678
|
13446 |
bookmark = nodeListPos + 1;
|
jtulach@678
|
13447 |
}
|
jtulach@678
|
13448 |
clone = $createElement(this$static, 'http://www.w3.org/1999/xhtml', node.name_0, $cloneAttributes(node.attributes));
|
jtulach@678
|
13449 |
newNode = $StackNode(new StackNode(), node.group, node.ns, node.name_0, clone, node.scoping, node.special, node.fosterParenting, node.popName, node.attributes);
|
jtulach@678
|
13450 |
node.attributes = null;
|
jtulach@678
|
13451 |
this$static.stack[nodePos] = newNode;
|
jtulach@678
|
13452 |
++newNode.refcount;
|
jtulach@678
|
13453 |
this$static.listOfActiveFormattingElements[nodeListPos] = newNode;
|
jtulach@678
|
13454 |
--node.refcount;
|
jtulach@678
|
13455 |
--node.refcount;
|
jtulach@678
|
13456 |
node = newNode;
|
jtulach@678
|
13457 |
$detachFromParent(this$static, lastNode.node);
|
jtulach@678
|
13458 |
$appendElement(this$static, lastNode.node, node.node);
|
jtulach@678
|
13459 |
lastNode = node;
|
jtulach@678
|
13460 |
}
|
jtulach@678
|
13461 |
if (commonAncestor.fosterParenting) {
|
jtulach@678
|
13462 |
$detachFromParent(this$static, lastNode.node);
|
jtulach@678
|
13463 |
$insertIntoFosterParent(this$static, lastNode.node);
|
jtulach@678
|
13464 |
}
|
jtulach@678
|
13465 |
else {
|
jtulach@678
|
13466 |
$detachFromParent(this$static, lastNode.node);
|
jtulach@678
|
13467 |
$appendElement(this$static, lastNode.node, commonAncestor.node);
|
jtulach@678
|
13468 |
}
|
jtulach@678
|
13469 |
clone = $createElement(this$static, 'http://www.w3.org/1999/xhtml', formattingElt.name_0, $cloneAttributes(formattingElt.attributes));
|
jtulach@678
|
13470 |
formattingClone = $StackNode(new StackNode(), formattingElt.group, formattingElt.ns, formattingElt.name_0, clone, formattingElt.scoping, formattingElt.special, formattingElt.fosterParenting, formattingElt.popName, formattingElt.attributes);
|
jtulach@678
|
13471 |
formattingElt.attributes = null;
|
jtulach@678
|
13472 |
$appendChildrenToNewParent(this$static, furthestBlock.node, clone);
|
jtulach@678
|
13473 |
$appendElement(this$static, clone, furthestBlock.node);
|
jtulach@678
|
13474 |
$removeFromListOfActiveFormattingElements(this$static, formattingEltListPos);
|
jtulach@678
|
13475 |
$insertIntoListOfActiveFormattingElements(this$static, formattingClone, bookmark);
|
jtulach@678
|
13476 |
$removeFromStack(this$static, formattingEltStackPos);
|
jtulach@678
|
13477 |
$insertIntoStack(this$static, formattingClone, furthestBlockPos);
|
jtulach@678
|
13478 |
}
|
jtulach@678
|
13479 |
}
|
jtulach@678
|
13480 |
|
jtulach@678
|
13481 |
function $append_1(this$static, node){
|
jtulach@678
|
13482 |
var newList;
|
jtulach@678
|
13483 |
++this$static.listPtr;
|
jtulach@678
|
13484 |
if (this$static.listPtr == this$static.listOfActiveFormattingElements.length) {
|
jtulach@678
|
13485 |
newList = initDim(_3Lnu_validator_htmlparser_impl_StackNode_2_classLit, 51, 11, this$static.listOfActiveFormattingElements.length + 64, 0);
|
jtulach@678
|
13486 |
arraycopy(this$static.listOfActiveFormattingElements, 0, newList, 0, this$static.listOfActiveFormattingElements.length);
|
jtulach@678
|
13487 |
this$static.listOfActiveFormattingElements = newList;
|
jtulach@678
|
13488 |
}
|
jtulach@678
|
13489 |
this$static.listOfActiveFormattingElements[this$static.listPtr] = node;
|
jtulach@678
|
13490 |
}
|
jtulach@678
|
13491 |
|
jtulach@678
|
13492 |
function $appendHtmlElementToDocumentAndPush(this$static, attributes){
|
jtulach@678
|
13493 |
var elt, node;
|
jtulach@678
|
13494 |
$processNonNcNames(attributes, this$static, this$static.namePolicy);
|
jtulach@678
|
13495 |
elt = $createHtmlElementSetAsRoot(this$static, attributes);
|
jtulach@678
|
13496 |
node = $StackNode_0(new StackNode(), 'http://www.w3.org/1999/xhtml', ($clinit_89() , HTML_0), elt);
|
jtulach@678
|
13497 |
$push_0(this$static, node);
|
jtulach@678
|
13498 |
}
|
jtulach@678
|
13499 |
|
jtulach@678
|
13500 |
function $appendToCurrentNodeAndPushElement(this$static, ns, elementName, attributes){
|
jtulach@678
|
13501 |
var elt, node;
|
jtulach@678
|
13502 |
$flushCharacters(this$static);
|
jtulach@678
|
13503 |
$processNonNcNames(attributes, this$static, this$static.namePolicy);
|
jtulach@678
|
13504 |
elt = $createElement(this$static, ns, elementName.name_0, attributes);
|
jtulach@678
|
13505 |
$appendElement(this$static, elt, this$static.stack[this$static.currentPtr].node);
|
jtulach@678
|
13506 |
node = $StackNode_0(new StackNode(), ns, elementName, elt);
|
jtulach@678
|
13507 |
$push_0(this$static, node);
|
jtulach@678
|
13508 |
}
|
jtulach@678
|
13509 |
|
jtulach@678
|
13510 |
function $appendToCurrentNodeAndPushElementMayFoster(this$static, ns, elementName, attributes){
|
jtulach@678
|
13511 |
var current, elt, node, popName;
|
jtulach@678
|
13512 |
$flushCharacters(this$static);
|
jtulach@678
|
13513 |
popName = elementName.name_0;
|
jtulach@678
|
13514 |
$processNonNcNames(attributes, this$static, this$static.namePolicy);
|
jtulach@678
|
13515 |
if (elementName.custom) {
|
jtulach@678
|
13516 |
popName = $checkPopName(this$static, popName);
|
jtulach@678
|
13517 |
}
|
jtulach@678
|
13518 |
elt = $createElement(this$static, ns, popName, attributes);
|
jtulach@678
|
13519 |
current = this$static.stack[this$static.currentPtr];
|
jtulach@678
|
13520 |
if (current.fosterParenting) {
|
jtulach@678
|
13521 |
$insertIntoFosterParent(this$static, elt);
|
jtulach@678
|
13522 |
}
|
jtulach@678
|
13523 |
else {
|
jtulach@678
|
13524 |
$appendElement(this$static, elt, current.node);
|
jtulach@678
|
13525 |
}
|
jtulach@678
|
13526 |
node = $StackNode_1(new StackNode(), ns, elementName, elt, popName);
|
jtulach@678
|
13527 |
$push_0(this$static, node);
|
jtulach@678
|
13528 |
}
|
jtulach@678
|
13529 |
|
jtulach@678
|
13530 |
function $appendToCurrentNodeAndPushElementMayFoster_0(this$static, ns, elementName, attributes){
|
jtulach@678
|
13531 |
var current, elt, node;
|
jtulach@678
|
13532 |
$flushCharacters(this$static);
|
jtulach@678
|
13533 |
$processNonNcNames(attributes, this$static, this$static.namePolicy);
|
jtulach@678
|
13534 |
elt = $createElement_0(this$static, ns, elementName.name_0, attributes);
|
jtulach@678
|
13535 |
current = this$static.stack[this$static.currentPtr];
|
jtulach@678
|
13536 |
if (current.fosterParenting) {
|
jtulach@678
|
13537 |
$insertIntoFosterParent(this$static, elt);
|
jtulach@678
|
13538 |
}
|
jtulach@678
|
13539 |
else {
|
jtulach@678
|
13540 |
$appendElement(this$static, elt, current.node);
|
jtulach@678
|
13541 |
}
|
jtulach@678
|
13542 |
node = $StackNode_0(new StackNode(), ns, elementName, elt);
|
jtulach@678
|
13543 |
$push_0(this$static, node);
|
jtulach@678
|
13544 |
}
|
jtulach@678
|
13545 |
|
jtulach@678
|
13546 |
function $appendToCurrentNodeAndPushElementMayFosterCamelCase(this$static, ns, elementName, attributes){
|
jtulach@678
|
13547 |
var current, elt, node, popName;
|
jtulach@678
|
13548 |
$flushCharacters(this$static);
|
jtulach@678
|
13549 |
popName = elementName.camelCaseName;
|
jtulach@678
|
13550 |
$processNonNcNames(attributes, this$static, this$static.namePolicy);
|
jtulach@678
|
13551 |
if (elementName.custom) {
|
jtulach@678
|
13552 |
popName = $checkPopName(this$static, popName);
|
jtulach@678
|
13553 |
}
|
jtulach@678
|
13554 |
elt = $createElement(this$static, ns, popName, attributes);
|
jtulach@678
|
13555 |
current = this$static.stack[this$static.currentPtr];
|
jtulach@678
|
13556 |
if (current.fosterParenting) {
|
jtulach@678
|
13557 |
$insertIntoFosterParent(this$static, elt);
|
jtulach@678
|
13558 |
}
|
jtulach@678
|
13559 |
else {
|
jtulach@678
|
13560 |
$appendElement(this$static, elt, current.node);
|
jtulach@678
|
13561 |
}
|
jtulach@678
|
13562 |
node = $StackNode_2(new StackNode(), ns, elementName, elt, popName, ($clinit_89() , FOREIGNOBJECT) == elementName);
|
jtulach@678
|
13563 |
$push_0(this$static, node);
|
jtulach@678
|
13564 |
}
|
jtulach@678
|
13565 |
|
jtulach@678
|
13566 |
function $appendToCurrentNodeAndPushElementMayFosterNoScoping(this$static, ns, elementName, attributes){
|
jtulach@678
|
13567 |
var current, elt, node, popName;
|
jtulach@678
|
13568 |
$flushCharacters(this$static);
|
jtulach@678
|
13569 |
popName = elementName.name_0;
|
jtulach@678
|
13570 |
$processNonNcNames(attributes, this$static, this$static.namePolicy);
|
jtulach@678
|
13571 |
if (elementName.custom) {
|
jtulach@678
|
13572 |
popName = $checkPopName(this$static, popName);
|
jtulach@678
|
13573 |
}
|
jtulach@678
|
13574 |
elt = $createElement(this$static, ns, popName, attributes);
|
jtulach@678
|
13575 |
current = this$static.stack[this$static.currentPtr];
|
jtulach@678
|
13576 |
if (current.fosterParenting) {
|
jtulach@678
|
13577 |
$insertIntoFosterParent(this$static, elt);
|
jtulach@678
|
13578 |
}
|
jtulach@678
|
13579 |
else {
|
jtulach@678
|
13580 |
$appendElement(this$static, elt, current.node);
|
jtulach@678
|
13581 |
}
|
jtulach@678
|
13582 |
node = $StackNode_2(new StackNode(), ns, elementName, elt, popName, false);
|
jtulach@678
|
13583 |
$push_0(this$static, node);
|
jtulach@678
|
13584 |
}
|
jtulach@678
|
13585 |
|
jtulach@678
|
13586 |
function $appendToCurrentNodeAndPushFormElementMayFoster(this$static, attributes){
|
jtulach@678
|
13587 |
var current, elt, node;
|
jtulach@678
|
13588 |
$flushCharacters(this$static);
|
jtulach@678
|
13589 |
$processNonNcNames(attributes, this$static, this$static.namePolicy);
|
jtulach@678
|
13590 |
elt = $createElement(this$static, 'http://www.w3.org/1999/xhtml', 'form', attributes);
|
jtulach@678
|
13591 |
this$static.formPointer = elt;
|
jtulach@678
|
13592 |
current = this$static.stack[this$static.currentPtr];
|
jtulach@678
|
13593 |
if (current.fosterParenting) {
|
jtulach@678
|
13594 |
$insertIntoFosterParent(this$static, elt);
|
jtulach@678
|
13595 |
}
|
jtulach@678
|
13596 |
else {
|
jtulach@678
|
13597 |
$appendElement(this$static, elt, current.node);
|
jtulach@678
|
13598 |
}
|
jtulach@678
|
13599 |
node = $StackNode_0(new StackNode(), 'http://www.w3.org/1999/xhtml', ($clinit_89() , FORM_0), elt);
|
jtulach@678
|
13600 |
$push_0(this$static, node);
|
jtulach@678
|
13601 |
}
|
jtulach@678
|
13602 |
|
jtulach@678
|
13603 |
function $appendToCurrentNodeAndPushFormattingElementMayFoster(this$static, ns, elementName, attributes){
|
jtulach@678
|
13604 |
var current, elt, node;
|
jtulach@678
|
13605 |
$flushCharacters(this$static);
|
jtulach@678
|
13606 |
$processNonNcNames(attributes, this$static, this$static.namePolicy);
|
jtulach@678
|
13607 |
elt = $createElement(this$static, ns, elementName.name_0, attributes);
|
jtulach@678
|
13608 |
current = this$static.stack[this$static.currentPtr];
|
jtulach@678
|
13609 |
if (current.fosterParenting) {
|
jtulach@678
|
13610 |
$insertIntoFosterParent(this$static, elt);
|
jtulach@678
|
13611 |
}
|
jtulach@678
|
13612 |
else {
|
jtulach@678
|
13613 |
$appendElement(this$static, elt, current.node);
|
jtulach@678
|
13614 |
}
|
jtulach@678
|
13615 |
node = $StackNode_3(new StackNode(), ns, elementName, elt, $cloneAttributes(attributes));
|
jtulach@678
|
13616 |
$push_0(this$static, node);
|
jtulach@678
|
13617 |
$append_1(this$static, node);
|
jtulach@678
|
13618 |
++node.refcount;
|
jtulach@678
|
13619 |
}
|
jtulach@678
|
13620 |
|
jtulach@678
|
13621 |
function $appendToCurrentNodeAndPushHeadElement(this$static, attributes){
|
jtulach@678
|
13622 |
var elt, node;
|
jtulach@678
|
13623 |
$flushCharacters(this$static);
|
jtulach@678
|
13624 |
$processNonNcNames(attributes, this$static, this$static.namePolicy);
|
jtulach@678
|
13625 |
elt = $createElement(this$static, 'http://www.w3.org/1999/xhtml', 'head', attributes);
|
jtulach@678
|
13626 |
$appendElement(this$static, elt, this$static.stack[this$static.currentPtr].node);
|
jtulach@678
|
13627 |
this$static.headPointer = elt;
|
jtulach@678
|
13628 |
node = $StackNode_0(new StackNode(), 'http://www.w3.org/1999/xhtml', ($clinit_89() , HEAD), elt);
|
jtulach@678
|
13629 |
$push_0(this$static, node);
|
jtulach@678
|
13630 |
}
|
jtulach@678
|
13631 |
|
jtulach@678
|
13632 |
function $appendVoidElementToCurrentMayFoster(this$static, ns, name, attributes){
|
jtulach@678
|
13633 |
var current, elt;
|
jtulach@678
|
13634 |
$flushCharacters(this$static);
|
jtulach@678
|
13635 |
$processNonNcNames(attributes, this$static, this$static.namePolicy);
|
jtulach@678
|
13636 |
elt = $createElement_0(this$static, ns, name, attributes);
|
jtulach@678
|
13637 |
current = this$static.stack[this$static.currentPtr];
|
jtulach@678
|
13638 |
if (current.fosterParenting) {
|
jtulach@678
|
13639 |
$insertIntoFosterParent(this$static, elt);
|
jtulach@678
|
13640 |
}
|
jtulach@678
|
13641 |
else {
|
jtulach@678
|
13642 |
$appendElement(this$static, elt, current.node);
|
jtulach@678
|
13643 |
}
|
jtulach@678
|
13644 |
$elementPopped(this$static, ns, name, elt);
|
jtulach@678
|
13645 |
}
|
jtulach@678
|
13646 |
|
jtulach@678
|
13647 |
function $appendVoidElementToCurrentMayFoster_0(this$static, ns, elementName, attributes){
|
jtulach@678
|
13648 |
var current, elt, popName;
|
jtulach@678
|
13649 |
$flushCharacters(this$static);
|
jtulach@678
|
13650 |
popName = elementName.name_0;
|
jtulach@678
|
13651 |
$processNonNcNames(attributes, this$static, this$static.namePolicy);
|
jtulach@678
|
13652 |
if (elementName.custom) {
|
jtulach@678
|
13653 |
popName = $checkPopName(this$static, popName);
|
jtulach@678
|
13654 |
}
|
jtulach@678
|
13655 |
elt = $createElement(this$static, ns, popName, attributes);
|
jtulach@678
|
13656 |
current = this$static.stack[this$static.currentPtr];
|
jtulach@678
|
13657 |
if (current.fosterParenting) {
|
jtulach@678
|
13658 |
$insertIntoFosterParent(this$static, elt);
|
jtulach@678
|
13659 |
}
|
jtulach@678
|
13660 |
else {
|
jtulach@678
|
13661 |
$appendElement(this$static, elt, current.node);
|
jtulach@678
|
13662 |
}
|
jtulach@678
|
13663 |
$elementPopped(this$static, ns, popName, elt);
|
jtulach@678
|
13664 |
}
|
jtulach@678
|
13665 |
|
jtulach@678
|
13666 |
function $appendVoidElementToCurrentMayFosterCamelCase(this$static, ns, elementName, attributes){
|
jtulach@678
|
13667 |
var current, elt, popName;
|
jtulach@678
|
13668 |
$flushCharacters(this$static);
|
jtulach@678
|
13669 |
popName = elementName.camelCaseName;
|
jtulach@678
|
13670 |
$processNonNcNames(attributes, this$static, this$static.namePolicy);
|
jtulach@678
|
13671 |
if (elementName.custom) {
|
jtulach@678
|
13672 |
popName = $checkPopName(this$static, popName);
|
jtulach@678
|
13673 |
}
|
jtulach@678
|
13674 |
elt = $createElement(this$static, ns, popName, attributes);
|
jtulach@678
|
13675 |
current = this$static.stack[this$static.currentPtr];
|
jtulach@678
|
13676 |
if (current.fosterParenting) {
|
jtulach@678
|
13677 |
$insertIntoFosterParent(this$static, elt);
|
jtulach@678
|
13678 |
}
|
jtulach@678
|
13679 |
else {
|
jtulach@678
|
13680 |
$appendElement(this$static, elt, current.node);
|
jtulach@678
|
13681 |
}
|
jtulach@678
|
13682 |
$elementPopped(this$static, ns, popName, elt);
|
jtulach@678
|
13683 |
}
|
jtulach@678
|
13684 |
|
jtulach@678
|
13685 |
function $charBufferContainsNonWhitespace(this$static){
|
jtulach@678
|
13686 |
var i;
|
jtulach@678
|
13687 |
for (i = 0; i < this$static.charBufferLen; ++i) {
|
jtulach@678
|
13688 |
switch (this$static.charBuffer[i]) {
|
jtulach@678
|
13689 |
case 32:
|
jtulach@678
|
13690 |
case 9:
|
jtulach@678
|
13691 |
case 10:
|
jtulach@678
|
13692 |
case 12:
|
jtulach@678
|
13693 |
continue;
|
jtulach@678
|
13694 |
default:return true;
|
jtulach@678
|
13695 |
}
|
jtulach@678
|
13696 |
}
|
jtulach@678
|
13697 |
return false;
|
jtulach@678
|
13698 |
}
|
jtulach@678
|
13699 |
|
jtulach@678
|
13700 |
function $characters(this$static, buf, start, length){
|
jtulach@678
|
13701 |
var end, i;
|
jtulach@678
|
13702 |
if (this$static.needToDropLF) {
|
jtulach@678
|
13703 |
if (buf[start] == 10) {
|
jtulach@678
|
13704 |
++start;
|
jtulach@678
|
13705 |
--length;
|
jtulach@678
|
13706 |
if (length == 0) {
|
jtulach@678
|
13707 |
return;
|
jtulach@678
|
13708 |
}
|
jtulach@678
|
13709 |
}
|
jtulach@678
|
13710 |
this$static.needToDropLF = false;
|
jtulach@678
|
13711 |
}
|
jtulach@678
|
13712 |
switch (this$static.mode) {
|
jtulach@678
|
13713 |
case 6:
|
jtulach@678
|
13714 |
case 12:
|
jtulach@678
|
13715 |
case 8:
|
jtulach@678
|
13716 |
$reconstructTheActiveFormattingElements(this$static);
|
jtulach@678
|
13717 |
case 20:
|
jtulach@678
|
13718 |
$accumulateCharacters(this$static, buf, start, length);
|
jtulach@678
|
13719 |
return;
|
jtulach@678
|
13720 |
default:end = start + length;
|
jtulach@678
|
13721 |
charactersloop: for (i = start; i < end; ++i) {
|
jtulach@678
|
13722 |
switch (buf[i]) {
|
jtulach@678
|
13723 |
case 32:
|
jtulach@678
|
13724 |
case 9:
|
jtulach@678
|
13725 |
case 10:
|
jtulach@678
|
13726 |
case 12:
|
jtulach@678
|
13727 |
switch (this$static.mode) {
|
jtulach@678
|
13728 |
case 0:
|
jtulach@678
|
13729 |
case 1:
|
jtulach@678
|
13730 |
case 2:
|
jtulach@678
|
13731 |
start = i + 1;
|
jtulach@678
|
13732 |
continue;
|
jtulach@678
|
13733 |
case 21:
|
jtulach@678
|
13734 |
case 3:
|
jtulach@678
|
13735 |
case 4:
|
jtulach@678
|
13736 |
case 5:
|
jtulach@678
|
13737 |
case 9:
|
jtulach@678
|
13738 |
case 16:
|
jtulach@678
|
13739 |
case 17:
|
jtulach@678
|
13740 |
continue;
|
jtulach@678
|
13741 |
case 6:
|
jtulach@678
|
13742 |
case 12:
|
jtulach@678
|
13743 |
case 8:
|
jtulach@678
|
13744 |
if (start < i) {
|
jtulach@678
|
13745 |
$accumulateCharacters(this$static, buf, start, i - start);
|
jtulach@678
|
13746 |
start = i;
|
jtulach@678
|
13747 |
}
|
jtulach@678
|
13748 |
|
jtulach@678
|
13749 |
$reconstructTheActiveFormattingElements(this$static);
|
jtulach@678
|
13750 |
break charactersloop;
|
jtulach@678
|
13751 |
case 7:
|
jtulach@678
|
13752 |
case 10:
|
jtulach@678
|
13753 |
case 11:
|
jtulach@678
|
13754 |
$reconstructTheActiveFormattingElements(this$static);
|
jtulach@678
|
13755 |
$accumulateCharacter(this$static, buf[i]);
|
jtulach@678
|
13756 |
start = i + 1;
|
jtulach@678
|
13757 |
continue;
|
jtulach@678
|
13758 |
case 15:
|
jtulach@678
|
13759 |
if (start < i) {
|
jtulach@678
|
13760 |
$accumulateCharacters(this$static, buf, start, i - start);
|
jtulach@678
|
13761 |
start = i;
|
jtulach@678
|
13762 |
}
|
jtulach@678
|
13763 |
|
jtulach@678
|
13764 |
$reconstructTheActiveFormattingElements(this$static);
|
jtulach@678
|
13765 |
continue;
|
jtulach@678
|
13766 |
case 18:
|
jtulach@678
|
13767 |
case 19:
|
jtulach@678
|
13768 |
if (start < i) {
|
jtulach@678
|
13769 |
$accumulateCharacters(this$static, buf, start, i - start);
|
jtulach@678
|
13770 |
start = i;
|
jtulach@678
|
13771 |
}
|
jtulach@678
|
13772 |
|
jtulach@678
|
13773 |
$reconstructTheActiveFormattingElements(this$static);
|
jtulach@678
|
13774 |
continue;
|
jtulach@678
|
13775 |
}
|
jtulach@678
|
13776 |
|
jtulach@678
|
13777 |
default:switch (this$static.mode) {
|
jtulach@678
|
13778 |
case 0:
|
jtulach@678
|
13779 |
$documentModeInternal(this$static, ($clinit_78() , QUIRKS_MODE));
|
jtulach@678
|
13780 |
this$static.mode = 1;
|
jtulach@678
|
13781 |
--i;
|
jtulach@678
|
13782 |
continue;
|
jtulach@678
|
13783 |
case 1:
|
jtulach@678
|
13784 |
$appendHtmlElementToDocumentAndPush(this$static, $emptyAttributes(this$static.tokenizer));
|
jtulach@678
|
13785 |
this$static.mode = 2;
|
jtulach@678
|
13786 |
--i;
|
jtulach@678
|
13787 |
continue;
|
jtulach@678
|
13788 |
case 2:
|
jtulach@678
|
13789 |
if (start < i) {
|
jtulach@678
|
13790 |
$accumulateCharacters(this$static, buf, start, i - start);
|
jtulach@678
|
13791 |
start = i;
|
jtulach@678
|
13792 |
}
|
jtulach@678
|
13793 |
|
jtulach@678
|
13794 |
$appendToCurrentNodeAndPushHeadElement(this$static, ($clinit_91() , EMPTY_ATTRIBUTES));
|
jtulach@678
|
13795 |
this$static.mode = 3;
|
jtulach@678
|
13796 |
--i;
|
jtulach@678
|
13797 |
continue;
|
jtulach@678
|
13798 |
case 3:
|
jtulach@678
|
13799 |
if (start < i) {
|
jtulach@678
|
13800 |
$accumulateCharacters(this$static, buf, start, i - start);
|
jtulach@678
|
13801 |
start = i;
|
jtulach@678
|
13802 |
}
|
jtulach@678
|
13803 |
|
jtulach@678
|
13804 |
$pop(this$static);
|
jtulach@678
|
13805 |
this$static.mode = 5;
|
jtulach@678
|
13806 |
--i;
|
jtulach@678
|
13807 |
continue;
|
jtulach@678
|
13808 |
case 4:
|
jtulach@678
|
13809 |
if (start < i) {
|
jtulach@678
|
13810 |
$accumulateCharacters(this$static, buf, start, i - start);
|
jtulach@678
|
13811 |
start = i;
|
jtulach@678
|
13812 |
}
|
jtulach@678
|
13813 |
|
jtulach@678
|
13814 |
$pop(this$static);
|
jtulach@678
|
13815 |
this$static.mode = 3;
|
jtulach@678
|
13816 |
--i;
|
jtulach@678
|
13817 |
continue;
|
jtulach@678
|
13818 |
case 5:
|
jtulach@678
|
13819 |
if (start < i) {
|
jtulach@678
|
13820 |
$accumulateCharacters(this$static, buf, start, i - start);
|
jtulach@678
|
13821 |
start = i;
|
jtulach@678
|
13822 |
}
|
jtulach@678
|
13823 |
|
jtulach@678
|
13824 |
$appendToCurrentNodeAndPushElement(this$static, 'http://www.w3.org/1999/xhtml', ($clinit_89() , BODY), $emptyAttributes(this$static.tokenizer));
|
jtulach@678
|
13825 |
this$static.mode = 21;
|
jtulach@678
|
13826 |
--i;
|
jtulach@678
|
13827 |
continue;
|
jtulach@678
|
13828 |
case 21:
|
jtulach@678
|
13829 |
this$static.mode = 6;
|
jtulach@678
|
13830 |
--i;
|
jtulach@678
|
13831 |
continue;
|
jtulach@678
|
13832 |
case 6:
|
jtulach@678
|
13833 |
case 12:
|
jtulach@678
|
13834 |
case 8:
|
jtulach@678
|
13835 |
if (start < i) {
|
jtulach@678
|
13836 |
$accumulateCharacters(this$static, buf, start, i - start);
|
jtulach@678
|
13837 |
start = i;
|
jtulach@678
|
13838 |
}
|
jtulach@678
|
13839 |
|
jtulach@678
|
13840 |
$reconstructTheActiveFormattingElements(this$static);
|
jtulach@678
|
13841 |
break charactersloop;
|
jtulach@678
|
13842 |
case 7:
|
jtulach@678
|
13843 |
case 10:
|
jtulach@678
|
13844 |
case 11:
|
jtulach@678
|
13845 |
$reconstructTheActiveFormattingElements(this$static);
|
jtulach@678
|
13846 |
$accumulateCharacter(this$static, buf[i]);
|
jtulach@678
|
13847 |
start = i + 1;
|
jtulach@678
|
13848 |
continue;
|
jtulach@678
|
13849 |
case 9:
|
jtulach@678
|
13850 |
if (start < i) {
|
jtulach@678
|
13851 |
$accumulateCharacters(this$static, buf, start, i - start);
|
jtulach@678
|
13852 |
start = i;
|
jtulach@678
|
13853 |
}
|
jtulach@678
|
13854 |
|
jtulach@678
|
13855 |
if (this$static.currentPtr == 0) {
|
jtulach@678
|
13856 |
start = i + 1;
|
jtulach@678
|
13857 |
continue;
|
jtulach@678
|
13858 |
}
|
jtulach@678
|
13859 |
|
jtulach@678
|
13860 |
$pop(this$static);
|
jtulach@678
|
13861 |
this$static.mode = 7;
|
jtulach@678
|
13862 |
--i;
|
jtulach@678
|
13863 |
continue;
|
jtulach@678
|
13864 |
break charactersloop;
|
jtulach@678
|
13865 |
case 15:
|
jtulach@678
|
13866 |
this$static.mode = 6;
|
jtulach@678
|
13867 |
--i;
|
jtulach@678
|
13868 |
continue;
|
jtulach@678
|
13869 |
case 16:
|
jtulach@678
|
13870 |
if (start < i) {
|
jtulach@678
|
13871 |
$accumulateCharacters(this$static, buf, start, i - start);
|
jtulach@678
|
13872 |
start = i;
|
jtulach@678
|
13873 |
}
|
jtulach@678
|
13874 |
|
jtulach@678
|
13875 |
start = i + 1;
|
jtulach@678
|
13876 |
continue;
|
jtulach@678
|
13877 |
case 17:
|
jtulach@678
|
13878 |
if (start < i) {
|
jtulach@678
|
13879 |
$accumulateCharacters(this$static, buf, start, i - start);
|
jtulach@678
|
13880 |
start = i;
|
jtulach@678
|
13881 |
}
|
jtulach@678
|
13882 |
|
jtulach@678
|
13883 |
start = i + 1;
|
jtulach@678
|
13884 |
continue;
|
jtulach@678
|
13885 |
case 18:
|
jtulach@678
|
13886 |
this$static.mode = 6;
|
jtulach@678
|
13887 |
--i;
|
jtulach@678
|
13888 |
continue;
|
jtulach@678
|
13889 |
case 19:
|
jtulach@678
|
13890 |
this$static.mode = 16;
|
jtulach@678
|
13891 |
--i;
|
jtulach@678
|
13892 |
continue;
|
jtulach@678
|
13893 |
}
|
jtulach@678
|
13894 |
|
jtulach@678
|
13895 |
}
|
jtulach@678
|
13896 |
}
|
jtulach@678
|
13897 |
|
jtulach@678
|
13898 |
if (start < end) {
|
jtulach@678
|
13899 |
$accumulateCharacters(this$static, buf, start, end - start);
|
jtulach@678
|
13900 |
}
|
jtulach@678
|
13901 |
|
jtulach@678
|
13902 |
}
|
jtulach@678
|
13903 |
}
|
jtulach@678
|
13904 |
|
jtulach@678
|
13905 |
function $checkMetaCharset(this$static, attributes){
|
jtulach@678
|
13906 |
var content, internalCharsetHtml5, internalCharsetLegacy;
|
jtulach@678
|
13907 |
content = $getValue_0(attributes, ($clinit_87() , CONTENT));
|
jtulach@678
|
13908 |
internalCharsetLegacy = null;
|
jtulach@678
|
13909 |
if (content != null) {
|
jtulach@678
|
13910 |
internalCharsetLegacy = extractCharsetFromContent(content);
|
jtulach@678
|
13911 |
}
|
jtulach@678
|
13912 |
if (internalCharsetLegacy == null) {
|
jtulach@678
|
13913 |
internalCharsetHtml5 = $getValue_0(attributes, CHARSET);
|
jtulach@678
|
13914 |
if (internalCharsetHtml5 != null) {
|
jtulach@678
|
13915 |
this$static.tokenizer.shouldSuspend = true;
|
jtulach@678
|
13916 |
}
|
jtulach@678
|
13917 |
}
|
jtulach@678
|
13918 |
else {
|
jtulach@678
|
13919 |
this$static.tokenizer.shouldSuspend = true;
|
jtulach@678
|
13920 |
}
|
jtulach@678
|
13921 |
}
|
jtulach@678
|
13922 |
|
jtulach@678
|
13923 |
function $checkPopName(this$static, name){
|
jtulach@678
|
13924 |
if (isNCName(name)) {
|
jtulach@678
|
13925 |
return name;
|
jtulach@678
|
13926 |
}
|
jtulach@678
|
13927 |
else {
|
jtulach@678
|
13928 |
switch (this$static.namePolicy.ordinal) {
|
jtulach@678
|
13929 |
case 0:
|
jtulach@678
|
13930 |
return name;
|
jtulach@678
|
13931 |
case 2:
|
jtulach@678
|
13932 |
return escapeName(name);
|
jtulach@678
|
13933 |
case 1:
|
jtulach@678
|
13934 |
$fatal_1(this$static, 'Element name \u201C' + name + '\u201D cannot be represented as XML 1.0.');
|
jtulach@678
|
13935 |
}
|
jtulach@678
|
13936 |
}
|
jtulach@678
|
13937 |
return null;
|
jtulach@678
|
13938 |
}
|
jtulach@678
|
13939 |
|
jtulach@678
|
13940 |
function $clearStackBackTo(this$static, eltPos){
|
jtulach@678
|
13941 |
while (this$static.currentPtr > eltPos) {
|
jtulach@678
|
13942 |
$pop(this$static);
|
jtulach@678
|
13943 |
}
|
jtulach@678
|
13944 |
}
|
jtulach@678
|
13945 |
|
jtulach@678
|
13946 |
function $clearTheListOfActiveFormattingElementsUpToTheLastMarker(this$static){
|
jtulach@678
|
13947 |
while (this$static.listPtr > -1) {
|
jtulach@678
|
13948 |
if (!this$static.listOfActiveFormattingElements[this$static.listPtr]) {
|
jtulach@678
|
13949 |
--this$static.listPtr;
|
jtulach@678
|
13950 |
return;
|
jtulach@678
|
13951 |
}
|
jtulach@678
|
13952 |
--this$static.listOfActiveFormattingElements[this$static.listPtr].refcount;
|
jtulach@678
|
13953 |
--this$static.listPtr;
|
jtulach@678
|
13954 |
}
|
jtulach@678
|
13955 |
}
|
jtulach@678
|
13956 |
|
jtulach@678
|
13957 |
function $closeTheCell(this$static, eltPos){
|
jtulach@678
|
13958 |
$generateImpliedEndTags(this$static);
|
jtulach@678
|
13959 |
while (this$static.currentPtr >= eltPos) {
|
jtulach@678
|
13960 |
$pop(this$static);
|
jtulach@678
|
13961 |
}
|
jtulach@678
|
13962 |
$clearTheListOfActiveFormattingElementsUpToTheLastMarker(this$static);
|
jtulach@678
|
13963 |
this$static.mode = 11;
|
jtulach@678
|
13964 |
return;
|
jtulach@678
|
13965 |
}
|
jtulach@678
|
13966 |
|
jtulach@678
|
13967 |
function $comment(this$static, buf, start, length){
|
jtulach@678
|
13968 |
var end, end_0, end_1;
|
jtulach@678
|
13969 |
this$static.needToDropLF = false;
|
jtulach@678
|
13970 |
if (!this$static.wantingComments) {
|
jtulach@678
|
13971 |
return;
|
jtulach@678
|
13972 |
}
|
jtulach@678
|
13973 |
commentloop: for (;;) {
|
jtulach@678
|
13974 |
switch (this$static.foreignFlag) {
|
jtulach@678
|
13975 |
case 0:
|
jtulach@678
|
13976 |
break commentloop;
|
jtulach@678
|
13977 |
default:switch (this$static.mode) {
|
jtulach@678
|
13978 |
case 0:
|
jtulach@678
|
13979 |
case 1:
|
jtulach@678
|
13980 |
case 18:
|
jtulach@678
|
13981 |
case 19:
|
jtulach@678
|
13982 |
$appendCommentToDocument(this$static, (end = start + length , __checkBounds(buf.length, start, end) , __valueOf(buf, start, end)));
|
jtulach@678
|
13983 |
return;
|
jtulach@678
|
13984 |
case 15:
|
jtulach@678
|
13985 |
$flushCharacters(this$static);
|
jtulach@678
|
13986 |
$appendComment(this$static, this$static.stack[0].node, (end_0 = start + length , __checkBounds(buf.length, start, end_0) , __valueOf(buf, start, end_0)));
|
jtulach@678
|
13987 |
return;
|
jtulach@678
|
13988 |
default:break commentloop;
|
jtulach@678
|
13989 |
}
|
jtulach@678
|
13990 |
|
jtulach@678
|
13991 |
}
|
jtulach@678
|
13992 |
}
|
jtulach@678
|
13993 |
$flushCharacters(this$static);
|
jtulach@678
|
13994 |
$appendComment(this$static, this$static.stack[this$static.currentPtr].node, (end_1 = start + length , __checkBounds(buf.length, start, end_1) , __valueOf(buf, start, end_1)));
|
jtulach@678
|
13995 |
return;
|
jtulach@678
|
13996 |
}
|
jtulach@678
|
13997 |
|
jtulach@678
|
13998 |
function $doctype(this$static, name, publicIdentifier, systemIdentifier, forceQuirks){
|
jtulach@678
|
13999 |
this$static.needToDropLF = false;
|
jtulach@678
|
14000 |
doctypeloop: for (;;) {
|
jtulach@678
|
14001 |
switch (this$static.foreignFlag) {
|
jtulach@678
|
14002 |
case 0:
|
jtulach@678
|
14003 |
break doctypeloop;
|
jtulach@678
|
14004 |
default:switch (this$static.mode) {
|
jtulach@678
|
14005 |
case 0:
|
jtulach@678
|
14006 |
switch (this$static.doctypeExpectation.ordinal) {
|
jtulach@678
|
14007 |
case 0:
|
jtulach@678
|
14008 |
if ($isQuirky(name, publicIdentifier, systemIdentifier, forceQuirks)) {
|
jtulach@678
|
14009 |
$documentModeInternal(this$static, ($clinit_78() , QUIRKS_MODE));
|
jtulach@678
|
14010 |
}
|
jtulach@678
|
14011 |
else if ($isAlmostStandards(publicIdentifier, systemIdentifier)) {
|
jtulach@678
|
14012 |
$documentModeInternal(this$static, ($clinit_78() , ALMOST_STANDARDS_MODE));
|
jtulach@678
|
14013 |
}
|
jtulach@678
|
14014 |
else {
|
jtulach@678
|
14015 |
if ($equals_0('-//W3C//DTD HTML 4.0//EN', publicIdentifier) && (systemIdentifier == null || $equals_0('http://www.w3.org/TR/REC-html40/strict.dtd', systemIdentifier)) || $equals_0('-//W3C//DTD HTML 4.01//EN', publicIdentifier) && (systemIdentifier == null || $equals_0('http://www.w3.org/TR/html4/strict.dtd', systemIdentifier)) || $equals_0('-//W3C//DTD XHTML 1.0 Strict//EN', publicIdentifier) && $equals_0('http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd', systemIdentifier) || $equals_0('-//W3C//DTD XHTML 1.1//EN', publicIdentifier) && $equals_0('http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd', systemIdentifier)) {
|
jtulach@678
|
14016 |
}
|
jtulach@678
|
14017 |
else
|
jtulach@678
|
14018 |
!((systemIdentifier == null || $equals_0('about:legacy-compat', systemIdentifier)) && publicIdentifier == null);
|
jtulach@678
|
14019 |
$documentModeInternal(this$static, ($clinit_78() , STANDARDS_MODE));
|
jtulach@678
|
14020 |
}
|
jtulach@678
|
14021 |
|
jtulach@678
|
14022 |
break;
|
jtulach@678
|
14023 |
case 2:
|
jtulach@678
|
14024 |
this$static.html4 = true;
|
jtulach@678
|
14025 |
this$static.tokenizer.html4 = true;
|
jtulach@678
|
14026 |
if ($isQuirky(name, publicIdentifier, systemIdentifier, forceQuirks)) {
|
jtulach@678
|
14027 |
$documentModeInternal(this$static, ($clinit_78() , QUIRKS_MODE));
|
jtulach@678
|
14028 |
}
|
jtulach@678
|
14029 |
else if ($isAlmostStandards(publicIdentifier, systemIdentifier)) {
|
jtulach@678
|
14030 |
$documentModeInternal(this$static, ($clinit_78() , ALMOST_STANDARDS_MODE));
|
jtulach@678
|
14031 |
}
|
jtulach@678
|
14032 |
else {
|
jtulach@678
|
14033 |
if ($equals_0('-//W3C//DTD HTML 4.01//EN', publicIdentifier)) {
|
jtulach@678
|
14034 |
!$equals_0('http://www.w3.org/TR/html4/strict.dtd', systemIdentifier);
|
jtulach@678
|
14035 |
}
|
jtulach@678
|
14036 |
else {
|
jtulach@678
|
14037 |
}
|
jtulach@678
|
14038 |
$documentModeInternal(this$static, ($clinit_78() , STANDARDS_MODE));
|
jtulach@678
|
14039 |
}
|
jtulach@678
|
14040 |
|
jtulach@678
|
14041 |
break;
|
jtulach@678
|
14042 |
case 1:
|
jtulach@678
|
14043 |
this$static.html4 = true;
|
jtulach@678
|
14044 |
this$static.tokenizer.html4 = true;
|
jtulach@678
|
14045 |
if ($isQuirky(name, publicIdentifier, systemIdentifier, forceQuirks)) {
|
jtulach@678
|
14046 |
$documentModeInternal(this$static, ($clinit_78() , QUIRKS_MODE));
|
jtulach@678
|
14047 |
}
|
jtulach@678
|
14048 |
else if ($isAlmostStandards(publicIdentifier, systemIdentifier)) {
|
jtulach@678
|
14049 |
if ($equals_0('-//W3C//DTD HTML 4.01 Transitional//EN', publicIdentifier) && systemIdentifier != null) {
|
jtulach@678
|
14050 |
!$equals_0('http://www.w3.org/TR/html4/loose.dtd', systemIdentifier);
|
jtulach@678
|
14051 |
}
|
jtulach@678
|
14052 |
else {
|
jtulach@678
|
14053 |
}
|
jtulach@678
|
14054 |
$documentModeInternal(this$static, ($clinit_78() , ALMOST_STANDARDS_MODE));
|
jtulach@678
|
14055 |
}
|
jtulach@678
|
14056 |
else {
|
jtulach@678
|
14057 |
$documentModeInternal(this$static, ($clinit_78() , STANDARDS_MODE));
|
jtulach@678
|
14058 |
}
|
jtulach@678
|
14059 |
|
jtulach@678
|
14060 |
break;
|
jtulach@678
|
14061 |
case 3:
|
jtulach@678
|
14062 |
this$static.html4 = $isHtml4Doctype(publicIdentifier);
|
jtulach@678
|
14063 |
if (this$static.html4) {
|
jtulach@678
|
14064 |
this$static.tokenizer.html4 = true;
|
jtulach@678
|
14065 |
}
|
jtulach@678
|
14066 |
|
jtulach@678
|
14067 |
if ($isQuirky(name, publicIdentifier, systemIdentifier, forceQuirks)) {
|
jtulach@678
|
14068 |
$documentModeInternal(this$static, ($clinit_78() , QUIRKS_MODE));
|
jtulach@678
|
14069 |
}
|
jtulach@678
|
14070 |
else if ($isAlmostStandards(publicIdentifier, systemIdentifier)) {
|
jtulach@678
|
14071 |
if ($equals_0('-//W3C//DTD HTML 4.01 Transitional//EN', publicIdentifier)) {
|
jtulach@678
|
14072 |
!$equals_0('http://www.w3.org/TR/html4/loose.dtd', systemIdentifier);
|
jtulach@678
|
14073 |
}
|
jtulach@678
|
14074 |
else {
|
jtulach@678
|
14075 |
}
|
jtulach@678
|
14076 |
$documentModeInternal(this$static, ($clinit_78() , ALMOST_STANDARDS_MODE));
|
jtulach@678
|
14077 |
}
|
jtulach@678
|
14078 |
else {
|
jtulach@678
|
14079 |
if ($equals_0('-//W3C//DTD HTML 4.01//EN', publicIdentifier)) {
|
jtulach@678
|
14080 |
!$equals_0('http://www.w3.org/TR/html4/strict.dtd', systemIdentifier);
|
jtulach@678
|
14081 |
}
|
jtulach@678
|
14082 |
else {
|
jtulach@678
|
14083 |
}
|
jtulach@678
|
14084 |
$documentModeInternal(this$static, ($clinit_78() , STANDARDS_MODE));
|
jtulach@678
|
14085 |
}
|
jtulach@678
|
14086 |
|
jtulach@678
|
14087 |
break;
|
jtulach@678
|
14088 |
case 4:
|
jtulach@678
|
14089 |
if ($isQuirky(name, publicIdentifier, systemIdentifier, forceQuirks)) {
|
jtulach@678
|
14090 |
$documentModeInternal(this$static, ($clinit_78() , QUIRKS_MODE));
|
jtulach@678
|
14091 |
}
|
jtulach@678
|
14092 |
else if ($isAlmostStandards(publicIdentifier, systemIdentifier)) {
|
jtulach@678
|
14093 |
$documentModeInternal(this$static, ($clinit_78() , ALMOST_STANDARDS_MODE));
|
jtulach@678
|
14094 |
}
|
jtulach@678
|
14095 |
else {
|
jtulach@678
|
14096 |
$documentModeInternal(this$static, ($clinit_78() , STANDARDS_MODE));
|
jtulach@678
|
14097 |
}
|
jtulach@678
|
14098 |
|
jtulach@678
|
14099 |
}
|
jtulach@678
|
14100 |
|
jtulach@678
|
14101 |
this$static.mode = 1;
|
jtulach@678
|
14102 |
return;
|
jtulach@678
|
14103 |
default:break doctypeloop;
|
jtulach@678
|
14104 |
}
|
jtulach@678
|
14105 |
|
jtulach@678
|
14106 |
}
|
jtulach@678
|
14107 |
}
|
jtulach@678
|
14108 |
return;
|
jtulach@678
|
14109 |
}
|
jtulach@678
|
14110 |
|
jtulach@678
|
14111 |
function $documentModeInternal(this$static, m){
|
jtulach@678
|
14112 |
this$static.quirks = m == ($clinit_78() , QUIRKS_MODE);
|
jtulach@678
|
14113 |
}
|
jtulach@678
|
14114 |
|
jtulach@678
|
14115 |
function $endSelect(this$static){
|
jtulach@678
|
14116 |
var eltPos;
|
jtulach@678
|
14117 |
eltPos = $findLastInTableScope(this$static, 'select');
|
jtulach@678
|
14118 |
if (eltPos == 2147483647) {
|
jtulach@678
|
14119 |
return;
|
jtulach@678
|
14120 |
}
|
jtulach@678
|
14121 |
while (this$static.currentPtr >= eltPos) {
|
jtulach@678
|
14122 |
$pop(this$static);
|
jtulach@678
|
14123 |
}
|
jtulach@678
|
14124 |
$resetTheInsertionMode(this$static);
|
jtulach@678
|
14125 |
}
|
jtulach@678
|
14126 |
|
jtulach@678
|
14127 |
function $endTag(this$static, elementName){
|
jtulach@678
|
14128 |
var eltPos, group, name, node;
|
jtulach@678
|
14129 |
this$static.needToDropLF = false;
|
jtulach@678
|
14130 |
endtagloop: for (;;) {
|
jtulach@678
|
14131 |
group = elementName.group;
|
jtulach@678
|
14132 |
name = elementName.name_0;
|
jtulach@678
|
14133 |
switch (this$static.mode) {
|
jtulach@678
|
14134 |
case 11:
|
jtulach@678
|
14135 |
switch (group) {
|
jtulach@678
|
14136 |
case 37:
|
jtulach@678
|
14137 |
eltPos = $findLastOrRoot(this$static, 37);
|
jtulach@678
|
14138 |
if (eltPos == 0) {
|
jtulach@678
|
14139 |
break endtagloop;
|
jtulach@678
|
14140 |
}
|
jtulach@678
|
14141 |
|
jtulach@678
|
14142 |
$clearStackBackTo(this$static, eltPos);
|
jtulach@678
|
14143 |
$pop(this$static);
|
jtulach@678
|
14144 |
this$static.mode = 10;
|
jtulach@678
|
14145 |
break endtagloop;
|
jtulach@678
|
14146 |
case 34:
|
jtulach@678
|
14147 |
eltPos = $findLastOrRoot(this$static, 37);
|
jtulach@678
|
14148 |
if (eltPos == 0) {
|
jtulach@678
|
14149 |
break endtagloop;
|
jtulach@678
|
14150 |
}
|
jtulach@678
|
14151 |
|
jtulach@678
|
14152 |
$clearStackBackTo(this$static, eltPos);
|
jtulach@678
|
14153 |
$pop(this$static);
|
jtulach@678
|
14154 |
this$static.mode = 10;
|
jtulach@678
|
14155 |
continue;
|
jtulach@678
|
14156 |
case 39:
|
jtulach@678
|
14157 |
if ($findLastInTableScope(this$static, name) == 2147483647) {
|
jtulach@678
|
14158 |
break endtagloop;
|
jtulach@678
|
14159 |
}
|
jtulach@678
|
14160 |
|
jtulach@678
|
14161 |
eltPos = $findLastOrRoot(this$static, 37);
|
jtulach@678
|
14162 |
if (eltPos == 0) {
|
jtulach@678
|
14163 |
break endtagloop;
|
jtulach@678
|
14164 |
}
|
jtulach@678
|
14165 |
|
jtulach@678
|
14166 |
$clearStackBackTo(this$static, eltPos);
|
jtulach@678
|
14167 |
$pop(this$static);
|
jtulach@678
|
14168 |
this$static.mode = 10;
|
jtulach@678
|
14169 |
continue;
|
jtulach@678
|
14170 |
break endtagloop;
|
jtulach@678
|
14171 |
}
|
jtulach@678
|
14172 |
|
jtulach@678
|
14173 |
case 10:
|
jtulach@678
|
14174 |
switch (group) {
|
jtulach@678
|
14175 |
case 39:
|
jtulach@678
|
14176 |
eltPos = $findLastOrRoot_0(this$static, name);
|
jtulach@678
|
14177 |
if (eltPos == 0) {
|
jtulach@678
|
14178 |
break endtagloop;
|
jtulach@678
|
14179 |
}
|
jtulach@678
|
14180 |
|
jtulach@678
|
14181 |
$clearStackBackTo(this$static, eltPos);
|
jtulach@678
|
14182 |
$pop(this$static);
|
jtulach@678
|
14183 |
this$static.mode = 7;
|
jtulach@678
|
14184 |
break endtagloop;
|
jtulach@678
|
14185 |
case 34:
|
jtulach@678
|
14186 |
eltPos = $findLastInTableScopeOrRootTbodyTheadTfoot(this$static);
|
jtulach@678
|
14187 |
if (eltPos == 0) {
|
jtulach@678
|
14188 |
break endtagloop;
|
jtulach@678
|
14189 |
}
|
jtulach@678
|
14190 |
|
jtulach@678
|
14191 |
$clearStackBackTo(this$static, eltPos);
|
jtulach@678
|
14192 |
$pop(this$static);
|
jtulach@678
|
14193 |
this$static.mode = 7;
|
jtulach@678
|
14194 |
continue;
|
jtulach@678
|
14195 |
break endtagloop;
|
jtulach@678
|
14196 |
}
|
jtulach@678
|
14197 |
|
jtulach@678
|
14198 |
case 7:
|
jtulach@678
|
14199 |
switch (group) {
|
jtulach@678
|
14200 |
case 34:
|
jtulach@678
|
14201 |
eltPos = $findLast(this$static, 'table');
|
jtulach@678
|
14202 |
if (eltPos == 2147483647) {
|
jtulach@678
|
14203 |
break endtagloop;
|
jtulach@678
|
14204 |
}
|
jtulach@678
|
14205 |
|
jtulach@678
|
14206 |
while (this$static.currentPtr >= eltPos) {
|
jtulach@678
|
14207 |
$pop(this$static);
|
jtulach@678
|
14208 |
}
|
jtulach@678
|
14209 |
|
jtulach@678
|
14210 |
$resetTheInsertionMode(this$static);
|
jtulach@678
|
14211 |
break endtagloop;
|
jtulach@678
|
14212 |
}
|
jtulach@678
|
14213 |
|
jtulach@678
|
14214 |
case 8:
|
jtulach@678
|
14215 |
switch (group) {
|
jtulach@678
|
14216 |
case 6:
|
jtulach@678
|
14217 |
eltPos = $findLastInTableScope(this$static, 'caption');
|
jtulach@678
|
14218 |
if (eltPos == 2147483647) {
|
jtulach@678
|
14219 |
break endtagloop;
|
jtulach@678
|
14220 |
}
|
jtulach@678
|
14221 |
|
jtulach@678
|
14222 |
$generateImpliedEndTags(this$static);
|
jtulach@678
|
14223 |
while (this$static.currentPtr >= eltPos) {
|
jtulach@678
|
14224 |
$pop(this$static);
|
jtulach@678
|
14225 |
}
|
jtulach@678
|
14226 |
|
jtulach@678
|
14227 |
$clearTheListOfActiveFormattingElementsUpToTheLastMarker(this$static);
|
jtulach@678
|
14228 |
this$static.mode = 7;
|
jtulach@678
|
14229 |
break endtagloop;
|
jtulach@678
|
14230 |
case 34:
|
jtulach@678
|
14231 |
eltPos = $findLastInTableScope(this$static, 'caption');
|
jtulach@678
|
14232 |
if (eltPos == 2147483647) {
|
jtulach@678
|
14233 |
break endtagloop;
|
jtulach@678
|
14234 |
}
|
jtulach@678
|
14235 |
|
jtulach@678
|
14236 |
$generateImpliedEndTags(this$static);
|
jtulach@678
|
14237 |
while (this$static.currentPtr >= eltPos) {
|
jtulach@678
|
14238 |
$pop(this$static);
|
jtulach@678
|
14239 |
}
|
jtulach@678
|
14240 |
|
jtulach@678
|
14241 |
$clearTheListOfActiveFormattingElementsUpToTheLastMarker(this$static);
|
jtulach@678
|
14242 |
this$static.mode = 7;
|
jtulach@678
|
14243 |
continue;
|
jtulach@678
|
14244 |
break endtagloop;
|
jtulach@678
|
14245 |
}
|
jtulach@678
|
14246 |
|
jtulach@678
|
14247 |
case 12:
|
jtulach@678
|
14248 |
switch (group) {
|
jtulach@678
|
14249 |
case 40:
|
jtulach@678
|
14250 |
eltPos = $findLastInTableScope(this$static, name);
|
jtulach@678
|
14251 |
if (eltPos == 2147483647) {
|
jtulach@678
|
14252 |
break endtagloop;
|
jtulach@678
|
14253 |
}
|
jtulach@678
|
14254 |
|
jtulach@678
|
14255 |
$generateImpliedEndTags(this$static);
|
jtulach@678
|
14256 |
while (this$static.currentPtr >= eltPos) {
|
jtulach@678
|
14257 |
$pop(this$static);
|
jtulach@678
|
14258 |
}
|
jtulach@678
|
14259 |
|
jtulach@678
|
14260 |
$clearTheListOfActiveFormattingElementsUpToTheLastMarker(this$static);
|
jtulach@678
|
14261 |
this$static.mode = 11;
|
jtulach@678
|
14262 |
break endtagloop;
|
jtulach@678
|
14263 |
case 34:
|
jtulach@678
|
14264 |
case 39:
|
jtulach@678
|
14265 |
case 37:
|
jtulach@678
|
14266 |
if ($findLastInTableScope(this$static, name) == 2147483647) {
|
jtulach@678
|
14267 |
break endtagloop;
|
jtulach@678
|
14268 |
}
|
jtulach@678
|
14269 |
|
jtulach@678
|
14270 |
$closeTheCell(this$static, $findLastInTableScopeTdTh(this$static));
|
jtulach@678
|
14271 |
continue;
|
jtulach@678
|
14272 |
break endtagloop;
|
jtulach@678
|
14273 |
}
|
jtulach@678
|
14274 |
|
jtulach@678
|
14275 |
case 21:
|
jtulach@678
|
14276 |
case 6:
|
jtulach@678
|
14277 |
switch (group) {
|
jtulach@678
|
14278 |
case 3:
|
jtulach@678
|
14279 |
if (!(this$static.currentPtr >= 1 && this$static.stack[1].group == 3)) {
|
jtulach@678
|
14280 |
break endtagloop;
|
jtulach@678
|
14281 |
}
|
jtulach@678
|
14282 |
|
jtulach@678
|
14283 |
this$static.mode = 15;
|
jtulach@678
|
14284 |
break endtagloop;
|
jtulach@678
|
14285 |
case 23:
|
jtulach@678
|
14286 |
if (!(this$static.currentPtr >= 1 && this$static.stack[1].group == 3)) {
|
jtulach@678
|
14287 |
break endtagloop;
|
jtulach@678
|
14288 |
}
|
jtulach@678
|
14289 |
|
jtulach@678
|
14290 |
this$static.mode = 15;
|
jtulach@678
|
14291 |
continue;
|
jtulach@678
|
14292 |
case 50:
|
jtulach@678
|
14293 |
case 46:
|
jtulach@678
|
14294 |
case 44:
|
jtulach@678
|
14295 |
case 61:
|
jtulach@678
|
14296 |
case 51:
|
jtulach@678
|
14297 |
eltPos = $findLastInScope(this$static, name);
|
jtulach@678
|
14298 |
if (eltPos == 2147483647) {
|
jtulach@678
|
14299 |
}
|
jtulach@678
|
14300 |
else {
|
jtulach@678
|
14301 |
$generateImpliedEndTags(this$static);
|
jtulach@678
|
14302 |
while (this$static.currentPtr >= eltPos) {
|
jtulach@678
|
14303 |
$pop(this$static);
|
jtulach@678
|
14304 |
}
|
jtulach@678
|
14305 |
}
|
jtulach@678
|
14306 |
|
jtulach@678
|
14307 |
break endtagloop;
|
jtulach@678
|
14308 |
case 9:
|
jtulach@678
|
14309 |
if (!this$static.formPointer) {
|
jtulach@678
|
14310 |
break endtagloop;
|
jtulach@678
|
14311 |
}
|
jtulach@678
|
14312 |
|
jtulach@678
|
14313 |
this$static.formPointer = null;
|
jtulach@678
|
14314 |
eltPos = $findLastInScope(this$static, name);
|
jtulach@678
|
14315 |
if (eltPos == 2147483647) {
|
jtulach@678
|
14316 |
break endtagloop;
|
jtulach@678
|
14317 |
}
|
jtulach@678
|
14318 |
|
jtulach@678
|
14319 |
$generateImpliedEndTags(this$static);
|
jtulach@678
|
14320 |
$removeFromStack(this$static, eltPos);
|
jtulach@678
|
14321 |
break endtagloop;
|
jtulach@678
|
14322 |
case 29:
|
jtulach@678
|
14323 |
eltPos = $findLastInScope(this$static, 'p');
|
jtulach@678
|
14324 |
if (eltPos == 2147483647) {
|
jtulach@678
|
14325 |
if (this$static.foreignFlag == 0) {
|
jtulach@678
|
14326 |
while (this$static.stack[this$static.currentPtr].ns != 'http://www.w3.org/1999/xhtml') {
|
jtulach@678
|
14327 |
$pop(this$static);
|
jtulach@678
|
14328 |
}
|
jtulach@678
|
14329 |
this$static.foreignFlag = 1;
|
jtulach@678
|
14330 |
}
|
jtulach@678
|
14331 |
$appendVoidElementToCurrentMayFoster_0(this$static, 'http://www.w3.org/1999/xhtml', elementName, ($clinit_91() , EMPTY_ATTRIBUTES));
|
jtulach@678
|
14332 |
break endtagloop;
|
jtulach@678
|
14333 |
}
|
jtulach@678
|
14334 |
|
jtulach@678
|
14335 |
$generateImpliedEndTagsExceptFor(this$static, 'p');
|
jtulach@678
|
14336 |
while (this$static.currentPtr >= eltPos) {
|
jtulach@678
|
14337 |
$pop(this$static);
|
jtulach@678
|
14338 |
}
|
jtulach@678
|
14339 |
|
jtulach@678
|
14340 |
break endtagloop;
|
jtulach@678
|
14341 |
case 41:
|
jtulach@678
|
14342 |
case 15:
|
jtulach@678
|
14343 |
eltPos = $findLastInScope(this$static, name);
|
jtulach@678
|
14344 |
if (eltPos == 2147483647) {
|
jtulach@678
|
14345 |
}
|
jtulach@678
|
14346 |
else {
|
jtulach@678
|
14347 |
$generateImpliedEndTagsExceptFor(this$static, name);
|
jtulach@678
|
14348 |
while (this$static.currentPtr >= eltPos) {
|
jtulach@678
|
14349 |
$pop(this$static);
|
jtulach@678
|
14350 |
}
|
jtulach@678
|
14351 |
}
|
jtulach@678
|
14352 |
|
jtulach@678
|
14353 |
break endtagloop;
|
jtulach@678
|
14354 |
case 42:
|
jtulach@678
|
14355 |
eltPos = $findLastInScopeHn(this$static);
|
jtulach@678
|
14356 |
if (eltPos == 2147483647) {
|
jtulach@678
|
14357 |
}
|
jtulach@678
|
14358 |
else {
|
jtulach@678
|
14359 |
$generateImpliedEndTags(this$static);
|
jtulach@678
|
14360 |
while (this$static.currentPtr >= eltPos) {
|
jtulach@678
|
14361 |
$pop(this$static);
|
jtulach@678
|
14362 |
}
|
jtulach@678
|
14363 |
}
|
jtulach@678
|
14364 |
|
jtulach@678
|
14365 |
break endtagloop;
|
jtulach@678
|
14366 |
case 1:
|
jtulach@678
|
14367 |
case 45:
|
jtulach@678
|
14368 |
case 64:
|
jtulach@678
|
14369 |
case 24:
|
jtulach@678
|
14370 |
$adoptionAgencyEndTag(this$static, name);
|
jtulach@678
|
14371 |
break endtagloop;
|
jtulach@678
|
14372 |
case 5:
|
jtulach@678
|
14373 |
case 63:
|
jtulach@678
|
14374 |
case 43:
|
jtulach@678
|
14375 |
eltPos = $findLastInScope(this$static, name);
|
jtulach@678
|
14376 |
if (eltPos == 2147483647) {
|
jtulach@678
|
14377 |
}
|
jtulach@678
|
14378 |
else {
|
jtulach@678
|
14379 |
$generateImpliedEndTags(this$static);
|
jtulach@678
|
14380 |
while (this$static.currentPtr >= eltPos) {
|
jtulach@678
|
14381 |
$pop(this$static);
|
jtulach@678
|
14382 |
}
|
jtulach@678
|
14383 |
$clearTheListOfActiveFormattingElementsUpToTheLastMarker(this$static);
|
jtulach@678
|
14384 |
}
|
jtulach@678
|
14385 |
|
jtulach@678
|
14386 |
break endtagloop;
|
jtulach@678
|
14387 |
case 4:
|
jtulach@678
|
14388 |
if (this$static.foreignFlag == 0) {
|
jtulach@678
|
14389 |
while (this$static.stack[this$static.currentPtr].ns != 'http://www.w3.org/1999/xhtml') {
|
jtulach@678
|
14390 |
$pop(this$static);
|
jtulach@678
|
14391 |
}
|
jtulach@678
|
14392 |
this$static.foreignFlag = 1;
|
jtulach@678
|
14393 |
}
|
jtulach@678
|
14394 |
|
jtulach@678
|
14395 |
$reconstructTheActiveFormattingElements(this$static);
|
jtulach@678
|
14396 |
$appendVoidElementToCurrentMayFoster_0(this$static, 'http://www.w3.org/1999/xhtml', elementName, ($clinit_91() , EMPTY_ATTRIBUTES));
|
jtulach@678
|
14397 |
break endtagloop;
|
jtulach@678
|
14398 |
case 49:
|
jtulach@678
|
14399 |
case 55:
|
jtulach@678
|
14400 |
case 48:
|
jtulach@678
|
14401 |
case 12:
|
jtulach@678
|
14402 |
case 13:
|
jtulach@678
|
14403 |
case 65:
|
jtulach@678
|
14404 |
case 22:
|
jtulach@678
|
14405 |
case 14:
|
jtulach@678
|
14406 |
case 47:
|
jtulach@678
|
14407 |
case 60:
|
jtulach@678
|
14408 |
case 25:
|
jtulach@678
|
14409 |
case 32:
|
jtulach@678
|
14410 |
case 34:
|
jtulach@678
|
14411 |
case 35:
|
jtulach@678
|
14412 |
break endtagloop;
|
jtulach@678
|
14413 |
case 26:
|
jtulach@678
|
14414 |
default:if (name == this$static.stack[this$static.currentPtr].name_0) {
|
jtulach@678
|
14415 |
$pop(this$static);
|
jtulach@678
|
14416 |
break endtagloop;
|
jtulach@678
|
14417 |
}
|
jtulach@678
|
14418 |
|
jtulach@678
|
14419 |
eltPos = this$static.currentPtr;
|
jtulach@678
|
14420 |
for (;;) {
|
jtulach@678
|
14421 |
node = this$static.stack[eltPos];
|
jtulach@678
|
14422 |
if (node.name_0 == name) {
|
jtulach@678
|
14423 |
$generateImpliedEndTags(this$static);
|
jtulach@678
|
14424 |
while (this$static.currentPtr >= eltPos) {
|
jtulach@678
|
14425 |
$pop(this$static);
|
jtulach@678
|
14426 |
}
|
jtulach@678
|
14427 |
break endtagloop;
|
jtulach@678
|
14428 |
}
|
jtulach@678
|
14429 |
else if (node.scoping || node.special) {
|
jtulach@678
|
14430 |
break endtagloop;
|
jtulach@678
|
14431 |
}
|
jtulach@678
|
14432 |
--eltPos;
|
jtulach@678
|
14433 |
}
|
jtulach@678
|
14434 |
|
jtulach@678
|
14435 |
}
|
jtulach@678
|
14436 |
|
jtulach@678
|
14437 |
case 9:
|
jtulach@678
|
14438 |
switch (group) {
|
jtulach@678
|
14439 |
case 8:
|
jtulach@678
|
14440 |
if (this$static.currentPtr == 0) {
|
jtulach@678
|
14441 |
break endtagloop;
|
jtulach@678
|
14442 |
}
|
jtulach@678
|
14443 |
|
jtulach@678
|
14444 |
$pop(this$static);
|
jtulach@678
|
14445 |
this$static.mode = 7;
|
jtulach@678
|
14446 |
break endtagloop;
|
jtulach@678
|
14447 |
case 7:
|
jtulach@678
|
14448 |
break endtagloop;
|
jtulach@678
|
14449 |
default:if (this$static.currentPtr == 0) {
|
jtulach@678
|
14450 |
break endtagloop;
|
jtulach@678
|
14451 |
}
|
jtulach@678
|
14452 |
|
jtulach@678
|
14453 |
$pop(this$static);
|
jtulach@678
|
14454 |
this$static.mode = 7;
|
jtulach@678
|
14455 |
continue;
|
jtulach@678
|
14456 |
}
|
jtulach@678
|
14457 |
|
jtulach@678
|
14458 |
case 14:
|
jtulach@678
|
14459 |
switch (group) {
|
jtulach@678
|
14460 |
case 6:
|
jtulach@678
|
14461 |
case 34:
|
jtulach@678
|
14462 |
case 39:
|
jtulach@678
|
14463 |
case 37:
|
jtulach@678
|
14464 |
case 40:
|
jtulach@678
|
14465 |
if ($findLastInTableScope(this$static, name) != 2147483647) {
|
jtulach@678
|
14466 |
$endSelect(this$static);
|
jtulach@678
|
14467 |
continue;
|
jtulach@678
|
14468 |
}
|
jtulach@678
|
14469 |
else {
|
jtulach@678
|
14470 |
break endtagloop;
|
jtulach@678
|
14471 |
}
|
jtulach@678
|
14472 |
|
jtulach@678
|
14473 |
}
|
jtulach@678
|
14474 |
|
jtulach@678
|
14475 |
case 13:
|
jtulach@678
|
14476 |
switch (group) {
|
jtulach@678
|
14477 |
case 28:
|
jtulach@678
|
14478 |
if ('option' == this$static.stack[this$static.currentPtr].name_0) {
|
jtulach@678
|
14479 |
$pop(this$static);
|
jtulach@678
|
14480 |
break endtagloop;
|
jtulach@678
|
14481 |
}
|
jtulach@678
|
14482 |
else {
|
jtulach@678
|
14483 |
break endtagloop;
|
jtulach@678
|
14484 |
}
|
jtulach@678
|
14485 |
|
jtulach@678
|
14486 |
case 27:
|
jtulach@678
|
14487 |
if ('option' == this$static.stack[this$static.currentPtr].name_0 && 'optgroup' == this$static.stack[this$static.currentPtr - 1].name_0) {
|
jtulach@678
|
14488 |
$pop(this$static);
|
jtulach@678
|
14489 |
}
|
jtulach@678
|
14490 |
|
jtulach@678
|
14491 |
if ('optgroup' == this$static.stack[this$static.currentPtr].name_0) {
|
jtulach@678
|
14492 |
$pop(this$static);
|
jtulach@678
|
14493 |
}
|
jtulach@678
|
14494 |
else {
|
jtulach@678
|
14495 |
}
|
jtulach@678
|
14496 |
|
jtulach@678
|
14497 |
break endtagloop;
|
jtulach@678
|
14498 |
case 32:
|
jtulach@678
|
14499 |
$endSelect(this$static);
|
jtulach@678
|
14500 |
break endtagloop;
|
jtulach@678
|
14501 |
default:break endtagloop;
|
jtulach@678
|
14502 |
}
|
jtulach@678
|
14503 |
|
jtulach@678
|
14504 |
case 15:
|
jtulach@678
|
14505 |
switch (group) {
|
jtulach@678
|
14506 |
case 23:
|
jtulach@678
|
14507 |
if (this$static.fragment) {
|
jtulach@678
|
14508 |
break endtagloop;
|
jtulach@678
|
14509 |
}
|
jtulach@678
|
14510 |
else {
|
jtulach@678
|
14511 |
this$static.mode = 18;
|
jtulach@678
|
14512 |
break endtagloop;
|
jtulach@678
|
14513 |
}
|
jtulach@678
|
14514 |
|
jtulach@678
|
14515 |
default:this$static.mode = 6;
|
jtulach@678
|
14516 |
continue;
|
jtulach@678
|
14517 |
}
|
jtulach@678
|
14518 |
|
jtulach@678
|
14519 |
case 16:
|
jtulach@678
|
14520 |
switch (group) {
|
jtulach@678
|
14521 |
case 11:
|
jtulach@678
|
14522 |
if (this$static.currentPtr == 0) {
|
jtulach@678
|
14523 |
break endtagloop;
|
jtulach@678
|
14524 |
}
|
jtulach@678
|
14525 |
|
jtulach@678
|
14526 |
$pop(this$static);
|
jtulach@678
|
14527 |
if (!this$static.fragment && 'frameset' != this$static.stack[this$static.currentPtr].name_0) {
|
jtulach@678
|
14528 |
this$static.mode = 17;
|
jtulach@678
|
14529 |
}
|
jtulach@678
|
14530 |
|
jtulach@678
|
14531 |
break endtagloop;
|
jtulach@678
|
14532 |
default:break endtagloop;
|
jtulach@678
|
14533 |
}
|
jtulach@678
|
14534 |
|
jtulach@678
|
14535 |
case 17:
|
jtulach@678
|
14536 |
switch (group) {
|
jtulach@678
|
14537 |
case 23:
|
jtulach@678
|
14538 |
this$static.mode = 19;
|
jtulach@678
|
14539 |
break endtagloop;
|
jtulach@678
|
14540 |
default:break endtagloop;
|
jtulach@678
|
14541 |
}
|
jtulach@678
|
14542 |
|
jtulach@678
|
14543 |
case 0:
|
jtulach@678
|
14544 |
$documentModeInternal(this$static, ($clinit_78() , QUIRKS_MODE));
|
jtulach@678
|
14545 |
this$static.mode = 1;
|
jtulach@678
|
14546 |
continue;
|
jtulach@678
|
14547 |
case 1:
|
jtulach@678
|
14548 |
$appendHtmlElementToDocumentAndPush(this$static, $emptyAttributes(this$static.tokenizer));
|
jtulach@678
|
14549 |
this$static.mode = 2;
|
jtulach@678
|
14550 |
continue;
|
jtulach@678
|
14551 |
case 2:
|
jtulach@678
|
14552 |
switch (group) {
|
jtulach@678
|
14553 |
case 20:
|
jtulach@678
|
14554 |
case 4:
|
jtulach@678
|
14555 |
case 23:
|
jtulach@678
|
14556 |
case 3:
|
jtulach@678
|
14557 |
$appendToCurrentNodeAndPushHeadElement(this$static, ($clinit_91() , EMPTY_ATTRIBUTES));
|
jtulach@678
|
14558 |
this$static.mode = 3;
|
jtulach@678
|
14559 |
continue;
|
jtulach@678
|
14560 |
default:break endtagloop;
|
jtulach@678
|
14561 |
}
|
jtulach@678
|
14562 |
|
jtulach@678
|
14563 |
case 3:
|
jtulach@678
|
14564 |
switch (group) {
|
jtulach@678
|
14565 |
case 20:
|
jtulach@678
|
14566 |
$pop(this$static);
|
jtulach@678
|
14567 |
this$static.mode = 5;
|
jtulach@678
|
14568 |
break endtagloop;
|
jtulach@678
|
14569 |
case 4:
|
jtulach@678
|
14570 |
case 23:
|
jtulach@678
|
14571 |
case 3:
|
jtulach@678
|
14572 |
$pop(this$static);
|
jtulach@678
|
14573 |
this$static.mode = 5;
|
jtulach@678
|
14574 |
continue;
|
jtulach@678
|
14575 |
default:break endtagloop;
|
jtulach@678
|
14576 |
}
|
jtulach@678
|
14577 |
|
jtulach@678
|
14578 |
case 4:
|
jtulach@678
|
14579 |
switch (group) {
|
jtulach@678
|
14580 |
case 26:
|
jtulach@678
|
14581 |
$pop(this$static);
|
jtulach@678
|
14582 |
this$static.mode = 3;
|
jtulach@678
|
14583 |
break endtagloop;
|
jtulach@678
|
14584 |
case 4:
|
jtulach@678
|
14585 |
$pop(this$static);
|
jtulach@678
|
14586 |
this$static.mode = 3;
|
jtulach@678
|
14587 |
continue;
|
jtulach@678
|
14588 |
default:break endtagloop;
|
jtulach@678
|
14589 |
}
|
jtulach@678
|
14590 |
|
jtulach@678
|
14591 |
case 5:
|
jtulach@678
|
14592 |
switch (group) {
|
jtulach@678
|
14593 |
case 23:
|
jtulach@678
|
14594 |
case 3:
|
jtulach@678
|
14595 |
case 4:
|
jtulach@678
|
14596 |
$appendToCurrentNodeAndPushElement(this$static, 'http://www.w3.org/1999/xhtml', ($clinit_89() , BODY), $emptyAttributes(this$static.tokenizer));
|
jtulach@678
|
14597 |
this$static.mode = 21;
|
jtulach@678
|
14598 |
continue;
|
jtulach@678
|
14599 |
default:break endtagloop;
|
jtulach@678
|
14600 |
}
|
jtulach@678
|
14601 |
|
jtulach@678
|
14602 |
case 18:
|
jtulach@678
|
14603 |
this$static.mode = 6;
|
jtulach@678
|
14604 |
continue;
|
jtulach@678
|
14605 |
case 19:
|
jtulach@678
|
14606 |
this$static.mode = 16;
|
jtulach@678
|
14607 |
continue;
|
jtulach@678
|
14608 |
case 20:
|
jtulach@678
|
14609 |
if (this$static.originalMode == 5) {
|
jtulach@678
|
14610 |
$pop(this$static);
|
jtulach@678
|
14611 |
}
|
jtulach@678
|
14612 |
|
jtulach@678
|
14613 |
$pop(this$static);
|
jtulach@678
|
14614 |
this$static.mode = this$static.originalMode;
|
jtulach@678
|
14615 |
break endtagloop;
|
jtulach@678
|
14616 |
}
|
jtulach@678
|
14617 |
}
|
jtulach@678
|
14618 |
if (this$static.foreignFlag == 0 && !$hasForeignInScope(this$static)) {
|
jtulach@678
|
14619 |
this$static.foreignFlag = 1;
|
jtulach@678
|
14620 |
}
|
jtulach@678
|
14621 |
}
|
jtulach@678
|
14622 |
|
jtulach@678
|
14623 |
function $endTokenization(this$static){
|
jtulach@678
|
14624 |
this$static.formPointer = null;
|
jtulach@678
|
14625 |
this$static.headPointer = null;
|
jtulach@678
|
14626 |
while (this$static.currentPtr > -1) {
|
jtulach@678
|
14627 |
--this$static.stack[this$static.currentPtr].refcount;
|
jtulach@678
|
14628 |
--this$static.currentPtr;
|
jtulach@678
|
14629 |
}
|
jtulach@678
|
14630 |
this$static.stack = null;
|
jtulach@678
|
14631 |
while (this$static.listPtr > -1) {
|
jtulach@678
|
14632 |
if (this$static.listOfActiveFormattingElements[this$static.listPtr]) {
|
jtulach@678
|
14633 |
--this$static.listOfActiveFormattingElements[this$static.listPtr].refcount;
|
jtulach@678
|
14634 |
}
|
jtulach@678
|
14635 |
--this$static.listPtr;
|
jtulach@678
|
14636 |
}
|
jtulach@678
|
14637 |
this$static.listOfActiveFormattingElements = null;
|
jtulach@678
|
14638 |
$clearImpl(this$static.idLocations);
|
jtulach@678
|
14639 |
this$static.charBuffer = null;
|
jtulach@678
|
14640 |
}
|
jtulach@678
|
14641 |
|
jtulach@678
|
14642 |
function $eof_0(this$static){
|
jtulach@678
|
14643 |
var group, i;
|
jtulach@678
|
14644 |
$flushCharacters(this$static);
|
jtulach@678
|
14645 |
switch (this$static.foreignFlag) {
|
jtulach@678
|
14646 |
case 0:
|
jtulach@678
|
14647 |
while (this$static.stack[this$static.currentPtr].ns != 'http://www.w3.org/1999/xhtml') {
|
jtulach@678
|
14648 |
$popOnEof(this$static);
|
jtulach@678
|
14649 |
}
|
jtulach@678
|
14650 |
|
jtulach@678
|
14651 |
this$static.foreignFlag = 1;
|
jtulach@678
|
14652 |
}
|
jtulach@678
|
14653 |
eofloop: for (;;) {
|
jtulach@678
|
14654 |
switch (this$static.mode) {
|
jtulach@678
|
14655 |
case 0:
|
jtulach@678
|
14656 |
$documentModeInternal(this$static, ($clinit_78() , QUIRKS_MODE));
|
jtulach@678
|
14657 |
this$static.mode = 1;
|
jtulach@678
|
14658 |
continue;
|
jtulach@678
|
14659 |
case 1:
|
jtulach@678
|
14660 |
$appendHtmlElementToDocumentAndPush(this$static, $emptyAttributes(this$static.tokenizer));
|
jtulach@678
|
14661 |
this$static.mode = 2;
|
jtulach@678
|
14662 |
continue;
|
jtulach@678
|
14663 |
case 2:
|
jtulach@678
|
14664 |
$appendToCurrentNodeAndPushHeadElement(this$static, ($clinit_91() , EMPTY_ATTRIBUTES));
|
jtulach@678
|
14665 |
this$static.mode = 3;
|
jtulach@678
|
14666 |
continue;
|
jtulach@678
|
14667 |
case 3:
|
jtulach@678
|
14668 |
while (this$static.currentPtr > 0) {
|
jtulach@678
|
14669 |
$popOnEof(this$static);
|
jtulach@678
|
14670 |
}
|
jtulach@678
|
14671 |
|
jtulach@678
|
14672 |
this$static.mode = 5;
|
jtulach@678
|
14673 |
continue;
|
jtulach@678
|
14674 |
case 4:
|
jtulach@678
|
14675 |
while (this$static.currentPtr > 1) {
|
jtulach@678
|
14676 |
$popOnEof(this$static);
|
jtulach@678
|
14677 |
}
|
jtulach@678
|
14678 |
|
jtulach@678
|
14679 |
this$static.mode = 3;
|
jtulach@678
|
14680 |
continue;
|
jtulach@678
|
14681 |
case 5:
|
jtulach@678
|
14682 |
$appendToCurrentNodeAndPushElement(this$static, 'http://www.w3.org/1999/xhtml', ($clinit_89() , BODY), $emptyAttributes(this$static.tokenizer));
|
jtulach@678
|
14683 |
this$static.mode = 6;
|
jtulach@678
|
14684 |
continue;
|
jtulach@678
|
14685 |
case 9:
|
jtulach@678
|
14686 |
if (this$static.currentPtr == 0) {
|
jtulach@678
|
14687 |
break eofloop;
|
jtulach@678
|
14688 |
}
|
jtulach@678
|
14689 |
else {
|
jtulach@678
|
14690 |
$popOnEof(this$static);
|
jtulach@678
|
14691 |
this$static.mode = 7;
|
jtulach@678
|
14692 |
continue;
|
jtulach@678
|
14693 |
}
|
jtulach@678
|
14694 |
|
jtulach@678
|
14695 |
case 21:
|
jtulach@678
|
14696 |
case 8:
|
jtulach@678
|
14697 |
case 12:
|
jtulach@678
|
14698 |
case 6:
|
jtulach@678
|
14699 |
openelementloop: for (i = this$static.currentPtr; i >= 0; --i) {
|
jtulach@678
|
14700 |
group = this$static.stack[i].group;
|
jtulach@678
|
14701 |
switch (group) {
|
jtulach@678
|
14702 |
case 41:
|
jtulach@678
|
14703 |
case 15:
|
jtulach@678
|
14704 |
case 29:
|
jtulach@678
|
14705 |
case 39:
|
jtulach@678
|
14706 |
case 40:
|
jtulach@678
|
14707 |
case 3:
|
jtulach@678
|
14708 |
case 23:
|
jtulach@678
|
14709 |
break;
|
jtulach@678
|
14710 |
default:break openelementloop;
|
jtulach@678
|
14711 |
}
|
jtulach@678
|
14712 |
}
|
jtulach@678
|
14713 |
|
jtulach@678
|
14714 |
break eofloop;
|
jtulach@678
|
14715 |
case 20:
|
jtulach@678
|
14716 |
if (this$static.originalMode == 5) {
|
jtulach@678
|
14717 |
$popOnEof(this$static);
|
jtulach@678
|
14718 |
}
|
jtulach@678
|
14719 |
|
jtulach@678
|
14720 |
$popOnEof(this$static);
|
jtulach@678
|
14721 |
this$static.mode = this$static.originalMode;
|
jtulach@678
|
14722 |
continue;
|
jtulach@678
|
14723 |
case 10:
|
jtulach@678
|
14724 |
case 11:
|
jtulach@678
|
14725 |
case 7:
|
jtulach@678
|
14726 |
case 13:
|
jtulach@678
|
14727 |
case 14:
|
jtulach@678
|
14728 |
case 16:
|
jtulach@678
|
14729 |
break eofloop;
|
jtulach@678
|
14730 |
case 15:
|
jtulach@678
|
14731 |
case 17:
|
jtulach@678
|
14732 |
case 18:
|
jtulach@678
|
14733 |
case 19:
|
jtulach@678
|
14734 |
default:if (this$static.currentPtr == 0) {
|
jtulach@678
|
14735 |
fromDouble((new Date()).getTime());
|
jtulach@678
|
14736 |
}
|
jtulach@678
|
14737 |
|
jtulach@678
|
14738 |
break eofloop;
|
jtulach@678
|
14739 |
}
|
jtulach@678
|
14740 |
}
|
jtulach@678
|
14741 |
while (this$static.currentPtr > 0) {
|
jtulach@678
|
14742 |
$popOnEof(this$static);
|
jtulach@678
|
14743 |
}
|
jtulach@678
|
14744 |
if (!this$static.fragment) {
|
jtulach@678
|
14745 |
$popOnEof(this$static);
|
jtulach@678
|
14746 |
}
|
jtulach@678
|
14747 |
}
|
jtulach@678
|
14748 |
|
jtulach@678
|
14749 |
function $fatal_0(this$static, e){
|
jtulach@678
|
14750 |
var spe;
|
jtulach@678
|
14751 |
spe = $SAXParseException_0(new SAXParseException(), e.detailMessage, this$static.tokenizer, e);
|
jtulach@678
|
14752 |
throw spe;
|
jtulach@678
|
14753 |
}
|
jtulach@678
|
14754 |
|
jtulach@678
|
14755 |
function $fatal_1(this$static, s){
|
jtulach@678
|
14756 |
var spe;
|
jtulach@678
|
14757 |
spe = $SAXParseException(new SAXParseException(), s, this$static.tokenizer);
|
jtulach@678
|
14758 |
throw spe;
|
jtulach@678
|
14759 |
}
|
jtulach@678
|
14760 |
|
jtulach@678
|
14761 |
function $findInListOfActiveFormattingElements(this$static, node){
|
jtulach@678
|
14762 |
var i;
|
jtulach@678
|
14763 |
for (i = this$static.listPtr; i >= 0; --i) {
|
jtulach@678
|
14764 |
if (node == this$static.listOfActiveFormattingElements[i]) {
|
jtulach@678
|
14765 |
return i;
|
jtulach@678
|
14766 |
}
|
jtulach@678
|
14767 |
}
|
jtulach@678
|
14768 |
return -1;
|
jtulach@678
|
14769 |
}
|
jtulach@678
|
14770 |
|
jtulach@678
|
14771 |
function $findInListOfActiveFormattingElementsContainsBetweenEndAndLastMarker(this$static, name){
|
jtulach@678
|
14772 |
var i, node;
|
jtulach@678
|
14773 |
for (i = this$static.listPtr; i >= 0; --i) {
|
jtulach@678
|
14774 |
node = this$static.listOfActiveFormattingElements[i];
|
jtulach@678
|
14775 |
if (!node) {
|
jtulach@678
|
14776 |
return -1;
|
jtulach@678
|
14777 |
}
|
jtulach@678
|
14778 |
else if (node.name_0 == name) {
|
jtulach@678
|
14779 |
return i;
|
jtulach@678
|
14780 |
}
|
jtulach@678
|
14781 |
}
|
jtulach@678
|
14782 |
return -1;
|
jtulach@678
|
14783 |
}
|
jtulach@678
|
14784 |
|
jtulach@678
|
14785 |
function $findLast(this$static, name){
|
jtulach@678
|
14786 |
var i;
|
jtulach@678
|
14787 |
for (i = this$static.currentPtr; i > 0; --i) {
|
jtulach@678
|
14788 |
if (this$static.stack[i].name_0 == name) {
|
jtulach@678
|
14789 |
return i;
|
jtulach@678
|
14790 |
}
|
jtulach@678
|
14791 |
}
|
jtulach@678
|
14792 |
return 2147483647;
|
jtulach@678
|
14793 |
}
|
jtulach@678
|
14794 |
|
jtulach@678
|
14795 |
function $findLastInScope(this$static, name){
|
jtulach@678
|
14796 |
var i;
|
jtulach@678
|
14797 |
for (i = this$static.currentPtr; i > 0; --i) {
|
jtulach@678
|
14798 |
if (this$static.stack[i].name_0 == name) {
|
jtulach@678
|
14799 |
return i;
|
jtulach@678
|
14800 |
}
|
jtulach@678
|
14801 |
else if (this$static.stack[i].scoping) {
|
jtulach@678
|
14802 |
return 2147483647;
|
jtulach@678
|
14803 |
}
|
jtulach@678
|
14804 |
}
|
jtulach@678
|
14805 |
return 2147483647;
|
jtulach@678
|
14806 |
}
|
jtulach@678
|
14807 |
|
jtulach@678
|
14808 |
function $findLastInScopeHn(this$static){
|
jtulach@678
|
14809 |
var i;
|
jtulach@678
|
14810 |
for (i = this$static.currentPtr; i > 0; --i) {
|
jtulach@678
|
14811 |
if (this$static.stack[i].group == 42) {
|
jtulach@678
|
14812 |
return i;
|
jtulach@678
|
14813 |
}
|
jtulach@678
|
14814 |
else if (this$static.stack[i].scoping) {
|
jtulach@678
|
14815 |
return 2147483647;
|
jtulach@678
|
14816 |
}
|
jtulach@678
|
14817 |
}
|
jtulach@678
|
14818 |
return 2147483647;
|
jtulach@678
|
14819 |
}
|
jtulach@678
|
14820 |
|
jtulach@678
|
14821 |
function $findLastInTableScope(this$static, name){
|
jtulach@678
|
14822 |
var i;
|
jtulach@678
|
14823 |
for (i = this$static.currentPtr; i > 0; --i) {
|
jtulach@678
|
14824 |
if (this$static.stack[i].name_0 == name) {
|
jtulach@678
|
14825 |
return i;
|
jtulach@678
|
14826 |
}
|
jtulach@678
|
14827 |
else if (this$static.stack[i].name_0 == 'table') {
|
jtulach@678
|
14828 |
return 2147483647;
|
jtulach@678
|
14829 |
}
|
jtulach@678
|
14830 |
}
|
jtulach@678
|
14831 |
return 2147483647;
|
jtulach@678
|
14832 |
}
|
jtulach@678
|
14833 |
|
jtulach@678
|
14834 |
function $findLastInTableScopeOrRootTbodyTheadTfoot(this$static){
|
jtulach@678
|
14835 |
var i;
|
jtulach@678
|
14836 |
for (i = this$static.currentPtr; i > 0; --i) {
|
jtulach@678
|
14837 |
if (this$static.stack[i].group == 39) {
|
jtulach@678
|
14838 |
return i;
|
jtulach@678
|
14839 |
}
|
jtulach@678
|
14840 |
}
|
jtulach@678
|
14841 |
return 0;
|
jtulach@678
|
14842 |
}
|
jtulach@678
|
14843 |
|
jtulach@678
|
14844 |
function $findLastInTableScopeTdTh(this$static){
|
jtulach@678
|
14845 |
var i, name;
|
jtulach@678
|
14846 |
for (i = this$static.currentPtr; i > 0; --i) {
|
jtulach@678
|
14847 |
name = this$static.stack[i].name_0;
|
jtulach@678
|
14848 |
if ('td' == name || 'th' == name) {
|
jtulach@678
|
14849 |
return i;
|
jtulach@678
|
14850 |
}
|
jtulach@678
|
14851 |
else if (name == 'table') {
|
jtulach@678
|
14852 |
return 2147483647;
|
jtulach@678
|
14853 |
}
|
jtulach@678
|
14854 |
}
|
jtulach@678
|
14855 |
return 2147483647;
|
jtulach@678
|
14856 |
}
|
jtulach@678
|
14857 |
|
jtulach@678
|
14858 |
function $findLastOrRoot_0(this$static, name){
|
jtulach@678
|
14859 |
var i;
|
jtulach@678
|
14860 |
for (i = this$static.currentPtr; i > 0; --i) {
|
jtulach@678
|
14861 |
if (this$static.stack[i].name_0 == name) {
|
jtulach@678
|
14862 |
return i;
|
jtulach@678
|
14863 |
}
|
jtulach@678
|
14864 |
}
|
jtulach@678
|
14865 |
return 0;
|
jtulach@678
|
14866 |
}
|
jtulach@678
|
14867 |
|
jtulach@678
|
14868 |
function $findLastOrRoot(this$static, group){
|
jtulach@678
|
14869 |
var i;
|
jtulach@678
|
14870 |
for (i = this$static.currentPtr; i > 0; --i) {
|
jtulach@678
|
14871 |
if (this$static.stack[i].group == group) {
|
jtulach@678
|
14872 |
return i;
|
jtulach@678
|
14873 |
}
|
jtulach@678
|
14874 |
}
|
jtulach@678
|
14875 |
return 0;
|
jtulach@678
|
14876 |
}
|
jtulach@678
|
14877 |
|
jtulach@678
|
14878 |
function $flushCharacters(this$static){
|
jtulach@678
|
14879 |
var current, elt, eltPos, node;
|
jtulach@678
|
14880 |
if (this$static.charBufferLen > 0) {
|
jtulach@678
|
14881 |
current = this$static.stack[this$static.currentPtr];
|
jtulach@678
|
14882 |
if (current.fosterParenting && $charBufferContainsNonWhitespace(this$static)) {
|
jtulach@678
|
14883 |
eltPos = $findLastOrRoot(this$static, 34);
|
jtulach@678
|
14884 |
node = this$static.stack[eltPos];
|
jtulach@678
|
14885 |
elt = node.node;
|
jtulach@678
|
14886 |
if (eltPos == 0) {
|
jtulach@678
|
14887 |
$appendCharacters(this$static, elt, valueOf_1(this$static.charBuffer, 0, this$static.charBufferLen));
|
jtulach@678
|
14888 |
this$static.charBufferLen = 0;
|
jtulach@678
|
14889 |
return;
|
jtulach@678
|
14890 |
}
|
jtulach@678
|
14891 |
$insertFosterParentedCharacters_0(this$static, this$static.charBuffer, 0, this$static.charBufferLen, elt, this$static.stack[eltPos - 1].node);
|
jtulach@678
|
14892 |
this$static.charBufferLen = 0;
|
jtulach@678
|
14893 |
return;
|
jtulach@678
|
14894 |
}
|
jtulach@678
|
14895 |
$appendCharacters(this$static, this$static.stack[this$static.currentPtr].node, valueOf_1(this$static.charBuffer, 0, this$static.charBufferLen));
|
jtulach@678
|
14896 |
this$static.charBufferLen = 0;
|
jtulach@678
|
14897 |
}
|
jtulach@678
|
14898 |
}
|
jtulach@678
|
14899 |
|
jtulach@678
|
14900 |
function $generateImpliedEndTags(this$static){
|
jtulach@678
|
14901 |
for (;;) {
|
jtulach@678
|
14902 |
switch (this$static.stack[this$static.currentPtr].group) {
|
jtulach@678
|
14903 |
case 29:
|
jtulach@678
|
14904 |
case 15:
|
jtulach@678
|
14905 |
case 41:
|
jtulach@678
|
14906 |
case 28:
|
jtulach@678
|
14907 |
case 27:
|
jtulach@678
|
14908 |
case 53:
|
jtulach@678
|
14909 |
$pop(this$static);
|
jtulach@678
|
14910 |
continue;
|
jtulach@678
|
14911 |
default:return;
|
jtulach@678
|
14912 |
}
|
jtulach@678
|
14913 |
}
|
jtulach@678
|
14914 |
}
|
jtulach@678
|
14915 |
|
jtulach@678
|
14916 |
function $generateImpliedEndTagsExceptFor(this$static, name){
|
jtulach@678
|
14917 |
var node;
|
jtulach@678
|
14918 |
for (;;) {
|
jtulach@678
|
14919 |
node = this$static.stack[this$static.currentPtr];
|
jtulach@678
|
14920 |
switch (node.group) {
|
jtulach@678
|
14921 |
case 29:
|
jtulach@678
|
14922 |
case 15:
|
jtulach@678
|
14923 |
case 41:
|
jtulach@678
|
14924 |
case 28:
|
jtulach@678
|
14925 |
case 27:
|
jtulach@678
|
14926 |
case 53:
|
jtulach@678
|
14927 |
if (node.name_0 == name) {
|
jtulach@678
|
14928 |
return;
|
jtulach@678
|
14929 |
}
|
jtulach@678
|
14930 |
|
jtulach@678
|
14931 |
$pop(this$static);
|
jtulach@678
|
14932 |
continue;
|
jtulach@678
|
14933 |
default:return;
|
jtulach@678
|
14934 |
}
|
jtulach@678
|
14935 |
}
|
jtulach@678
|
14936 |
}
|
jtulach@678
|
14937 |
|
jtulach@678
|
14938 |
function $hasForeignInScope(this$static){
|
jtulach@678
|
14939 |
var i;
|
jtulach@678
|
14940 |
for (i = this$static.currentPtr; i > 0; --i) {
|
jtulach@678
|
14941 |
if (this$static.stack[i].ns != 'http://www.w3.org/1999/xhtml') {
|
jtulach@678
|
14942 |
return true;
|
jtulach@678
|
14943 |
}
|
jtulach@678
|
14944 |
else if (this$static.stack[i].scoping) {
|
jtulach@678
|
14945 |
return false;
|
jtulach@678
|
14946 |
}
|
jtulach@678
|
14947 |
}
|
jtulach@678
|
14948 |
return false;
|
jtulach@678
|
14949 |
}
|
jtulach@678
|
14950 |
|
jtulach@678
|
14951 |
function $implicitlyCloseP(this$static){
|
jtulach@678
|
14952 |
var eltPos;
|
jtulach@678
|
14953 |
eltPos = $findLastInScope(this$static, 'p');
|
jtulach@678
|
14954 |
if (eltPos == 2147483647) {
|
jtulach@678
|
14955 |
return;
|
jtulach@678
|
14956 |
}
|
jtulach@678
|
14957 |
$generateImpliedEndTagsExceptFor(this$static, 'p');
|
jtulach@678
|
14958 |
while (this$static.currentPtr >= eltPos) {
|
jtulach@678
|
14959 |
$pop(this$static);
|
jtulach@678
|
14960 |
}
|
jtulach@678
|
14961 |
}
|
jtulach@678
|
14962 |
|
jtulach@678
|
14963 |
function $insertIntoFosterParent(this$static, child){
|
jtulach@678
|
14964 |
var elt, eltPos, node;
|
jtulach@678
|
14965 |
eltPos = $findLastOrRoot(this$static, 34);
|
jtulach@678
|
14966 |
node = this$static.stack[eltPos];
|
jtulach@678
|
14967 |
elt = node.node;
|
jtulach@678
|
14968 |
if (eltPos == 0) {
|
jtulach@678
|
14969 |
$appendElement(this$static, child, elt);
|
jtulach@678
|
14970 |
return;
|
jtulach@678
|
14971 |
}
|
jtulach@678
|
14972 |
$insertFosterParentedChild(this$static, child, elt, this$static.stack[eltPos - 1].node);
|
jtulach@678
|
14973 |
}
|
jtulach@678
|
14974 |
|
jtulach@678
|
14975 |
function $insertIntoListOfActiveFormattingElements(this$static, formattingClone, bookmark){
|
jtulach@678
|
14976 |
++formattingClone.refcount;
|
jtulach@678
|
14977 |
if (bookmark <= this$static.listPtr) {
|
jtulach@678
|
14978 |
arraycopy(this$static.listOfActiveFormattingElements, bookmark, this$static.listOfActiveFormattingElements, bookmark + 1, this$static.listPtr - bookmark + 1);
|
jtulach@678
|
14979 |
}
|
jtulach@678
|
14980 |
++this$static.listPtr;
|
jtulach@678
|
14981 |
this$static.listOfActiveFormattingElements[bookmark] = formattingClone;
|
jtulach@678
|
14982 |
}
|
jtulach@678
|
14983 |
|
jtulach@678
|
14984 |
function $insertIntoStack(this$static, node, position){
|
jtulach@678
|
14985 |
if (position == this$static.currentPtr + 1) {
|
jtulach@678
|
14986 |
$flushCharacters(this$static);
|
jtulach@678
|
14987 |
$push_0(this$static, node);
|
jtulach@678
|
14988 |
}
|
jtulach@678
|
14989 |
else {
|
jtulach@678
|
14990 |
arraycopy(this$static.stack, position, this$static.stack, position + 1, this$static.currentPtr - position + 1);
|
jtulach@678
|
14991 |
++this$static.currentPtr;
|
jtulach@678
|
14992 |
this$static.stack[position] = node;
|
jtulach@678
|
14993 |
}
|
jtulach@678
|
14994 |
}
|
jtulach@678
|
14995 |
|
jtulach@678
|
14996 |
function $isAlmostStandards(publicIdentifier, systemIdentifier){
|
jtulach@678
|
14997 |
if (lowerCaseLiteralEqualsIgnoreAsciiCaseString('-//w3c//dtd xhtml 1.0 transitional//en', publicIdentifier)) {
|
jtulach@678
|
14998 |
return true;
|
jtulach@678
|
14999 |
}
|
jtulach@678
|
15000 |
if (lowerCaseLiteralEqualsIgnoreAsciiCaseString('-//w3c//dtd xhtml 1.0 frameset//en', publicIdentifier)) {
|
jtulach@678
|
15001 |
return true;
|
jtulach@678
|
15002 |
}
|
jtulach@678
|
15003 |
if (systemIdentifier != null) {
|
jtulach@678
|
15004 |
if (lowerCaseLiteralEqualsIgnoreAsciiCaseString('-//w3c//dtd html 4.01 transitional//en', publicIdentifier)) {
|
jtulach@678
|
15005 |
return true;
|
jtulach@678
|
15006 |
}
|
jtulach@678
|
15007 |
if (lowerCaseLiteralEqualsIgnoreAsciiCaseString('-//w3c//dtd html 4.01 frameset//en', publicIdentifier)) {
|
jtulach@678
|
15008 |
return true;
|
jtulach@678
|
15009 |
}
|
jtulach@678
|
15010 |
}
|
jtulach@678
|
15011 |
return false;
|
jtulach@678
|
15012 |
}
|
jtulach@678
|
15013 |
|
jtulach@678
|
15014 |
function $isHtml4Doctype(publicIdentifier){
|
jtulach@678
|
15015 |
if (publicIdentifier != null && binarySearch_0(HTML4_PUBLIC_IDS, publicIdentifier, ($clinit_61() , NATURAL)) > -1) {
|
jtulach@678
|
15016 |
return true;
|
jtulach@678
|
15017 |
}
|
jtulach@678
|
15018 |
return false;
|
jtulach@678
|
15019 |
}
|
jtulach@678
|
15020 |
|
jtulach@678
|
15021 |
function $isInStack(this$static, node){
|
jtulach@678
|
15022 |
var i;
|
jtulach@678
|
15023 |
for (i = this$static.currentPtr; i >= 0; --i) {
|
jtulach@678
|
15024 |
if (this$static.stack[i] == node) {
|
jtulach@678
|
15025 |
return true;
|
jtulach@678
|
15026 |
}
|
jtulach@678
|
15027 |
}
|
jtulach@678
|
15028 |
return false;
|
jtulach@678
|
15029 |
}
|
jtulach@678
|
15030 |
|
jtulach@678
|
15031 |
function $isQuirky(name, publicIdentifier, systemIdentifier, forceQuirks){
|
jtulach@678
|
15032 |
var i;
|
jtulach@678
|
15033 |
if (forceQuirks) {
|
jtulach@678
|
15034 |
return true;
|
jtulach@678
|
15035 |
}
|
jtulach@678
|
15036 |
if (name != 'html') {
|
jtulach@678
|
15037 |
return true;
|
jtulach@678
|
15038 |
}
|
jtulach@678
|
15039 |
if (publicIdentifier != null) {
|
jtulach@678
|
15040 |
for (i = 0; i < QUIRKY_PUBLIC_IDS.length; ++i) {
|
jtulach@678
|
15041 |
if (lowerCaseLiteralIsPrefixOfIgnoreAsciiCaseString(QUIRKY_PUBLIC_IDS[i], publicIdentifier)) {
|
jtulach@678
|
15042 |
return true;
|
jtulach@678
|
15043 |
}
|
jtulach@678
|
15044 |
}
|
jtulach@678
|
15045 |
if (lowerCaseLiteralEqualsIgnoreAsciiCaseString('-//w3o//dtd w3 html strict 3.0//en//', publicIdentifier) || lowerCaseLiteralEqualsIgnoreAsciiCaseString('-/w3c/dtd html 4.0 transitional/en', publicIdentifier) || lowerCaseLiteralEqualsIgnoreAsciiCaseString('html', publicIdentifier)) {
|
jtulach@678
|
15046 |
return true;
|
jtulach@678
|
15047 |
}
|
jtulach@678
|
15048 |
}
|
jtulach@678
|
15049 |
if (systemIdentifier == null) {
|
jtulach@678
|
15050 |
if (lowerCaseLiteralEqualsIgnoreAsciiCaseString('-//w3c//dtd html 4.01 transitional//en', publicIdentifier)) {
|
jtulach@678
|
15051 |
return true;
|
jtulach@678
|
15052 |
}
|
jtulach@678
|
15053 |
else if (lowerCaseLiteralEqualsIgnoreAsciiCaseString('-//w3c//dtd html 4.01 frameset//en', publicIdentifier)) {
|
jtulach@678
|
15054 |
return true;
|
jtulach@678
|
15055 |
}
|
jtulach@678
|
15056 |
}
|
jtulach@678
|
15057 |
else if (lowerCaseLiteralEqualsIgnoreAsciiCaseString('http://www.ibm.com/data/dtd/v11/ibmxhtml1-transitional.dtd', systemIdentifier)) {
|
jtulach@678
|
15058 |
return true;
|
jtulach@678
|
15059 |
}
|
jtulach@678
|
15060 |
return false;
|
jtulach@678
|
15061 |
}
|
jtulach@678
|
15062 |
|
jtulach@678
|
15063 |
function $pop(this$static){
|
jtulach@678
|
15064 |
var node;
|
jtulach@678
|
15065 |
$flushCharacters(this$static);
|
jtulach@678
|
15066 |
node = this$static.stack[this$static.currentPtr];
|
jtulach@678
|
15067 |
--this$static.currentPtr;
|
jtulach@678
|
15068 |
$elementPopped(this$static, node.ns, node.popName, node.node);
|
jtulach@678
|
15069 |
--node.refcount;
|
jtulach@678
|
15070 |
}
|
jtulach@678
|
15071 |
|
jtulach@678
|
15072 |
function $popOnEof(this$static){
|
jtulach@678
|
15073 |
var node;
|
jtulach@678
|
15074 |
$flushCharacters(this$static);
|
jtulach@678
|
15075 |
node = this$static.stack[this$static.currentPtr];
|
jtulach@678
|
15076 |
--this$static.currentPtr;
|
jtulach@678
|
15077 |
$elementPopped(this$static, node.ns, node.popName, node.node);
|
jtulach@678
|
15078 |
--node.refcount;
|
jtulach@678
|
15079 |
}
|
jtulach@678
|
15080 |
|
jtulach@678
|
15081 |
function $push_0(this$static, node){
|
jtulach@678
|
15082 |
var newStack;
|
jtulach@678
|
15083 |
++this$static.currentPtr;
|
jtulach@678
|
15084 |
if (this$static.currentPtr == this$static.stack.length) {
|
jtulach@678
|
15085 |
newStack = initDim(_3Lnu_validator_htmlparser_impl_StackNode_2_classLit, 51, 11, this$static.stack.length + 64, 0);
|
jtulach@678
|
15086 |
arraycopy(this$static.stack, 0, newStack, 0, this$static.stack.length);
|
jtulach@678
|
15087 |
this$static.stack = newStack;
|
jtulach@678
|
15088 |
}
|
jtulach@678
|
15089 |
this$static.stack[this$static.currentPtr] = node;
|
jtulach@678
|
15090 |
}
|
jtulach@678
|
15091 |
|
jtulach@678
|
15092 |
function $pushHeadPointerOntoStack(this$static){
|
jtulach@678
|
15093 |
$flushCharacters(this$static);
|
jtulach@678
|
15094 |
if (!this$static.headPointer) {
|
jtulach@678
|
15095 |
$push_0(this$static, this$static.stack[this$static.currentPtr]);
|
jtulach@678
|
15096 |
}
|
jtulach@678
|
15097 |
else {
|
jtulach@678
|
15098 |
$push_0(this$static, $StackNode_0(new StackNode(), 'http://www.w3.org/1999/xhtml', ($clinit_89() , HEAD), this$static.headPointer));
|
jtulach@678
|
15099 |
}
|
jtulach@678
|
15100 |
}
|
jtulach@678
|
15101 |
|
jtulach@678
|
15102 |
function $reconstructTheActiveFormattingElements(this$static){
|
jtulach@678
|
15103 |
var clone, currentNode, entry, entryClone, entryPos, mostRecent;
|
jtulach@678
|
15104 |
if (this$static.listPtr == -1) {
|
jtulach@678
|
15105 |
return;
|
jtulach@678
|
15106 |
}
|
jtulach@678
|
15107 |
mostRecent = this$static.listOfActiveFormattingElements[this$static.listPtr];
|
jtulach@678
|
15108 |
if (!mostRecent || $isInStack(this$static, mostRecent)) {
|
jtulach@678
|
15109 |
return;
|
jtulach@678
|
15110 |
}
|
jtulach@678
|
15111 |
entryPos = this$static.listPtr;
|
jtulach@678
|
15112 |
for (;;) {
|
jtulach@678
|
15113 |
--entryPos;
|
jtulach@678
|
15114 |
if (entryPos == -1) {
|
jtulach@678
|
15115 |
break;
|
jtulach@678
|
15116 |
}
|
jtulach@678
|
15117 |
if (!this$static.listOfActiveFormattingElements[entryPos]) {
|
jtulach@678
|
15118 |
break;
|
jtulach@678
|
15119 |
}
|
jtulach@678
|
15120 |
if ($isInStack(this$static, this$static.listOfActiveFormattingElements[entryPos])) {
|
jtulach@678
|
15121 |
break;
|
jtulach@678
|
15122 |
}
|
jtulach@678
|
15123 |
}
|
jtulach@678
|
15124 |
if (entryPos < this$static.listPtr) {
|
jtulach@678
|
15125 |
$flushCharacters(this$static);
|
jtulach@678
|
15126 |
}
|
jtulach@678
|
15127 |
while (entryPos < this$static.listPtr) {
|
jtulach@678
|
15128 |
++entryPos;
|
jtulach@678
|
15129 |
entry = this$static.listOfActiveFormattingElements[entryPos];
|
jtulach@678
|
15130 |
clone = $createElement(this$static, 'http://www.w3.org/1999/xhtml', entry.name_0, $cloneAttributes(entry.attributes));
|
jtulach@678
|
15131 |
entryClone = $StackNode(new StackNode(), entry.group, entry.ns, entry.name_0, clone, entry.scoping, entry.special, entry.fosterParenting, entry.popName, entry.attributes);
|
jtulach@678
|
15132 |
entry.attributes = null;
|
jtulach@678
|
15133 |
currentNode = this$static.stack[this$static.currentPtr];
|
jtulach@678
|
15134 |
if (currentNode.fosterParenting) {
|
jtulach@678
|
15135 |
$insertIntoFosterParent(this$static, clone);
|
jtulach@678
|
15136 |
}
|
jtulach@678
|
15137 |
else {
|
jtulach@678
|
15138 |
$appendElement(this$static, clone, currentNode.node);
|
jtulach@678
|
15139 |
}
|
jtulach@678
|
15140 |
$push_0(this$static, entryClone);
|
jtulach@678
|
15141 |
this$static.listOfActiveFormattingElements[entryPos] = entryClone;
|
jtulach@678
|
15142 |
--entry.refcount;
|
jtulach@678
|
15143 |
++entryClone.refcount;
|
jtulach@678
|
15144 |
}
|
jtulach@678
|
15145 |
}
|
jtulach@678
|
15146 |
|
jtulach@678
|
15147 |
function $removeFromListOfActiveFormattingElements(this$static, pos){
|
jtulach@678
|
15148 |
--this$static.listOfActiveFormattingElements[pos].refcount;
|
jtulach@678
|
15149 |
if (pos == this$static.listPtr) {
|
jtulach@678
|
15150 |
--this$static.listPtr;
|
jtulach@678
|
15151 |
return;
|
jtulach@678
|
15152 |
}
|
jtulach@678
|
15153 |
arraycopy(this$static.listOfActiveFormattingElements, pos + 1, this$static.listOfActiveFormattingElements, pos, this$static.listPtr - pos);
|
jtulach@678
|
15154 |
--this$static.listPtr;
|
jtulach@678
|
15155 |
}
|
jtulach@678
|
15156 |
|
jtulach@678
|
15157 |
function $removeFromStack(this$static, pos){
|
jtulach@678
|
15158 |
if (this$static.currentPtr == pos) {
|
jtulach@678
|
15159 |
$pop(this$static);
|
jtulach@678
|
15160 |
}
|
jtulach@678
|
15161 |
else {
|
jtulach@678
|
15162 |
--this$static.stack[pos].refcount;
|
jtulach@678
|
15163 |
arraycopy(this$static.stack, pos + 1, this$static.stack, pos, this$static.currentPtr - pos);
|
jtulach@678
|
15164 |
--this$static.currentPtr;
|
jtulach@678
|
15165 |
}
|
jtulach@678
|
15166 |
}
|
jtulach@678
|
15167 |
|
jtulach@678
|
15168 |
function $removeFromStack_0(this$static, node){
|
jtulach@678
|
15169 |
var pos;
|
jtulach@678
|
15170 |
if (this$static.stack[this$static.currentPtr] == node) {
|
jtulach@678
|
15171 |
$pop(this$static);
|
jtulach@678
|
15172 |
}
|
jtulach@678
|
15173 |
else {
|
jtulach@678
|
15174 |
pos = this$static.currentPtr - 1;
|
jtulach@678
|
15175 |
while (pos >= 0 && this$static.stack[pos] != node) {
|
jtulach@678
|
15176 |
--pos;
|
jtulach@678
|
15177 |
}
|
jtulach@678
|
15178 |
if (pos == -1) {
|
jtulach@678
|
15179 |
return;
|
jtulach@678
|
15180 |
}
|
jtulach@678
|
15181 |
--node.refcount;
|
jtulach@678
|
15182 |
arraycopy(this$static.stack, pos + 1, this$static.stack, pos, this$static.currentPtr - pos);
|
jtulach@678
|
15183 |
--this$static.currentPtr;
|
jtulach@678
|
15184 |
}
|
jtulach@678
|
15185 |
}
|
jtulach@678
|
15186 |
|
jtulach@678
|
15187 |
function $resetTheInsertionMode(this$static){
|
jtulach@678
|
15188 |
var i, name, node;
|
jtulach@678
|
15189 |
this$static.foreignFlag = 1;
|
jtulach@678
|
15190 |
for (i = this$static.currentPtr; i >= 0; --i) {
|
jtulach@678
|
15191 |
node = this$static.stack[i];
|
jtulach@678
|
15192 |
name = node.name_0;
|
jtulach@678
|
15193 |
if (i == 0) {
|
jtulach@678
|
15194 |
if (this$static.contextNamespace == 'http://www.w3.org/1999/xhtml' && (this$static.contextName == 'td' || this$static.contextName == 'th')) {
|
jtulach@678
|
15195 |
this$static.mode = 6;
|
jtulach@678
|
15196 |
return;
|
jtulach@678
|
15197 |
}
|
jtulach@678
|
15198 |
else {
|
jtulach@678
|
15199 |
name = this$static.contextName;
|
jtulach@678
|
15200 |
}
|
jtulach@678
|
15201 |
}
|
jtulach@678
|
15202 |
if ('select' == name) {
|
jtulach@678
|
15203 |
this$static.mode = 13;
|
jtulach@678
|
15204 |
return;
|
jtulach@678
|
15205 |
}
|
jtulach@678
|
15206 |
else if ('td' == name || 'th' == name) {
|
jtulach@678
|
15207 |
this$static.mode = 12;
|
jtulach@678
|
15208 |
return;
|
jtulach@678
|
15209 |
}
|
jtulach@678
|
15210 |
else if ('tr' == name) {
|
jtulach@678
|
15211 |
this$static.mode = 11;
|
jtulach@678
|
15212 |
return;
|
jtulach@678
|
15213 |
}
|
jtulach@678
|
15214 |
else if ('tbody' == name || 'thead' == name || 'tfoot' == name) {
|
jtulach@678
|
15215 |
this$static.mode = 10;
|
jtulach@678
|
15216 |
return;
|
jtulach@678
|
15217 |
}
|
jtulach@678
|
15218 |
else if ('caption' == name) {
|
jtulach@678
|
15219 |
this$static.mode = 8;
|
jtulach@678
|
15220 |
return;
|
jtulach@678
|
15221 |
}
|
jtulach@678
|
15222 |
else if ('colgroup' == name) {
|
jtulach@678
|
15223 |
this$static.mode = 9;
|
jtulach@678
|
15224 |
return;
|
jtulach@678
|
15225 |
}
|
jtulach@678
|
15226 |
else if ('table' == name) {
|
jtulach@678
|
15227 |
this$static.mode = 7;
|
jtulach@678
|
15228 |
return;
|
jtulach@678
|
15229 |
}
|
jtulach@678
|
15230 |
else if ('http://www.w3.org/1999/xhtml' != node.ns) {
|
jtulach@678
|
15231 |
this$static.foreignFlag = 0;
|
jtulach@678
|
15232 |
this$static.mode = 6;
|
jtulach@678
|
15233 |
return;
|
jtulach@678
|
15234 |
}
|
jtulach@678
|
15235 |
else if ('head' == name) {
|
jtulach@678
|
15236 |
this$static.mode = 6;
|
jtulach@678
|
15237 |
return;
|
jtulach@678
|
15238 |
}
|
jtulach@678
|
15239 |
else if ('body' == name) {
|
jtulach@678
|
15240 |
this$static.mode = 6;
|
jtulach@678
|
15241 |
return;
|
jtulach@678
|
15242 |
}
|
jtulach@678
|
15243 |
else if ('frameset' == name) {
|
jtulach@678
|
15244 |
this$static.mode = 16;
|
jtulach@678
|
15245 |
return;
|
jtulach@678
|
15246 |
}
|
jtulach@678
|
15247 |
else if ('html' == name) {
|
jtulach@678
|
15248 |
if (!this$static.headPointer) {
|
jtulach@678
|
15249 |
this$static.mode = 2;
|
jtulach@678
|
15250 |
}
|
jtulach@678
|
15251 |
else {
|
jtulach@678
|
15252 |
this$static.mode = 5;
|
jtulach@678
|
15253 |
}
|
jtulach@678
|
15254 |
return;
|
jtulach@678
|
15255 |
}
|
jtulach@678
|
15256 |
else if (i == 0) {
|
jtulach@678
|
15257 |
this$static.mode = 6;
|
jtulach@678
|
15258 |
return;
|
jtulach@678
|
15259 |
}
|
jtulach@678
|
15260 |
}
|
jtulach@678
|
15261 |
}
|
jtulach@678
|
15262 |
|
jtulach@678
|
15263 |
function $setFragmentContext(this$static, context){
|
jtulach@678
|
15264 |
this$static.contextName = context;
|
jtulach@678
|
15265 |
this$static.contextNamespace = 'http://www.w3.org/1999/xhtml';
|
jtulach@678
|
15266 |
this$static.fragment = false;
|
jtulach@678
|
15267 |
this$static.quirks = false;
|
jtulach@678
|
15268 |
}
|
jtulach@678
|
15269 |
|
jtulach@678
|
15270 |
function $startTag(this$static, elementName, attributes, selfClosing){
|
jtulach@678
|
15271 |
var actionIndex, activeA, activeAPos, attributeQName, currGroup, currNs, currentNode, eltPos, formAttrs, group, i, inputAttributes, name, needsPostProcessing, node, prompt, promptIndex, current, elt_53;
|
jtulach@678
|
15272 |
this$static.needToDropLF = false;
|
jtulach@678
|
15273 |
needsPostProcessing = false;
|
jtulach@678
|
15274 |
starttagloop: for (;;) {
|
jtulach@678
|
15275 |
group = elementName.group;
|
jtulach@678
|
15276 |
name = elementName.name_0;
|
jtulach@678
|
15277 |
switch (this$static.foreignFlag) {
|
jtulach@678
|
15278 |
case 0:
|
jtulach@678
|
15279 |
currentNode = this$static.stack[this$static.currentPtr];
|
jtulach@678
|
15280 |
currNs = currentNode.ns;
|
jtulach@678
|
15281 |
currGroup = currentNode.group;
|
jtulach@678
|
15282 |
if ('http://www.w3.org/1999/xhtml' == currNs || 'http://www.w3.org/1998/Math/MathML' == currNs && (56 != group && 57 == currGroup || 19 == group && 58 == currGroup) || 'http://www.w3.org/2000/svg' == currNs && (36 == currGroup || 59 == currGroup)) {
|
jtulach@678
|
15283 |
needsPostProcessing = true;
|
jtulach@678
|
15284 |
}
|
jtulach@678
|
15285 |
else {
|
jtulach@678
|
15286 |
switch (group) {
|
jtulach@678
|
15287 |
case 45:
|
jtulach@678
|
15288 |
case 50:
|
jtulach@678
|
15289 |
case 3:
|
jtulach@678
|
15290 |
case 4:
|
jtulach@678
|
15291 |
case 52:
|
jtulach@678
|
15292 |
case 41:
|
jtulach@678
|
15293 |
case 46:
|
jtulach@678
|
15294 |
case 48:
|
jtulach@678
|
15295 |
case 42:
|
jtulach@678
|
15296 |
case 20:
|
jtulach@678
|
15297 |
case 22:
|
jtulach@678
|
15298 |
case 15:
|
jtulach@678
|
15299 |
case 18:
|
jtulach@678
|
15300 |
case 24:
|
jtulach@678
|
15301 |
case 29:
|
jtulach@678
|
15302 |
case 44:
|
jtulach@678
|
15303 |
case 34:
|
jtulach@678
|
15304 |
while (this$static.stack[this$static.currentPtr].ns != 'http://www.w3.org/1999/xhtml') {
|
jtulach@678
|
15305 |
$pop(this$static);
|
jtulach@678
|
15306 |
}
|
jtulach@678
|
15307 |
|
jtulach@678
|
15308 |
this$static.foreignFlag = 1;
|
jtulach@678
|
15309 |
continue starttagloop;
|
jtulach@678
|
15310 |
case 64:
|
jtulach@678
|
15311 |
if ($contains(attributes, ($clinit_87() , COLOR)) || $contains(attributes, FACE) || $contains(attributes, SIZE)) {
|
jtulach@678
|
15312 |
while (this$static.stack[this$static.currentPtr].ns != 'http://www.w3.org/1999/xhtml') {
|
jtulach@678
|
15313 |
$pop(this$static);
|
jtulach@678
|
15314 |
}
|
jtulach@678
|
15315 |
this$static.foreignFlag = 1;
|
jtulach@678
|
15316 |
continue starttagloop;
|
jtulach@678
|
15317 |
}
|
jtulach@678
|
15318 |
|
jtulach@678
|
15319 |
default:if ('http://www.w3.org/2000/svg' == currNs) {
|
jtulach@678
|
15320 |
attributes.mode = 2;
|
jtulach@678
|
15321 |
if (selfClosing) {
|
jtulach@678
|
15322 |
$appendVoidElementToCurrentMayFosterCamelCase(this$static, currNs, elementName, attributes);
|
jtulach@678
|
15323 |
selfClosing = false;
|
jtulach@678
|
15324 |
}
|
jtulach@678
|
15325 |
else {
|
jtulach@678
|
15326 |
$appendToCurrentNodeAndPushElementMayFosterCamelCase(this$static, currNs, elementName, attributes);
|
jtulach@678
|
15327 |
}
|
jtulach@678
|
15328 |
attributes = null;
|
jtulach@678
|
15329 |
break starttagloop;
|
jtulach@678
|
15330 |
}
|
jtulach@678
|
15331 |
else {
|
jtulach@678
|
15332 |
attributes.mode = 1;
|
jtulach@678
|
15333 |
if (selfClosing) {
|
jtulach@678
|
15334 |
$appendVoidElementToCurrentMayFoster_0(this$static, currNs, elementName, attributes);
|
jtulach@678
|
15335 |
selfClosing = false;
|
jtulach@678
|
15336 |
}
|
jtulach@678
|
15337 |
else {
|
jtulach@678
|
15338 |
$appendToCurrentNodeAndPushElementMayFosterNoScoping(this$static, currNs, elementName, attributes);
|
jtulach@678
|
15339 |
}
|
jtulach@678
|
15340 |
attributes = null;
|
jtulach@678
|
15341 |
break starttagloop;
|
jtulach@678
|
15342 |
}
|
jtulach@678
|
15343 |
|
jtulach@678
|
15344 |
}
|
jtulach@678
|
15345 |
}
|
jtulach@678
|
15346 |
|
jtulach@678
|
15347 |
default:switch (this$static.mode) {
|
jtulach@678
|
15348 |
case 10:
|
jtulach@678
|
15349 |
switch (group) {
|
jtulach@678
|
15350 |
case 37:
|
jtulach@678
|
15351 |
$clearStackBackTo(this$static, $findLastInTableScopeOrRootTbodyTheadTfoot(this$static));
|
jtulach@678
|
15352 |
$appendToCurrentNodeAndPushElement(this$static, 'http://www.w3.org/1999/xhtml', elementName, attributes);
|
jtulach@678
|
15353 |
this$static.mode = 11;
|
jtulach@678
|
15354 |
attributes = null;
|
jtulach@678
|
15355 |
break starttagloop;
|
jtulach@678
|
15356 |
case 40:
|
jtulach@678
|
15357 |
$clearStackBackTo(this$static, $findLastInTableScopeOrRootTbodyTheadTfoot(this$static));
|
jtulach@678
|
15358 |
$appendToCurrentNodeAndPushElement(this$static, 'http://www.w3.org/1999/xhtml', ($clinit_89() , TR), ($clinit_91() , EMPTY_ATTRIBUTES));
|
jtulach@678
|
15359 |
this$static.mode = 11;
|
jtulach@678
|
15360 |
continue;
|
jtulach@678
|
15361 |
case 6:
|
jtulach@678
|
15362 |
case 7:
|
jtulach@678
|
15363 |
case 8:
|
jtulach@678
|
15364 |
case 39:
|
jtulach@678
|
15365 |
eltPos = $findLastInTableScopeOrRootTbodyTheadTfoot(this$static);
|
jtulach@678
|
15366 |
if (eltPos == 0) {
|
jtulach@678
|
15367 |
break starttagloop;
|
jtulach@678
|
15368 |
}
|
jtulach@678
|
15369 |
else {
|
jtulach@678
|
15370 |
$clearStackBackTo(this$static, eltPos);
|
jtulach@678
|
15371 |
$pop(this$static);
|
jtulach@678
|
15372 |
this$static.mode = 7;
|
jtulach@678
|
15373 |
continue;
|
jtulach@678
|
15374 |
}
|
jtulach@678
|
15375 |
|
jtulach@678
|
15376 |
}
|
jtulach@678
|
15377 |
|
jtulach@678
|
15378 |
case 11:
|
jtulach@678
|
15379 |
switch (group) {
|
jtulach@678
|
15380 |
case 40:
|
jtulach@678
|
15381 |
$clearStackBackTo(this$static, $findLastOrRoot(this$static, 37));
|
jtulach@678
|
15382 |
$appendToCurrentNodeAndPushElement(this$static, 'http://www.w3.org/1999/xhtml', elementName, attributes);
|
jtulach@678
|
15383 |
this$static.mode = 12;
|
jtulach@678
|
15384 |
$append_1(this$static, null);
|
jtulach@678
|
15385 |
attributes = null;
|
jtulach@678
|
15386 |
break starttagloop;
|
jtulach@678
|
15387 |
case 6:
|
jtulach@678
|
15388 |
case 7:
|
jtulach@678
|
15389 |
case 8:
|
jtulach@678
|
15390 |
case 39:
|
jtulach@678
|
15391 |
case 37:
|
jtulach@678
|
15392 |
eltPos = $findLastOrRoot(this$static, 37);
|
jtulach@678
|
15393 |
if (eltPos == 0) {
|
jtulach@678
|
15394 |
break starttagloop;
|
jtulach@678
|
15395 |
}
|
jtulach@678
|
15396 |
|
jtulach@678
|
15397 |
$clearStackBackTo(this$static, eltPos);
|
jtulach@678
|
15398 |
$pop(this$static);
|
jtulach@678
|
15399 |
this$static.mode = 10;
|
jtulach@678
|
15400 |
continue;
|
jtulach@678
|
15401 |
}
|
jtulach@678
|
15402 |
|
jtulach@678
|
15403 |
case 7:
|
jtulach@678
|
15404 |
intableloop: for (;;) {
|
jtulach@678
|
15405 |
switch (group) {
|
jtulach@678
|
15406 |
case 6:
|
jtulach@678
|
15407 |
$clearStackBackTo(this$static, $findLastOrRoot(this$static, 34));
|
jtulach@678
|
15408 |
$append_1(this$static, null);
|
jtulach@678
|
15409 |
$appendToCurrentNodeAndPushElement(this$static, 'http://www.w3.org/1999/xhtml', elementName, attributes);
|
jtulach@678
|
15410 |
this$static.mode = 8;
|
jtulach@678
|
15411 |
attributes = null;
|
jtulach@678
|
15412 |
break starttagloop;
|
jtulach@678
|
15413 |
case 8:
|
jtulach@678
|
15414 |
$clearStackBackTo(this$static, $findLastOrRoot(this$static, 34));
|
jtulach@678
|
15415 |
$appendToCurrentNodeAndPushElement(this$static, 'http://www.w3.org/1999/xhtml', elementName, attributes);
|
jtulach@678
|
15416 |
this$static.mode = 9;
|
jtulach@678
|
15417 |
attributes = null;
|
jtulach@678
|
15418 |
break starttagloop;
|
jtulach@678
|
15419 |
case 7:
|
jtulach@678
|
15420 |
$clearStackBackTo(this$static, $findLastOrRoot(this$static, 34));
|
jtulach@678
|
15421 |
$appendToCurrentNodeAndPushElement(this$static, 'http://www.w3.org/1999/xhtml', ($clinit_89() , COLGROUP), ($clinit_91() , EMPTY_ATTRIBUTES));
|
jtulach@678
|
15422 |
this$static.mode = 9;
|
jtulach@678
|
15423 |
continue starttagloop;
|
jtulach@678
|
15424 |
case 39:
|
jtulach@678
|
15425 |
$clearStackBackTo(this$static, $findLastOrRoot(this$static, 34));
|
jtulach@678
|
15426 |
$appendToCurrentNodeAndPushElement(this$static, 'http://www.w3.org/1999/xhtml', elementName, attributes);
|
jtulach@678
|
15427 |
this$static.mode = 10;
|
jtulach@678
|
15428 |
attributes = null;
|
jtulach@678
|
15429 |
break starttagloop;
|
jtulach@678
|
15430 |
case 37:
|
jtulach@678
|
15431 |
case 40:
|
jtulach@678
|
15432 |
$clearStackBackTo(this$static, $findLastOrRoot(this$static, 34));
|
jtulach@678
|
15433 |
$appendToCurrentNodeAndPushElement(this$static, 'http://www.w3.org/1999/xhtml', ($clinit_89() , TBODY), ($clinit_91() , EMPTY_ATTRIBUTES));
|
jtulach@678
|
15434 |
this$static.mode = 10;
|
jtulach@678
|
15435 |
continue starttagloop;
|
jtulach@678
|
15436 |
case 34:
|
jtulach@678
|
15437 |
eltPos = $findLastInTableScope(this$static, name);
|
jtulach@678
|
15438 |
if (eltPos == 2147483647) {
|
jtulach@678
|
15439 |
break starttagloop;
|
jtulach@678
|
15440 |
}
|
jtulach@678
|
15441 |
|
jtulach@678
|
15442 |
$generateImpliedEndTags(this$static);
|
jtulach@678
|
15443 |
while (this$static.currentPtr >= eltPos) {
|
jtulach@678
|
15444 |
$pop(this$static);
|
jtulach@678
|
15445 |
}
|
jtulach@678
|
15446 |
|
jtulach@678
|
15447 |
$resetTheInsertionMode(this$static);
|
jtulach@678
|
15448 |
continue starttagloop;
|
jtulach@678
|
15449 |
case 31:
|
jtulach@678
|
15450 |
case 33:
|
jtulach@678
|
15451 |
$appendToCurrentNodeAndPushElement(this$static, 'http://www.w3.org/1999/xhtml', elementName, attributes);
|
jtulach@678
|
15452 |
this$static.originalMode = this$static.mode;
|
jtulach@678
|
15453 |
this$static.mode = 20;
|
jtulach@678
|
15454 |
$setContentModelFlag_0(this$static.tokenizer, 2, elementName);
|
jtulach@678
|
15455 |
attributes = null;
|
jtulach@678
|
15456 |
break starttagloop;
|
jtulach@678
|
15457 |
case 13:
|
jtulach@678
|
15458 |
if (!lowerCaseLiteralEqualsIgnoreAsciiCaseString('hidden', $getValue_0(attributes, ($clinit_87() , TYPE)))) {
|
jtulach@678
|
15459 |
break intableloop;
|
jtulach@678
|
15460 |
}
|
jtulach@678
|
15461 |
|
jtulach@678
|
15462 |
$flushCharacters(this$static);
|
jtulach@678
|
15463 |
$processNonNcNames(attributes, this$static, this$static.namePolicy);
|
jtulach@678
|
15464 |
elt_53 = $createElement_0(this$static, 'http://www.w3.org/1999/xhtml', name, attributes);
|
jtulach@678
|
15465 |
current = this$static.stack[this$static.currentPtr];
|
jtulach@678
|
15466 |
$appendElement(this$static, elt_53, current.node);
|
jtulach@678
|
15467 |
$elementPopped(this$static, 'http://www.w3.org/1999/xhtml', name, elt_53);
|
jtulach@678
|
15468 |
selfClosing = false;
|
jtulach@678
|
15469 |
attributes = null;
|
jtulach@678
|
15470 |
break starttagloop;
|
jtulach@678
|
15471 |
default:break intableloop;
|
jtulach@678
|
15472 |
}
|
jtulach@678
|
15473 |
}
|
jtulach@678
|
15474 |
|
jtulach@678
|
15475 |
case 8:
|
jtulach@678
|
15476 |
switch (group) {
|
jtulach@678
|
15477 |
case 6:
|
jtulach@678
|
15478 |
case 7:
|
jtulach@678
|
15479 |
case 8:
|
jtulach@678
|
15480 |
case 39:
|
jtulach@678
|
15481 |
case 37:
|
jtulach@678
|
15482 |
case 40:
|
jtulach@678
|
15483 |
eltPos = $findLastInTableScope(this$static, 'caption');
|
jtulach@678
|
15484 |
if (eltPos == 2147483647) {
|
jtulach@678
|
15485 |
break starttagloop;
|
jtulach@678
|
15486 |
}
|
jtulach@678
|
15487 |
|
jtulach@678
|
15488 |
$generateImpliedEndTags(this$static);
|
jtulach@678
|
15489 |
while (this$static.currentPtr >= eltPos) {
|
jtulach@678
|
15490 |
$pop(this$static);
|
jtulach@678
|
15491 |
}
|
jtulach@678
|
15492 |
|
jtulach@678
|
15493 |
$clearTheListOfActiveFormattingElementsUpToTheLastMarker(this$static);
|
jtulach@678
|
15494 |
this$static.mode = 7;
|
jtulach@678
|
15495 |
continue;
|
jtulach@678
|
15496 |
}
|
jtulach@678
|
15497 |
|
jtulach@678
|
15498 |
case 12:
|
jtulach@678
|
15499 |
switch (group) {
|
jtulach@678
|
15500 |
case 6:
|
jtulach@678
|
15501 |
case 7:
|
jtulach@678
|
15502 |
case 8:
|
jtulach@678
|
15503 |
case 39:
|
jtulach@678
|
15504 |
case 37:
|
jtulach@678
|
15505 |
case 40:
|
jtulach@678
|
15506 |
eltPos = $findLastInTableScopeTdTh(this$static);
|
jtulach@678
|
15507 |
if (eltPos == 2147483647) {
|
jtulach@678
|
15508 |
break starttagloop;
|
jtulach@678
|
15509 |
}
|
jtulach@678
|
15510 |
else {
|
jtulach@678
|
15511 |
$closeTheCell(this$static, eltPos);
|
jtulach@678
|
15512 |
continue;
|
jtulach@678
|
15513 |
}
|
jtulach@678
|
15514 |
|
jtulach@678
|
15515 |
}
|
jtulach@678
|
15516 |
|
jtulach@678
|
15517 |
case 21:
|
jtulach@678
|
15518 |
switch (group) {
|
jtulach@678
|
15519 |
case 11:
|
jtulach@678
|
15520 |
if (this$static.mode == 21) {
|
jtulach@678
|
15521 |
if (this$static.currentPtr == 0 || this$static.stack[1].group != 3) {
|
jtulach@678
|
15522 |
break starttagloop;
|
jtulach@678
|
15523 |
}
|
jtulach@678
|
15524 |
else {
|
jtulach@678
|
15525 |
$detachFromParent(this$static, this$static.stack[1].node);
|
jtulach@678
|
15526 |
while (this$static.currentPtr > 0) {
|
jtulach@678
|
15527 |
$pop(this$static);
|
jtulach@678
|
15528 |
}
|
jtulach@678
|
15529 |
$appendToCurrentNodeAndPushElement(this$static, 'http://www.w3.org/1999/xhtml', elementName, attributes);
|
jtulach@678
|
15530 |
this$static.mode = 16;
|
jtulach@678
|
15531 |
attributes = null;
|
jtulach@678
|
15532 |
break starttagloop;
|
jtulach@678
|
15533 |
}
|
jtulach@678
|
15534 |
}
|
jtulach@678
|
15535 |
else {
|
jtulach@678
|
15536 |
break starttagloop;
|
jtulach@678
|
15537 |
}
|
jtulach@678
|
15538 |
|
jtulach@678
|
15539 |
case 44:
|
jtulach@678
|
15540 |
case 15:
|
jtulach@678
|
15541 |
case 41:
|
jtulach@678
|
15542 |
case 5:
|
jtulach@678
|
15543 |
case 43:
|
jtulach@678
|
15544 |
case 63:
|
jtulach@678
|
15545 |
case 34:
|
jtulach@678
|
15546 |
case 49:
|
jtulach@678
|
15547 |
case 4:
|
jtulach@678
|
15548 |
case 48:
|
jtulach@678
|
15549 |
case 13:
|
jtulach@678
|
15550 |
case 65:
|
jtulach@678
|
15551 |
case 22:
|
jtulach@678
|
15552 |
case 35:
|
jtulach@678
|
15553 |
case 38:
|
jtulach@678
|
15554 |
case 47:
|
jtulach@678
|
15555 |
case 32:
|
jtulach@678
|
15556 |
if (this$static.mode == 21) {
|
jtulach@678
|
15557 |
this$static.mode = 6;
|
jtulach@678
|
15558 |
}
|
jtulach@678
|
15559 |
|
jtulach@678
|
15560 |
}
|
jtulach@678
|
15561 |
|
jtulach@678
|
15562 |
case 6:
|
jtulach@678
|
15563 |
inbodyloop: for (;;) {
|
jtulach@678
|
15564 |
switch (group) {
|
jtulach@678
|
15565 |
case 23:
|
jtulach@678
|
15566 |
$processNonNcNames(attributes, this$static, this$static.namePolicy);
|
jtulach@678
|
15567 |
$addAttributesToElement(this$static, this$static.stack[0].node, attributes);
|
jtulach@678
|
15568 |
attributes = null;
|
jtulach@678
|
15569 |
break starttagloop;
|
jtulach@678
|
15570 |
case 2:
|
jtulach@678
|
15571 |
case 16:
|
jtulach@678
|
15572 |
case 18:
|
jtulach@678
|
15573 |
case 33:
|
jtulach@678
|
15574 |
case 31:
|
jtulach@678
|
15575 |
case 36:
|
jtulach@678
|
15576 |
case 54:
|
jtulach@678
|
15577 |
break inbodyloop;
|
jtulach@678
|
15578 |
case 3:
|
jtulach@678
|
15579 |
$addAttributesToBody(this$static, attributes);
|
jtulach@678
|
15580 |
attributes = null;
|
jtulach@678
|
15581 |
break starttagloop;
|
jtulach@678
|
15582 |
case 29:
|
jtulach@678
|
15583 |
case 50:
|
jtulach@678
|
15584 |
case 46:
|
jtulach@678
|
15585 |
case 51:
|
jtulach@678
|
15586 |
$implicitlyCloseP(this$static);
|
jtulach@678
|
15587 |
$appendToCurrentNodeAndPushElementMayFoster(this$static, 'http://www.w3.org/1999/xhtml', elementName, attributes);
|
jtulach@678
|
15588 |
attributes = null;
|
jtulach@678
|
15589 |
break starttagloop;
|
jtulach@678
|
15590 |
case 42:
|
jtulach@678
|
15591 |
$implicitlyCloseP(this$static);
|
jtulach@678
|
15592 |
if (this$static.stack[this$static.currentPtr].group == 42) {
|
jtulach@678
|
15593 |
$pop(this$static);
|
jtulach@678
|
15594 |
}
|
jtulach@678
|
15595 |
|
jtulach@678
|
15596 |
$appendToCurrentNodeAndPushElementMayFoster(this$static, 'http://www.w3.org/1999/xhtml', elementName, attributes);
|
jtulach@678
|
15597 |
attributes = null;
|
jtulach@678
|
15598 |
break starttagloop;
|
jtulach@678
|
15599 |
case 61:
|
jtulach@678
|
15600 |
$implicitlyCloseP(this$static);
|
jtulach@678
|
15601 |
$appendToCurrentNodeAndPushElementMayFoster_0(this$static, 'http://www.w3.org/1999/xhtml', elementName, attributes);
|
jtulach@678
|
15602 |
attributes = null;
|
jtulach@678
|
15603 |
break starttagloop;
|
jtulach@678
|
15604 |
case 44:
|
jtulach@678
|
15605 |
$implicitlyCloseP(this$static);
|
jtulach@678
|
15606 |
$appendToCurrentNodeAndPushElementMayFoster(this$static, 'http://www.w3.org/1999/xhtml', elementName, attributes);
|
jtulach@678
|
15607 |
this$static.needToDropLF = true;
|
jtulach@678
|
15608 |
attributes = null;
|
jtulach@678
|
15609 |
break starttagloop;
|
jtulach@678
|
15610 |
case 9:
|
jtulach@678
|
15611 |
if (this$static.formPointer) {
|
jtulach@678
|
15612 |
break starttagloop;
|
jtulach@678
|
15613 |
}
|
jtulach@678
|
15614 |
else {
|
jtulach@678
|
15615 |
$implicitlyCloseP(this$static);
|
jtulach@678
|
15616 |
$appendToCurrentNodeAndPushFormElementMayFoster(this$static, attributes);
|
jtulach@678
|
15617 |
attributes = null;
|
jtulach@678
|
15618 |
break starttagloop;
|
jtulach@678
|
15619 |
}
|
jtulach@678
|
15620 |
|
jtulach@678
|
15621 |
case 15:
|
jtulach@678
|
15622 |
case 41:
|
jtulach@678
|
15623 |
eltPos = this$static.currentPtr;
|
jtulach@678
|
15624 |
for (;;) {
|
jtulach@678
|
15625 |
node = this$static.stack[eltPos];
|
jtulach@678
|
15626 |
if (node.group == group) {
|
jtulach@678
|
15627 |
$generateImpliedEndTagsExceptFor(this$static, node.name_0);
|
jtulach@678
|
15628 |
while (this$static.currentPtr >= eltPos) {
|
jtulach@678
|
15629 |
$pop(this$static);
|
jtulach@678
|
15630 |
}
|
jtulach@678
|
15631 |
break;
|
jtulach@678
|
15632 |
}
|
jtulach@678
|
15633 |
else if (node.scoping || node.special && node.name_0 != 'p' && node.name_0 != 'address' && node.name_0 != 'div') {
|
jtulach@678
|
15634 |
break;
|
jtulach@678
|
15635 |
}
|
jtulach@678
|
15636 |
--eltPos;
|
jtulach@678
|
15637 |
}
|
jtulach@678
|
15638 |
|
jtulach@678
|
15639 |
$implicitlyCloseP(this$static);
|
jtulach@678
|
15640 |
$appendToCurrentNodeAndPushElementMayFoster(this$static, 'http://www.w3.org/1999/xhtml', elementName, attributes);
|
jtulach@678
|
15641 |
attributes = null;
|
jtulach@678
|
15642 |
break starttagloop;
|
jtulach@678
|
15643 |
case 30:
|
jtulach@678
|
15644 |
$implicitlyCloseP(this$static);
|
jtulach@678
|
15645 |
$appendToCurrentNodeAndPushElementMayFoster(this$static, 'http://www.w3.org/1999/xhtml', elementName, attributes);
|
jtulach@678
|
15646 |
$setContentModelFlag_0(this$static.tokenizer, 3, elementName);
|
jtulach@678
|
15647 |
attributes = null;
|
jtulach@678
|
15648 |
break starttagloop;
|
jtulach@678
|
15649 |
case 1:
|
jtulach@678
|
15650 |
activeAPos = $findInListOfActiveFormattingElementsContainsBetweenEndAndLastMarker(this$static, 'a');
|
jtulach@678
|
15651 |
if (activeAPos != -1) {
|
jtulach@678
|
15652 |
activeA = this$static.listOfActiveFormattingElements[activeAPos];
|
jtulach@678
|
15653 |
++activeA.refcount;
|
jtulach@678
|
15654 |
$adoptionAgencyEndTag(this$static, 'a');
|
jtulach@678
|
15655 |
$removeFromStack_0(this$static, activeA);
|
jtulach@678
|
15656 |
activeAPos = $findInListOfActiveFormattingElements(this$static, activeA);
|
jtulach@678
|
15657 |
if (activeAPos != -1) {
|
jtulach@678
|
15658 |
$removeFromListOfActiveFormattingElements(this$static, activeAPos);
|
jtulach@678
|
15659 |
}
|
jtulach@678
|
15660 |
--activeA.refcount;
|
jtulach@678
|
15661 |
}
|
jtulach@678
|
15662 |
|
jtulach@678
|
15663 |
$reconstructTheActiveFormattingElements(this$static);
|
jtulach@678
|
15664 |
$appendToCurrentNodeAndPushFormattingElementMayFoster(this$static, 'http://www.w3.org/1999/xhtml', elementName, attributes);
|
jtulach@678
|
15665 |
attributes = null;
|
jtulach@678
|
15666 |
break starttagloop;
|
jtulach@678
|
15667 |
case 45:
|
jtulach@678
|
15668 |
case 64:
|
jtulach@678
|
15669 |
$reconstructTheActiveFormattingElements(this$static);
|
jtulach@678
|
15670 |
$appendToCurrentNodeAndPushFormattingElementMayFoster(this$static, 'http://www.w3.org/1999/xhtml', elementName, attributes);
|
jtulach@678
|
15671 |
attributes = null;
|
jtulach@678
|
15672 |
break starttagloop;
|
jtulach@678
|
15673 |
case 24:
|
jtulach@678
|
15674 |
$reconstructTheActiveFormattingElements(this$static);
|
jtulach@678
|
15675 |
if (2147483647 != $findLastInScope(this$static, 'nobr')) {
|
jtulach@678
|
15676 |
$adoptionAgencyEndTag(this$static, 'nobr');
|
jtulach@678
|
15677 |
}
|
jtulach@678
|
15678 |
|
jtulach@678
|
15679 |
$appendToCurrentNodeAndPushFormattingElementMayFoster(this$static, 'http://www.w3.org/1999/xhtml', elementName, attributes);
|
jtulach@678
|
15680 |
attributes = null;
|
jtulach@678
|
15681 |
break starttagloop;
|
jtulach@678
|
15682 |
case 5:
|
jtulach@678
|
15683 |
eltPos = $findLastInScope(this$static, name);
|
jtulach@678
|
15684 |
if (eltPos != 2147483647) {
|
jtulach@678
|
15685 |
$generateImpliedEndTags(this$static);
|
jtulach@678
|
15686 |
while (this$static.currentPtr >= eltPos) {
|
jtulach@678
|
15687 |
$pop(this$static);
|
jtulach@678
|
15688 |
}
|
jtulach@678
|
15689 |
$clearTheListOfActiveFormattingElementsUpToTheLastMarker(this$static);
|
jtulach@678
|
15690 |
continue starttagloop;
|
jtulach@678
|
15691 |
}
|
jtulach@678
|
15692 |
else {
|
jtulach@678
|
15693 |
$reconstructTheActiveFormattingElements(this$static);
|
jtulach@678
|
15694 |
$appendToCurrentNodeAndPushElementMayFoster_0(this$static, 'http://www.w3.org/1999/xhtml', elementName, attributes);
|
jtulach@678
|
15695 |
$append_1(this$static, null);
|
jtulach@678
|
15696 |
attributes = null;
|
jtulach@678
|
15697 |
break starttagloop;
|
jtulach@678
|
15698 |
}
|
jtulach@678
|
15699 |
|
jtulach@678
|
15700 |
case 63:
|
jtulach@678
|
15701 |
$reconstructTheActiveFormattingElements(this$static);
|
jtulach@678
|
15702 |
$appendToCurrentNodeAndPushElementMayFoster_0(this$static, 'http://www.w3.org/1999/xhtml', elementName, attributes);
|
jtulach@678
|
15703 |
$append_1(this$static, null);
|
jtulach@678
|
15704 |
attributes = null;
|
jtulach@678
|
15705 |
break starttagloop;
|
jtulach@678
|
15706 |
case 43:
|
jtulach@678
|
15707 |
$reconstructTheActiveFormattingElements(this$static);
|
jtulach@678
|
15708 |
$appendToCurrentNodeAndPushElementMayFoster(this$static, 'http://www.w3.org/1999/xhtml', elementName, attributes);
|
jtulach@678
|
15709 |
$append_1(this$static, null);
|
jtulach@678
|
15710 |
attributes = null;
|
jtulach@678
|
15711 |
break starttagloop;
|
jtulach@678
|
15712 |
case 38:
|
jtulach@678
|
15713 |
$reconstructTheActiveFormattingElements(this$static);
|
jtulach@678
|
15714 |
$appendToCurrentNodeAndPushElementMayFoster(this$static, 'http://www.w3.org/1999/xhtml', elementName, attributes);
|
jtulach@678
|
15715 |
this$static.originalMode = this$static.mode;
|
jtulach@678
|
15716 |
this$static.mode = 20;
|
jtulach@678
|
15717 |
$setContentModelFlag_0(this$static.tokenizer, 2, elementName);
|
jtulach@678
|
15718 |
attributes = null;
|
jtulach@678
|
15719 |
break starttagloop;
|
jtulach@678
|
15720 |
case 34:
|
jtulach@678
|
15721 |
if (!this$static.quirks) {
|
jtulach@678
|
15722 |
$implicitlyCloseP(this$static);
|
jtulach@678
|
15723 |
}
|
jtulach@678
|
15724 |
|
jtulach@678
|
15725 |
$appendToCurrentNodeAndPushElementMayFoster(this$static, 'http://www.w3.org/1999/xhtml', elementName, attributes);
|
jtulach@678
|
15726 |
this$static.mode = 7;
|
jtulach@678
|
15727 |
attributes = null;
|
jtulach@678
|
15728 |
break starttagloop;
|
jtulach@678
|
15729 |
case 4:
|
jtulach@678
|
15730 |
case 48:
|
jtulach@678
|
15731 |
case 49:
|
jtulach@678
|
15732 |
$reconstructTheActiveFormattingElements(this$static);
|
jtulach@678
|
15733 |
case 55:
|
jtulach@678
|
15734 |
$appendVoidElementToCurrentMayFoster_0(this$static, 'http://www.w3.org/1999/xhtml', elementName, attributes);
|
jtulach@678
|
15735 |
selfClosing = false;
|
jtulach@678
|
15736 |
attributes = null;
|
jtulach@678
|
15737 |
break starttagloop;
|
jtulach@678
|
15738 |
case 22:
|
jtulach@678
|
15739 |
$implicitlyCloseP(this$static);
|
jtulach@678
|
15740 |
$appendVoidElementToCurrentMayFoster_0(this$static, 'http://www.w3.org/1999/xhtml', elementName, attributes);
|
jtulach@678
|
15741 |
selfClosing = false;
|
jtulach@678
|
15742 |
attributes = null;
|
jtulach@678
|
15743 |
break starttagloop;
|
jtulach@678
|
15744 |
case 12:
|
jtulach@678
|
15745 |
elementName = ($clinit_89() , IMG);
|
jtulach@678
|
15746 |
continue starttagloop;
|
jtulach@678
|
15747 |
case 65:
|
jtulach@678
|
15748 |
case 13:
|
jtulach@678
|
15749 |
$reconstructTheActiveFormattingElements(this$static);
|
jtulach@678
|
15750 |
$appendVoidElementToCurrentMayFoster(this$static, 'http://www.w3.org/1999/xhtml', name, attributes);
|
jtulach@678
|
15751 |
selfClosing = false;
|
jtulach@678
|
15752 |
attributes = null;
|
jtulach@678
|
15753 |
break starttagloop;
|
jtulach@678
|
15754 |
case 14:
|
jtulach@678
|
15755 |
if (this$static.formPointer) {
|
jtulach@678
|
15756 |
break starttagloop;
|
jtulach@678
|
15757 |
}
|
jtulach@678
|
15758 |
|
jtulach@678
|
15759 |
$implicitlyCloseP(this$static);
|
jtulach@678
|
15760 |
formAttrs = $HtmlAttributes(new HtmlAttributes(), 0);
|
jtulach@678
|
15761 |
actionIndex = $getIndex(attributes, ($clinit_87() , ACTION));
|
jtulach@678
|
15762 |
if (actionIndex > -1) {
|
jtulach@678
|
15763 |
$addAttribute(formAttrs, ACTION, $getValue(attributes, actionIndex), ($clinit_80() , ALLOW));
|
jtulach@678
|
15764 |
}
|
jtulach@678
|
15765 |
|
jtulach@678
|
15766 |
$appendToCurrentNodeAndPushFormElementMayFoster(this$static, formAttrs);
|
jtulach@678
|
15767 |
$appendVoidElementToCurrentMayFoster_0(this$static, 'http://www.w3.org/1999/xhtml', ($clinit_89() , HR), ($clinit_91() , EMPTY_ATTRIBUTES));
|
jtulach@678
|
15768 |
$appendToCurrentNodeAndPushElementMayFoster(this$static, 'http://www.w3.org/1999/xhtml', P, EMPTY_ATTRIBUTES);
|
jtulach@678
|
15769 |
$appendToCurrentNodeAndPushElementMayFoster(this$static, 'http://www.w3.org/1999/xhtml', LABEL_0, EMPTY_ATTRIBUTES);
|
jtulach@678
|
15770 |
promptIndex = $getIndex(attributes, PROMPT);
|
jtulach@678
|
15771 |
if (promptIndex > -1) {
|
jtulach@678
|
15772 |
prompt = $toCharArray($getValue(attributes, promptIndex));
|
jtulach@678
|
15773 |
$appendCharacters(this$static, this$static.stack[this$static.currentPtr].node, valueOf_1(prompt, 0, prompt.length));
|
jtulach@678
|
15774 |
}
|
jtulach@678
|
15775 |
else {
|
jtulach@678
|
15776 |
$appendCharacters(this$static, this$static.stack[this$static.currentPtr].node, valueOf_1(ISINDEX_PROMPT, 0, ISINDEX_PROMPT.length));
|
jtulach@678
|
15777 |
}
|
jtulach@678
|
15778 |
|
jtulach@678
|
15779 |
inputAttributes = $HtmlAttributes(new HtmlAttributes(), 0);
|
jtulach@678
|
15780 |
$addAttribute(inputAttributes, NAME, 'isindex', ($clinit_80() , ALLOW));
|
jtulach@678
|
15781 |
for (i = 0; i < attributes.length_0; ++i) {
|
jtulach@678
|
15782 |
attributeQName = $getAttributeName(attributes, i);
|
jtulach@678
|
15783 |
if (NAME == attributeQName || PROMPT == attributeQName) {
|
jtulach@678
|
15784 |
}
|
jtulach@678
|
15785 |
else if (ACTION != attributeQName) {
|
jtulach@678
|
15786 |
$addAttribute(inputAttributes, attributeQName, $getValue(attributes, i), ALLOW);
|
jtulach@678
|
15787 |
}
|
jtulach@678
|
15788 |
}
|
jtulach@678
|
15789 |
|
jtulach@678
|
15790 |
$clearWithoutReleasingContents(attributes);
|
jtulach@678
|
15791 |
$appendVoidElementToCurrentMayFoster(this$static, 'http://www.w3.org/1999/xhtml', 'input', inputAttributes);
|
jtulach@678
|
15792 |
$pop(this$static);
|
jtulach@678
|
15793 |
$pop(this$static);
|
jtulach@678
|
15794 |
$appendVoidElementToCurrentMayFoster_0(this$static, 'http://www.w3.org/1999/xhtml', HR, EMPTY_ATTRIBUTES);
|
jtulach@678
|
15795 |
$pop(this$static);
|
jtulach@678
|
15796 |
selfClosing = false;
|
jtulach@678
|
15797 |
attributes = null;
|
jtulach@678
|
15798 |
break starttagloop;
|
jtulach@678
|
15799 |
case 35:
|
jtulach@678
|
15800 |
$appendToCurrentNodeAndPushElementMayFoster_0(this$static, 'http://www.w3.org/1999/xhtml', elementName, attributes);
|
jtulach@678
|
15801 |
$setContentModelFlag_0(this$static.tokenizer, 1, elementName);
|
jtulach@678
|
15802 |
this$static.originalMode = this$static.mode;
|
jtulach@678
|
15803 |
this$static.mode = 20;
|
jtulach@678
|
15804 |
this$static.needToDropLF = true;
|
jtulach@678
|
15805 |
attributes = null;
|
jtulach@678
|
15806 |
break starttagloop;
|
jtulach@678
|
15807 |
case 26:
|
jtulach@678
|
15808 |
{
|
jtulach@678
|
15809 |
$reconstructTheActiveFormattingElements(this$static);
|
jtulach@678
|
15810 |
$appendToCurrentNodeAndPushElementMayFoster(this$static, 'http://www.w3.org/1999/xhtml', elementName, attributes);
|
jtulach@678
|
15811 |
attributes = null;
|
jtulach@678
|
15812 |
break starttagloop;
|
jtulach@678
|
15813 |
}
|
jtulach@678
|
15814 |
|
jtulach@678
|
15815 |
case 25:
|
jtulach@678
|
15816 |
case 47:
|
jtulach@678
|
15817 |
case 60:
|
jtulach@678
|
15818 |
$appendToCurrentNodeAndPushElementMayFoster(this$static, 'http://www.w3.org/1999/xhtml', elementName, attributes);
|
jtulach@678
|
15819 |
this$static.originalMode = this$static.mode;
|
jtulach@678
|
15820 |
this$static.mode = 20;
|
jtulach@678
|
15821 |
$setContentModelFlag_0(this$static.tokenizer, 2, elementName);
|
jtulach@678
|
15822 |
attributes = null;
|
jtulach@678
|
15823 |
break starttagloop;
|
jtulach@678
|
15824 |
case 32:
|
jtulach@678
|
15825 |
$reconstructTheActiveFormattingElements(this$static);
|
jtulach@678
|
15826 |
$appendToCurrentNodeAndPushElementMayFoster_0(this$static, 'http://www.w3.org/1999/xhtml', elementName, attributes);
|
jtulach@678
|
15827 |
switch (this$static.mode) {
|
jtulach@678
|
15828 |
case 7:
|
jtulach@678
|
15829 |
case 8:
|
jtulach@678
|
15830 |
case 9:
|
jtulach@678
|
15831 |
case 10:
|
jtulach@678
|
15832 |
case 11:
|
jtulach@678
|
15833 |
case 12:
|
jtulach@678
|
15834 |
this$static.mode = 14;
|
jtulach@678
|
15835 |
break;
|
jtulach@678
|
15836 |
default:this$static.mode = 13;
|
jtulach@678
|
15837 |
}
|
jtulach@678
|
15838 |
|
jtulach@678
|
15839 |
attributes = null;
|
jtulach@678
|
15840 |
break starttagloop;
|
jtulach@678
|
15841 |
case 27:
|
jtulach@678
|
15842 |
case 28:
|
jtulach@678
|
15843 |
if ($findLastInScope(this$static, 'option') != 2147483647) {
|
jtulach@678
|
15844 |
optionendtagloop: for (;;) {
|
jtulach@678
|
15845 |
if ('option' == this$static.stack[this$static.currentPtr].name_0) {
|
jtulach@678
|
15846 |
$pop(this$static);
|
jtulach@678
|
15847 |
break optionendtagloop;
|
jtulach@678
|
15848 |
}
|
jtulach@678
|
15849 |
eltPos = this$static.currentPtr;
|
jtulach@678
|
15850 |
for (;;) {
|
jtulach@678
|
15851 |
if (this$static.stack[eltPos].name_0 == 'option') {
|
jtulach@678
|
15852 |
$generateImpliedEndTags(this$static);
|
jtulach@678
|
15853 |
while (this$static.currentPtr >= eltPos) {
|
jtulach@678
|
15854 |
$pop(this$static);
|
jtulach@678
|
15855 |
}
|
jtulach@678
|
15856 |
break optionendtagloop;
|
jtulach@678
|
15857 |
}
|
jtulach@678
|
15858 |
--eltPos;
|
jtulach@678
|
15859 |
}
|
jtulach@678
|
15860 |
}
|
jtulach@678
|
15861 |
}
|
jtulach@678
|
15862 |
|
jtulach@678
|
15863 |
$reconstructTheActiveFormattingElements(this$static);
|
jtulach@678
|
15864 |
$appendToCurrentNodeAndPushElementMayFoster(this$static, 'http://www.w3.org/1999/xhtml', elementName, attributes);
|
jtulach@678
|
15865 |
attributes = null;
|
jtulach@678
|
15866 |
break starttagloop;
|
jtulach@678
|
15867 |
case 53:
|
jtulach@678
|
15868 |
eltPos = $findLastInScope(this$static, 'ruby');
|
jtulach@678
|
15869 |
if (eltPos != 2147483647) {
|
jtulach@678
|
15870 |
$generateImpliedEndTags(this$static);
|
jtulach@678
|
15871 |
}
|
jtulach@678
|
15872 |
|
jtulach@678
|
15873 |
if (eltPos != this$static.currentPtr) {
|
jtulach@678
|
15874 |
while (this$static.currentPtr > eltPos) {
|
jtulach@678
|
15875 |
$pop(this$static);
|
jtulach@678
|
15876 |
}
|
jtulach@678
|
15877 |
}
|
jtulach@678
|
15878 |
|
jtulach@678
|
15879 |
$appendToCurrentNodeAndPushElementMayFoster(this$static, 'http://www.w3.org/1999/xhtml', elementName, attributes);
|
jtulach@678
|
15880 |
attributes = null;
|
jtulach@678
|
15881 |
break starttagloop;
|
jtulach@678
|
15882 |
case 17:
|
jtulach@678
|
15883 |
$reconstructTheActiveFormattingElements(this$static);
|
jtulach@678
|
15884 |
attributes.mode = 1;
|
jtulach@678
|
15885 |
if (selfClosing) {
|
jtulach@678
|
15886 |
$appendVoidElementToCurrentMayFoster_0(this$static, 'http://www.w3.org/1998/Math/MathML', elementName, attributes);
|
jtulach@678
|
15887 |
selfClosing = false;
|
jtulach@678
|
15888 |
}
|
jtulach@678
|
15889 |
else {
|
jtulach@678
|
15890 |
$appendToCurrentNodeAndPushElementMayFoster(this$static, 'http://www.w3.org/1998/Math/MathML', elementName, attributes);
|
jtulach@678
|
15891 |
this$static.foreignFlag = 0;
|
jtulach@678
|
15892 |
}
|
jtulach@678
|
15893 |
|
jtulach@678
|
15894 |
attributes = null;
|
jtulach@678
|
15895 |
break starttagloop;
|
jtulach@678
|
15896 |
case 19:
|
jtulach@678
|
15897 |
$reconstructTheActiveFormattingElements(this$static);
|
jtulach@678
|
15898 |
attributes.mode = 2;
|
jtulach@678
|
15899 |
if (selfClosing) {
|
jtulach@678
|
15900 |
$appendVoidElementToCurrentMayFosterCamelCase(this$static, 'http://www.w3.org/2000/svg', elementName, attributes);
|
jtulach@678
|
15901 |
selfClosing = false;
|
jtulach@678
|
15902 |
}
|
jtulach@678
|
15903 |
else {
|
jtulach@678
|
15904 |
$appendToCurrentNodeAndPushElementMayFoster(this$static, 'http://www.w3.org/2000/svg', elementName, attributes);
|
jtulach@678
|
15905 |
this$static.foreignFlag = 0;
|
jtulach@678
|
15906 |
}
|
jtulach@678
|
15907 |
|
jtulach@678
|
15908 |
attributes = null;
|
jtulach@678
|
15909 |
break starttagloop;
|
jtulach@678
|
15910 |
case 6:
|
jtulach@678
|
15911 |
case 7:
|
jtulach@678
|
15912 |
case 8:
|
jtulach@678
|
15913 |
case 39:
|
jtulach@678
|
15914 |
case 37:
|
jtulach@678
|
15915 |
case 40:
|
jtulach@678
|
15916 |
case 10:
|
jtulach@678
|
15917 |
case 11:
|
jtulach@678
|
15918 |
case 20:
|
jtulach@678
|
15919 |
break starttagloop;
|
jtulach@678
|
15920 |
case 62:
|
jtulach@678
|
15921 |
$reconstructTheActiveFormattingElements(this$static);
|
jtulach@678
|
15922 |
$appendToCurrentNodeAndPushElementMayFoster_0(this$static, 'http://www.w3.org/1999/xhtml', elementName, attributes);
|
jtulach@678
|
15923 |
attributes = null;
|
jtulach@678
|
15924 |
break starttagloop;
|
jtulach@678
|
15925 |
default:$reconstructTheActiveFormattingElements(this$static);
|
jtulach@678
|
15926 |
$appendToCurrentNodeAndPushElementMayFoster(this$static, 'http://www.w3.org/1999/xhtml', elementName, attributes);
|
jtulach@678
|
15927 |
attributes = null;
|
jtulach@678
|
15928 |
break starttagloop;
|
jtulach@678
|
15929 |
}
|
jtulach@678
|
15930 |
}
|
jtulach@678
|
15931 |
|
jtulach@678
|
15932 |
case 3:
|
jtulach@678
|
15933 |
inheadloop: for (;;) {
|
jtulach@678
|
15934 |
switch (group) {
|
jtulach@678
|
15935 |
case 23:
|
jtulach@678
|
15936 |
$processNonNcNames(attributes, this$static, this$static.namePolicy);
|
jtulach@678
|
15937 |
$addAttributesToElement(this$static, this$static.stack[0].node, attributes);
|
jtulach@678
|
15938 |
attributes = null;
|
jtulach@678
|
15939 |
break starttagloop;
|
jtulach@678
|
15940 |
case 2:
|
jtulach@678
|
15941 |
case 54:
|
jtulach@678
|
15942 |
$appendVoidElementToCurrentMayFoster_0(this$static, 'http://www.w3.org/1999/xhtml', elementName, attributes);
|
jtulach@678
|
15943 |
selfClosing = false;
|
jtulach@678
|
15944 |
attributes = null;
|
jtulach@678
|
15945 |
break starttagloop;
|
jtulach@678
|
15946 |
case 18:
|
jtulach@678
|
15947 |
case 16:
|
jtulach@678
|
15948 |
break inheadloop;
|
jtulach@678
|
15949 |
case 36:
|
jtulach@678
|
15950 |
$appendToCurrentNodeAndPushElementMayFoster(this$static, 'http://www.w3.org/1999/xhtml', elementName, attributes);
|
jtulach@678
|
15951 |
this$static.originalMode = this$static.mode;
|
jtulach@678
|
15952 |
this$static.mode = 20;
|
jtulach@678
|
15953 |
$setContentModelFlag_0(this$static.tokenizer, 1, elementName);
|
jtulach@678
|
15954 |
attributes = null;
|
jtulach@678
|
15955 |
break starttagloop;
|
jtulach@678
|
15956 |
case 26:
|
jtulach@678
|
15957 |
{
|
jtulach@678
|
15958 |
$appendToCurrentNodeAndPushElementMayFoster(this$static, 'http://www.w3.org/1999/xhtml', elementName, attributes);
|
jtulach@678
|
15959 |
this$static.mode = 4;
|
jtulach@678
|
15960 |
}
|
jtulach@678
|
15961 |
|
jtulach@678
|
15962 |
attributes = null;
|
jtulach@678
|
15963 |
break starttagloop;
|
jtulach@678
|
15964 |
case 31:
|
jtulach@678
|
15965 |
case 33:
|
jtulach@678
|
15966 |
case 25:
|
jtulach@678
|
15967 |
$appendToCurrentNodeAndPushElementMayFoster(this$static, 'http://www.w3.org/1999/xhtml', elementName, attributes);
|
jtulach@678
|
15968 |
this$static.originalMode = this$static.mode;
|
jtulach@678
|
15969 |
this$static.mode = 20;
|
jtulach@678
|
15970 |
$setContentModelFlag_0(this$static.tokenizer, 2, elementName);
|
jtulach@678
|
15971 |
attributes = null;
|
jtulach@678
|
15972 |
break starttagloop;
|
jtulach@678
|
15973 |
case 20:
|
jtulach@678
|
15974 |
break starttagloop;
|
jtulach@678
|
15975 |
default:$pop(this$static);
|
jtulach@678
|
15976 |
this$static.mode = 5;
|
jtulach@678
|
15977 |
continue starttagloop;
|
jtulach@678
|
15978 |
}
|
jtulach@678
|
15979 |
}
|
jtulach@678
|
15980 |
|
jtulach@678
|
15981 |
case 4:
|
jtulach@678
|
15982 |
switch (group) {
|
jtulach@678
|
15983 |
case 23:
|
jtulach@678
|
15984 |
$processNonNcNames(attributes, this$static, this$static.namePolicy);
|
jtulach@678
|
15985 |
$addAttributesToElement(this$static, this$static.stack[0].node, attributes);
|
jtulach@678
|
15986 |
attributes = null;
|
jtulach@678
|
15987 |
break starttagloop;
|
jtulach@678
|
15988 |
case 16:
|
jtulach@678
|
15989 |
$appendVoidElementToCurrentMayFoster_0(this$static, 'http://www.w3.org/1999/xhtml', elementName, attributes);
|
jtulach@678
|
15990 |
selfClosing = false;
|
jtulach@678
|
15991 |
attributes = null;
|
jtulach@678
|
15992 |
break starttagloop;
|
jtulach@678
|
15993 |
case 18:
|
jtulach@678
|
15994 |
$checkMetaCharset(this$static, attributes);
|
jtulach@678
|
15995 |
$appendVoidElementToCurrentMayFoster_0(this$static, 'http://www.w3.org/1999/xhtml', elementName, attributes);
|
jtulach@678
|
15996 |
selfClosing = false;
|
jtulach@678
|
15997 |
attributes = null;
|
jtulach@678
|
15998 |
break starttagloop;
|
jtulach@678
|
15999 |
case 33:
|
jtulach@678
|
16000 |
case 25:
|
jtulach@678
|
16001 |
$appendToCurrentNodeAndPushElement(this$static, 'http://www.w3.org/1999/xhtml', elementName, attributes);
|
jtulach@678
|
16002 |
this$static.originalMode = this$static.mode;
|
jtulach@678
|
16003 |
this$static.mode = 20;
|
jtulach@678
|
16004 |
$setContentModelFlag_0(this$static.tokenizer, 2, elementName);
|
jtulach@678
|
16005 |
attributes = null;
|
jtulach@678
|
16006 |
break starttagloop;
|
jtulach@678
|
16007 |
case 20:
|
jtulach@678
|
16008 |
break starttagloop;
|
jtulach@678
|
16009 |
case 26:
|
jtulach@678
|
16010 |
break starttagloop;
|
jtulach@678
|
16011 |
default:$pop(this$static);
|
jtulach@678
|
16012 |
this$static.mode = 3;
|
jtulach@678
|
16013 |
continue;
|
jtulach@678
|
16014 |
}
|
jtulach@678
|
16015 |
|
jtulach@678
|
16016 |
case 9:
|
jtulach@678
|
16017 |
switch (group) {
|
jtulach@678
|
16018 |
case 23:
|
jtulach@678
|
16019 |
$processNonNcNames(attributes, this$static, this$static.namePolicy);
|
jtulach@678
|
16020 |
$addAttributesToElement(this$static, this$static.stack[0].node, attributes);
|
jtulach@678
|
16021 |
attributes = null;
|
jtulach@678
|
16022 |
break starttagloop;
|
jtulach@678
|
16023 |
case 7:
|
jtulach@678
|
16024 |
$appendVoidElementToCurrentMayFoster_0(this$static, 'http://www.w3.org/1999/xhtml', elementName, attributes);
|
jtulach@678
|
16025 |
selfClosing = false;
|
jtulach@678
|
16026 |
attributes = null;
|
jtulach@678
|
16027 |
break starttagloop;
|
jtulach@678
|
16028 |
default:if (this$static.currentPtr == 0) {
|
jtulach@678
|
16029 |
break starttagloop;
|
jtulach@678
|
16030 |
}
|
jtulach@678
|
16031 |
|
jtulach@678
|
16032 |
$pop(this$static);
|
jtulach@678
|
16033 |
this$static.mode = 7;
|
jtulach@678
|
16034 |
continue;
|
jtulach@678
|
16035 |
}
|
jtulach@678
|
16036 |
|
jtulach@678
|
16037 |
case 14:
|
jtulach@678
|
16038 |
switch (group) {
|
jtulach@678
|
16039 |
case 6:
|
jtulach@678
|
16040 |
case 39:
|
jtulach@678
|
16041 |
case 37:
|
jtulach@678
|
16042 |
case 40:
|
jtulach@678
|
16043 |
case 34:
|
jtulach@678
|
16044 |
$endSelect(this$static);
|
jtulach@678
|
16045 |
continue;
|
jtulach@678
|
16046 |
}
|
jtulach@678
|
16047 |
|
jtulach@678
|
16048 |
case 13:
|
jtulach@678
|
16049 |
switch (group) {
|
jtulach@678
|
16050 |
case 23:
|
jtulach@678
|
16051 |
$processNonNcNames(attributes, this$static, this$static.namePolicy);
|
jtulach@678
|
16052 |
$addAttributesToElement(this$static, this$static.stack[0].node, attributes);
|
jtulach@678
|
16053 |
attributes = null;
|
jtulach@678
|
16054 |
break starttagloop;
|
jtulach@678
|
16055 |
case 28:
|
jtulach@678
|
16056 |
if ('option' == this$static.stack[this$static.currentPtr].name_0) {
|
jtulach@678
|
16057 |
$pop(this$static);
|
jtulach@678
|
16058 |
}
|
jtulach@678
|
16059 |
|
jtulach@678
|
16060 |
$appendToCurrentNodeAndPushElement(this$static, 'http://www.w3.org/1999/xhtml', elementName, attributes);
|
jtulach@678
|
16061 |
attributes = null;
|
jtulach@678
|
16062 |
break starttagloop;
|
jtulach@678
|
16063 |
case 27:
|
jtulach@678
|
16064 |
if ('option' == this$static.stack[this$static.currentPtr].name_0) {
|
jtulach@678
|
16065 |
$pop(this$static);
|
jtulach@678
|
16066 |
}
|
jtulach@678
|
16067 |
|
jtulach@678
|
16068 |
if ('optgroup' == this$static.stack[this$static.currentPtr].name_0) {
|
jtulach@678
|
16069 |
$pop(this$static);
|
jtulach@678
|
16070 |
}
|
jtulach@678
|
16071 |
|
jtulach@678
|
16072 |
$appendToCurrentNodeAndPushElement(this$static, 'http://www.w3.org/1999/xhtml', elementName, attributes);
|
jtulach@678
|
16073 |
attributes = null;
|
jtulach@678
|
16074 |
break starttagloop;
|
jtulach@678
|
16075 |
case 32:
|
jtulach@678
|
16076 |
eltPos = $findLastInTableScope(this$static, name);
|
jtulach@678
|
16077 |
if (eltPos == 2147483647) {
|
jtulach@678
|
16078 |
break starttagloop;
|
jtulach@678
|
16079 |
}
|
jtulach@678
|
16080 |
else {
|
jtulach@678
|
16081 |
while (this$static.currentPtr >= eltPos) {
|
jtulach@678
|
16082 |
$pop(this$static);
|
jtulach@678
|
16083 |
}
|
jtulach@678
|
16084 |
$resetTheInsertionMode(this$static);
|
jtulach@678
|
16085 |
break starttagloop;
|
jtulach@678
|
16086 |
}
|
jtulach@678
|
16087 |
|
jtulach@678
|
16088 |
case 13:
|
jtulach@678
|
16089 |
case 35:
|
jtulach@678
|
16090 |
$endSelect(this$static);
|
jtulach@678
|
16091 |
continue;
|
jtulach@678
|
16092 |
case 31:
|
jtulach@678
|
16093 |
$appendToCurrentNodeAndPushElementMayFoster(this$static, 'http://www.w3.org/1999/xhtml', elementName, attributes);
|
jtulach@678
|
16094 |
this$static.originalMode = this$static.mode;
|
jtulach@678
|
16095 |
this$static.mode = 20;
|
jtulach@678
|
16096 |
$setContentModelFlag_0(this$static.tokenizer, 2, elementName);
|
jtulach@678
|
16097 |
attributes = null;
|
jtulach@678
|
16098 |
break starttagloop;
|
jtulach@678
|
16099 |
default:break starttagloop;
|
jtulach@678
|
16100 |
}
|
jtulach@678
|
16101 |
|
jtulach@678
|
16102 |
case 15:
|
jtulach@678
|
16103 |
switch (group) {
|
jtulach@678
|
16104 |
case 23:
|
jtulach@678
|
16105 |
$processNonNcNames(attributes, this$static, this$static.namePolicy);
|
jtulach@678
|
16106 |
$addAttributesToElement(this$static, this$static.stack[0].node, attributes);
|
jtulach@678
|
16107 |
attributes = null;
|
jtulach@678
|
16108 |
break starttagloop;
|
jtulach@678
|
16109 |
default:this$static.mode = 6;
|
jtulach@678
|
16110 |
continue;
|
jtulach@678
|
16111 |
}
|
jtulach@678
|
16112 |
|
jtulach@678
|
16113 |
case 16:
|
jtulach@678
|
16114 |
switch (group) {
|
jtulach@678
|
16115 |
case 11:
|
jtulach@678
|
16116 |
$appendToCurrentNodeAndPushElement(this$static, 'http://www.w3.org/1999/xhtml', elementName, attributes);
|
jtulach@678
|
16117 |
attributes = null;
|
jtulach@678
|
16118 |
break starttagloop;
|
jtulach@678
|
16119 |
case 10:
|
jtulach@678
|
16120 |
$appendVoidElementToCurrentMayFoster_0(this$static, 'http://www.w3.org/1999/xhtml', elementName, attributes);
|
jtulach@678
|
16121 |
selfClosing = false;
|
jtulach@678
|
16122 |
attributes = null;
|
jtulach@678
|
16123 |
break starttagloop;
|
jtulach@678
|
16124 |
}
|
jtulach@678
|
16125 |
|
jtulach@678
|
16126 |
case 17:
|
jtulach@678
|
16127 |
switch (group) {
|
jtulach@678
|
16128 |
case 23:
|
jtulach@678
|
16129 |
$processNonNcNames(attributes, this$static, this$static.namePolicy);
|
jtulach@678
|
16130 |
$addAttributesToElement(this$static, this$static.stack[0].node, attributes);
|
jtulach@678
|
16131 |
attributes = null;
|
jtulach@678
|
16132 |
break starttagloop;
|
jtulach@678
|
16133 |
case 25:
|
jtulach@678
|
16134 |
$appendToCurrentNodeAndPushElement(this$static, 'http://www.w3.org/1999/xhtml', elementName, attributes);
|
jtulach@678
|
16135 |
this$static.originalMode = this$static.mode;
|
jtulach@678
|
16136 |
this$static.mode = 20;
|
jtulach@678
|
16137 |
$setContentModelFlag_0(this$static.tokenizer, 2, elementName);
|
jtulach@678
|
16138 |
attributes = null;
|
jtulach@678
|
16139 |
break starttagloop;
|
jtulach@678
|
16140 |
default:break starttagloop;
|
jtulach@678
|
16141 |
}
|
jtulach@678
|
16142 |
|
jtulach@678
|
16143 |
case 0:
|
jtulach@678
|
16144 |
$documentModeInternal(this$static, ($clinit_78() , QUIRKS_MODE));
|
jtulach@678
|
16145 |
this$static.mode = 1;
|
jtulach@678
|
16146 |
continue;
|
jtulach@678
|
16147 |
case 1:
|
jtulach@678
|
16148 |
switch (group) {
|
jtulach@678
|
16149 |
case 23:
|
jtulach@678
|
16150 |
if (attributes == ($clinit_91() , EMPTY_ATTRIBUTES)) {
|
jtulach@678
|
16151 |
$appendHtmlElementToDocumentAndPush(this$static, $emptyAttributes(this$static.tokenizer));
|
jtulach@678
|
16152 |
}
|
jtulach@678
|
16153 |
else {
|
jtulach@678
|
16154 |
$appendHtmlElementToDocumentAndPush(this$static, attributes);
|
jtulach@678
|
16155 |
}
|
jtulach@678
|
16156 |
|
jtulach@678
|
16157 |
this$static.mode = 2;
|
jtulach@678
|
16158 |
attributes = null;
|
jtulach@678
|
16159 |
break starttagloop;
|
jtulach@678
|
16160 |
default:$appendHtmlElementToDocumentAndPush(this$static, $emptyAttributes(this$static.tokenizer));
|
jtulach@678
|
16161 |
this$static.mode = 2;
|
jtulach@678
|
16162 |
continue;
|
jtulach@678
|
16163 |
}
|
jtulach@678
|
16164 |
|
jtulach@678
|
16165 |
case 2:
|
jtulach@678
|
16166 |
switch (group) {
|
jtulach@678
|
16167 |
case 23:
|
jtulach@678
|
16168 |
$processNonNcNames(attributes, this$static, this$static.namePolicy);
|
jtulach@678
|
16169 |
$addAttributesToElement(this$static, this$static.stack[0].node, attributes);
|
jtulach@678
|
16170 |
attributes = null;
|
jtulach@678
|
16171 |
break starttagloop;
|
jtulach@678
|
16172 |
case 20:
|
jtulach@678
|
16173 |
$appendToCurrentNodeAndPushHeadElement(this$static, attributes);
|
jtulach@678
|
16174 |
this$static.mode = 3;
|
jtulach@678
|
16175 |
attributes = null;
|
jtulach@678
|
16176 |
break starttagloop;
|
jtulach@678
|
16177 |
default:$appendToCurrentNodeAndPushHeadElement(this$static, ($clinit_91() , EMPTY_ATTRIBUTES));
|
jtulach@678
|
16178 |
this$static.mode = 3;
|
jtulach@678
|
16179 |
continue;
|
jtulach@678
|
16180 |
}
|
jtulach@678
|
16181 |
|
jtulach@678
|
16182 |
case 5:
|
jtulach@678
|
16183 |
switch (group) {
|
jtulach@678
|
16184 |
case 23:
|
jtulach@678
|
16185 |
$processNonNcNames(attributes, this$static, this$static.namePolicy);
|
jtulach@678
|
16186 |
$addAttributesToElement(this$static, this$static.stack[0].node, attributes);
|
jtulach@678
|
16187 |
attributes = null;
|
jtulach@678
|
16188 |
break starttagloop;
|
jtulach@678
|
16189 |
case 3:
|
jtulach@678
|
16190 |
if (attributes.length_0 == 0) {
|
jtulach@678
|
16191 |
$appendToCurrentNodeAndPushElement(this$static, 'http://www.w3.org/1999/xhtml', ($clinit_89() , BODY), $emptyAttributes(this$static.tokenizer));
|
jtulach@678
|
16192 |
}
|
jtulach@678
|
16193 |
else {
|
jtulach@678
|
16194 |
$appendToCurrentNodeAndPushElement(this$static, 'http://www.w3.org/1999/xhtml', ($clinit_89() , BODY), attributes);
|
jtulach@678
|
16195 |
}
|
jtulach@678
|
16196 |
|
jtulach@678
|
16197 |
this$static.mode = 21;
|
jtulach@678
|
16198 |
attributes = null;
|
jtulach@678
|
16199 |
break starttagloop;
|
jtulach@678
|
16200 |
case 11:
|
jtulach@678
|
16201 |
$appendToCurrentNodeAndPushElement(this$static, 'http://www.w3.org/1999/xhtml', elementName, attributes);
|
jtulach@678
|
16202 |
this$static.mode = 16;
|
jtulach@678
|
16203 |
attributes = null;
|
jtulach@678
|
16204 |
break starttagloop;
|
jtulach@678
|
16205 |
case 2:
|
jtulach@678
|
16206 |
$pushHeadPointerOntoStack(this$static);
|
jtulach@678
|
16207 |
$appendVoidElementToCurrentMayFoster_0(this$static, 'http://www.w3.org/1999/xhtml', elementName, attributes);
|
jtulach@678
|
16208 |
selfClosing = false;
|
jtulach@678
|
16209 |
$pop(this$static);
|
jtulach@678
|
16210 |
attributes = null;
|
jtulach@678
|
16211 |
break starttagloop;
|
jtulach@678
|
16212 |
case 16:
|
jtulach@678
|
16213 |
$pushHeadPointerOntoStack(this$static);
|
jtulach@678
|
16214 |
$appendVoidElementToCurrentMayFoster_0(this$static, 'http://www.w3.org/1999/xhtml', elementName, attributes);
|
jtulach@678
|
16215 |
selfClosing = false;
|
jtulach@678
|
16216 |
$pop(this$static);
|
jtulach@678
|
16217 |
attributes = null;
|
jtulach@678
|
16218 |
break starttagloop;
|
jtulach@678
|
16219 |
case 18:
|
jtulach@678
|
16220 |
$checkMetaCharset(this$static, attributes);
|
jtulach@678
|
16221 |
$pushHeadPointerOntoStack(this$static);
|
jtulach@678
|
16222 |
$appendVoidElementToCurrentMayFoster_0(this$static, 'http://www.w3.org/1999/xhtml', elementName, attributes);
|
jtulach@678
|
16223 |
selfClosing = false;
|
jtulach@678
|
16224 |
$pop(this$static);
|
jtulach@678
|
16225 |
attributes = null;
|
jtulach@678
|
16226 |
break starttagloop;
|
jtulach@678
|
16227 |
case 31:
|
jtulach@678
|
16228 |
$pushHeadPointerOntoStack(this$static);
|
jtulach@678
|
16229 |
$appendToCurrentNodeAndPushElement(this$static, 'http://www.w3.org/1999/xhtml', elementName, attributes);
|
jtulach@678
|
16230 |
this$static.originalMode = this$static.mode;
|
jtulach@678
|
16231 |
this$static.mode = 20;
|
jtulach@678
|
16232 |
$setContentModelFlag_0(this$static.tokenizer, 2, elementName);
|
jtulach@678
|
16233 |
attributes = null;
|
jtulach@678
|
16234 |
break starttagloop;
|
jtulach@678
|
16235 |
case 33:
|
jtulach@678
|
16236 |
case 25:
|
jtulach@678
|
16237 |
$pushHeadPointerOntoStack(this$static);
|
jtulach@678
|
16238 |
$appendToCurrentNodeAndPushElement(this$static, 'http://www.w3.org/1999/xhtml', elementName, attributes);
|
jtulach@678
|
16239 |
this$static.originalMode = this$static.mode;
|
jtulach@678
|
16240 |
this$static.mode = 20;
|
jtulach@678
|
16241 |
$setContentModelFlag_0(this$static.tokenizer, 2, elementName);
|
jtulach@678
|
16242 |
attributes = null;
|
jtulach@678
|
16243 |
break starttagloop;
|
jtulach@678
|
16244 |
case 36:
|
jtulach@678
|
16245 |
$pushHeadPointerOntoStack(this$static);
|
jtulach@678
|
16246 |
$appendToCurrentNodeAndPushElement(this$static, 'http://www.w3.org/1999/xhtml', elementName, attributes);
|
jtulach@678
|
16247 |
this$static.originalMode = this$static.mode;
|
jtulach@678
|
16248 |
this$static.mode = 20;
|
jtulach@678
|
16249 |
$setContentModelFlag_0(this$static.tokenizer, 1, elementName);
|
jtulach@678
|
16250 |
attributes = null;
|
jtulach@678
|
16251 |
break starttagloop;
|
jtulach@678
|
16252 |
case 20:
|
jtulach@678
|
16253 |
break starttagloop;
|
jtulach@678
|
16254 |
default:$appendToCurrentNodeAndPushElement(this$static, 'http://www.w3.org/1999/xhtml', ($clinit_89() , BODY), $emptyAttributes(this$static.tokenizer));
|
jtulach@678
|
16255 |
this$static.mode = 21;
|
jtulach@678
|
16256 |
continue;
|
jtulach@678
|
16257 |
}
|
jtulach@678
|
16258 |
|
jtulach@678
|
16259 |
case 18:
|
jtulach@678
|
16260 |
switch (group) {
|
jtulach@678
|
16261 |
case 23:
|
jtulach@678
|
16262 |
$processNonNcNames(attributes, this$static, this$static.namePolicy);
|
jtulach@678
|
16263 |
$addAttributesToElement(this$static, this$static.stack[0].node, attributes);
|
jtulach@678
|
16264 |
attributes = null;
|
jtulach@678
|
16265 |
break starttagloop;
|
jtulach@678
|
16266 |
default:this$static.mode = 6;
|
jtulach@678
|
16267 |
continue;
|
jtulach@678
|
16268 |
}
|
jtulach@678
|
16269 |
|
jtulach@678
|
16270 |
case 19:
|
jtulach@678
|
16271 |
switch (group) {
|
jtulach@678
|
16272 |
case 25:
|
jtulach@678
|
16273 |
$appendToCurrentNodeAndPushElementMayFoster(this$static, 'http://www.w3.org/1999/xhtml', elementName, attributes);
|
jtulach@678
|
16274 |
this$static.originalMode = this$static.mode;
|
jtulach@678
|
16275 |
this$static.mode = 20;
|
jtulach@678
|
16276 |
$setContentModelFlag_0(this$static.tokenizer, 2, elementName);
|
jtulach@678
|
16277 |
attributes = null;
|
jtulach@678
|
16278 |
break starttagloop;
|
jtulach@678
|
16279 |
default:break starttagloop;
|
jtulach@678
|
16280 |
}
|
jtulach@678
|
16281 |
|
jtulach@678
|
16282 |
}
|
jtulach@678
|
16283 |
|
jtulach@678
|
16284 |
}
|
jtulach@678
|
16285 |
}
|
jtulach@678
|
16286 |
if (needsPostProcessing && this$static.foreignFlag == 0 && !$hasForeignInScope(this$static)) {
|
jtulach@678
|
16287 |
this$static.foreignFlag = 1;
|
jtulach@678
|
16288 |
}
|
jtulach@678
|
16289 |
attributes != ($clinit_91() , EMPTY_ATTRIBUTES);
|
jtulach@678
|
16290 |
}
|
jtulach@678
|
16291 |
|
jtulach@678
|
16292 |
function $startTokenization(this$static, self){
|
jtulach@678
|
16293 |
var elt, node;
|
jtulach@678
|
16294 |
this$static.tokenizer = self;
|
jtulach@678
|
16295 |
this$static.stack = initDim(_3Lnu_validator_htmlparser_impl_StackNode_2_classLit, 51, 11, 64, 0);
|
jtulach@678
|
16296 |
this$static.listOfActiveFormattingElements = initDim(_3Lnu_validator_htmlparser_impl_StackNode_2_classLit, 51, 11, 64, 0);
|
jtulach@678
|
16297 |
this$static.needToDropLF = false;
|
jtulach@678
|
16298 |
this$static.originalMode = 0;
|
jtulach@678
|
16299 |
this$static.currentPtr = -1;
|
jtulach@678
|
16300 |
this$static.listPtr = -1;
|
jtulach@678
|
16301 |
this$static.formPointer = null;
|
jtulach@678
|
16302 |
this$static.headPointer = null;
|
jtulach@678
|
16303 |
this$static.html4 = false;
|
jtulach@678
|
16304 |
$clearImpl(this$static.idLocations);
|
jtulach@678
|
16305 |
this$static.wantingComments = this$static.wantingComments;
|
jtulach@678
|
16306 |
this$static.script = null;
|
jtulach@678
|
16307 |
this$static.placeholder = null;
|
jtulach@678
|
16308 |
this$static.readyToRun = false;
|
jtulach@678
|
16309 |
this$static.charBufferLen = 0;
|
jtulach@678
|
16310 |
this$static.charBuffer = initDim(_3C_classLit, 42, -1, 1024, 1);
|
jtulach@678
|
16311 |
if (this$static.fragment) {
|
jtulach@678
|
16312 |
elt = $createHtmlElementSetAsRoot(this$static, $emptyAttributes(this$static.tokenizer));
|
jtulach@678
|
16313 |
node = $StackNode_0(new StackNode(), 'http://www.w3.org/1999/xhtml', ($clinit_89() , HTML_0), elt);
|
jtulach@678
|
16314 |
++this$static.currentPtr;
|
jtulach@678
|
16315 |
this$static.stack[this$static.currentPtr] = node;
|
jtulach@678
|
16316 |
$resetTheInsertionMode(this$static);
|
jtulach@678
|
16317 |
if ('title' == this$static.contextName || 'textarea' == this$static.contextName) {
|
jtulach@678
|
16318 |
$setContentModelFlag(this$static.tokenizer, 1);
|
jtulach@678
|
16319 |
}
|
jtulach@678
|
16320 |
else if ('style' == this$static.contextName || 'script' == this$static.contextName || 'xmp' == this$static.contextName || 'iframe' == this$static.contextName || 'noembed' == this$static.contextName || 'noframes' == this$static.contextName) {
|
jtulach@678
|
16321 |
$setContentModelFlag(this$static.tokenizer, 2);
|
jtulach@678
|
16322 |
}
|
jtulach@678
|
16323 |
else if ('plaintext' == this$static.contextName) {
|
jtulach@678
|
16324 |
$setContentModelFlag(this$static.tokenizer, 3);
|
jtulach@678
|
16325 |
}
|
jtulach@678
|
16326 |
else {
|
jtulach@678
|
16327 |
$setContentModelFlag(this$static.tokenizer, 0);
|
jtulach@678
|
16328 |
}
|
jtulach@678
|
16329 |
this$static.contextName = null;
|
jtulach@678
|
16330 |
}
|
jtulach@678
|
16331 |
else {
|
jtulach@678
|
16332 |
this$static.mode = 0;
|
jtulach@678
|
16333 |
this$static.foreignFlag = 1;
|
jtulach@678
|
16334 |
}
|
jtulach@678
|
16335 |
}
|
jtulach@678
|
16336 |
|
jtulach@678
|
16337 |
function extractCharsetFromContent(attributeValue){
|
jtulach@678
|
16338 |
var buffer, c, charset, charsetState, end, i, start;
|
jtulach@678
|
16339 |
charsetState = 0;
|
jtulach@678
|
16340 |
start = -1;
|
jtulach@678
|
16341 |
end = -1;
|
jtulach@678
|
16342 |
buffer = $toCharArray(attributeValue);
|
jtulach@678
|
16343 |
charsetloop: for (i = 0; i < buffer.length; ++i) {
|
jtulach@678
|
16344 |
c = buffer[i];
|
jtulach@678
|
16345 |
switch (charsetState) {
|
jtulach@678
|
16346 |
case 0:
|
jtulach@678
|
16347 |
switch (c) {
|
jtulach@678
|
16348 |
case 99:
|
jtulach@678
|
16349 |
case 67:
|
jtulach@678
|
16350 |
charsetState = 1;
|
jtulach@678
|
16351 |
continue;
|
jtulach@678
|
16352 |
default:continue;
|
jtulach@678
|
16353 |
}
|
jtulach@678
|
16354 |
|
jtulach@678
|
16355 |
case 1:
|
jtulach@678
|
16356 |
switch (c) {
|
jtulach@678
|
16357 |
case 104:
|
jtulach@678
|
16358 |
case 72:
|
jtulach@678
|
16359 |
charsetState = 2;
|
jtulach@678
|
16360 |
continue;
|
jtulach@678
|
16361 |
default:charsetState = 0;
|
jtulach@678
|
16362 |
continue;
|
jtulach@678
|
16363 |
}
|
jtulach@678
|
16364 |
|
jtulach@678
|
16365 |
case 2:
|
jtulach@678
|
16366 |
switch (c) {
|
jtulach@678
|
16367 |
case 97:
|
jtulach@678
|
16368 |
case 65:
|
jtulach@678
|
16369 |
charsetState = 3;
|
jtulach@678
|
16370 |
continue;
|
jtulach@678
|
16371 |
default:charsetState = 0;
|
jtulach@678
|
16372 |
continue;
|
jtulach@678
|
16373 |
}
|
jtulach@678
|
16374 |
|
jtulach@678
|
16375 |
case 3:
|
jtulach@678
|
16376 |
switch (c) {
|
jtulach@678
|
16377 |
case 114:
|
jtulach@678
|
16378 |
case 82:
|
jtulach@678
|
16379 |
charsetState = 4;
|
jtulach@678
|
16380 |
continue;
|
jtulach@678
|
16381 |
default:charsetState = 0;
|
jtulach@678
|
16382 |
continue;
|
jtulach@678
|
16383 |
}
|
jtulach@678
|
16384 |
|
jtulach@678
|
16385 |
case 4:
|
jtulach@678
|
16386 |
switch (c) {
|
jtulach@678
|
16387 |
case 115:
|
jtulach@678
|
16388 |
case 83:
|
jtulach@678
|
16389 |
charsetState = 5;
|
jtulach@678
|
16390 |
continue;
|
jtulach@678
|
16391 |
default:charsetState = 0;
|
jtulach@678
|
16392 |
continue;
|
jtulach@678
|
16393 |
}
|
jtulach@678
|
16394 |
|
jtulach@678
|
16395 |
case 5:
|
jtulach@678
|
16396 |
switch (c) {
|
jtulach@678
|
16397 |
case 101:
|
jtulach@678
|
16398 |
case 69:
|
jtulach@678
|
16399 |
charsetState = 6;
|
jtulach@678
|
16400 |
continue;
|
jtulach@678
|
16401 |
default:charsetState = 0;
|
jtulach@678
|
16402 |
continue;
|
jtulach@678
|
16403 |
}
|
jtulach@678
|
16404 |
|
jtulach@678
|
16405 |
case 6:
|
jtulach@678
|
16406 |
switch (c) {
|
jtulach@678
|
16407 |
case 116:
|
jtulach@678
|
16408 |
case 84:
|
jtulach@678
|
16409 |
charsetState = 7;
|
jtulach@678
|
16410 |
continue;
|
jtulach@678
|
16411 |
default:charsetState = 0;
|
jtulach@678
|
16412 |
continue;
|
jtulach@678
|
16413 |
}
|
jtulach@678
|
16414 |
|
jtulach@678
|
16415 |
case 7:
|
jtulach@678
|
16416 |
switch (c) {
|
jtulach@678
|
16417 |
case 9:
|
jtulach@678
|
16418 |
case 10:
|
jtulach@678
|
16419 |
case 12:
|
jtulach@678
|
16420 |
case 13:
|
jtulach@678
|
16421 |
case 32:
|
jtulach@678
|
16422 |
continue;
|
jtulach@678
|
16423 |
case 61:
|
jtulach@678
|
16424 |
charsetState = 8;
|
jtulach@678
|
16425 |
continue;
|
jtulach@678
|
16426 |
default:return null;
|
jtulach@678
|
16427 |
}
|
jtulach@678
|
16428 |
|
jtulach@678
|
16429 |
case 8:
|
jtulach@678
|
16430 |
switch (c) {
|
jtulach@678
|
16431 |
case 9:
|
jtulach@678
|
16432 |
case 10:
|
jtulach@678
|
16433 |
case 12:
|
jtulach@678
|
16434 |
case 13:
|
jtulach@678
|
16435 |
case 32:
|
jtulach@678
|
16436 |
continue;
|
jtulach@678
|
16437 |
case 39:
|
jtulach@678
|
16438 |
start = i + 1;
|
jtulach@678
|
16439 |
charsetState = 9;
|
jtulach@678
|
16440 |
continue;
|
jtulach@678
|
16441 |
case 34:
|
jtulach@678
|
16442 |
start = i + 1;
|
jtulach@678
|
16443 |
charsetState = 10;
|
jtulach@678
|
16444 |
continue;
|
jtulach@678
|
16445 |
default:start = i;
|
jtulach@678
|
16446 |
charsetState = 11;
|
jtulach@678
|
16447 |
continue;
|
jtulach@678
|
16448 |
}
|
jtulach@678
|
16449 |
|
jtulach@678
|
16450 |
case 9:
|
jtulach@678
|
16451 |
switch (c) {
|
jtulach@678
|
16452 |
case 39:
|
jtulach@678
|
16453 |
end = i;
|
jtulach@678
|
16454 |
break charsetloop;
|
jtulach@678
|
16455 |
default:continue;
|
jtulach@678
|
16456 |
}
|
jtulach@678
|
16457 |
|
jtulach@678
|
16458 |
case 10:
|
jtulach@678
|
16459 |
switch (c) {
|
jtulach@678
|
16460 |
case 34:
|
jtulach@678
|
16461 |
end = i;
|
jtulach@678
|
16462 |
break charsetloop;
|
jtulach@678
|
16463 |
default:continue;
|
jtulach@678
|
16464 |
}
|
jtulach@678
|
16465 |
|
jtulach@678
|
16466 |
case 11:
|
jtulach@678
|
16467 |
switch (c) {
|
jtulach@678
|
16468 |
case 9:
|
jtulach@678
|
16469 |
case 10:
|
jtulach@678
|
16470 |
case 12:
|
jtulach@678
|
16471 |
case 13:
|
jtulach@678
|
16472 |
case 32:
|
jtulach@678
|
16473 |
case 59:
|
jtulach@678
|
16474 |
end = i;
|
jtulach@678
|
16475 |
break charsetloop;
|
jtulach@678
|
16476 |
default:continue;
|
jtulach@678
|
16477 |
}
|
jtulach@678
|
16478 |
|
jtulach@678
|
16479 |
}
|
jtulach@678
|
16480 |
}
|
jtulach@678
|
16481 |
charset = null;
|
jtulach@678
|
16482 |
if (start != -1) {
|
jtulach@678
|
16483 |
if (end == -1) {
|
jtulach@678
|
16484 |
end = buffer.length;
|
jtulach@678
|
16485 |
}
|
jtulach@678
|
16486 |
charset = valueOf_1(buffer, start, end - start);
|
jtulach@678
|
16487 |
}
|
jtulach@678
|
16488 |
return charset;
|
jtulach@678
|
16489 |
}
|
jtulach@678
|
16490 |
|
jtulach@678
|
16491 |
function getClass_57(){
|
jtulach@678
|
16492 |
return Lnu_validator_htmlparser_impl_TreeBuilder_2_classLit;
|
jtulach@678
|
16493 |
}
|
jtulach@678
|
16494 |
|
jtulach@678
|
16495 |
function TreeBuilder(){
|
jtulach@678
|
16496 |
}
|
jtulach@678
|
16497 |
|
jtulach@678
|
16498 |
_ = TreeBuilder.prototype = new Object_0();
|
jtulach@678
|
16499 |
_.getClass$ = getClass_57;
|
jtulach@678
|
16500 |
_.typeId$ = 0;
|
jtulach@678
|
16501 |
_.charBuffer = null;
|
jtulach@678
|
16502 |
_.charBufferLen = 0;
|
jtulach@678
|
16503 |
_.contextName = null;
|
jtulach@678
|
16504 |
_.contextNamespace = null;
|
jtulach@678
|
16505 |
_.currentPtr = -1;
|
jtulach@678
|
16506 |
_.foreignFlag = 1;
|
jtulach@678
|
16507 |
_.formPointer = null;
|
jtulach@678
|
16508 |
_.fragment = false;
|
jtulach@678
|
16509 |
_.headPointer = null;
|
jtulach@678
|
16510 |
_.html4 = false;
|
jtulach@678
|
16511 |
_.listOfActiveFormattingElements = null;
|
jtulach@678
|
16512 |
_.listPtr = -1;
|
jtulach@678
|
16513 |
_.mode = 0;
|
jtulach@678
|
16514 |
_.needToDropLF = false;
|
jtulach@678
|
16515 |
_.originalMode = 0;
|
jtulach@678
|
16516 |
_.quirks = false;
|
jtulach@678
|
16517 |
_.stack = null;
|
jtulach@678
|
16518 |
_.tokenizer = null;
|
jtulach@678
|
16519 |
_.wantingComments = false;
|
jtulach@678
|
16520 |
var HTML4_PUBLIC_IDS, ISINDEX_PROMPT, QUIRKY_PUBLIC_IDS;
|
jtulach@678
|
16521 |
function $clinit_88(){
|
jtulach@678
|
16522 |
$clinit_88 = nullMethod;
|
jtulach@678
|
16523 |
$clinit_98();
|
jtulach@678
|
16524 |
}
|
jtulach@678
|
16525 |
|
jtulach@678
|
16526 |
function $accumulateCharacters(this$static, buf, start, length){
|
jtulach@678
|
16527 |
var newBuf, newLen;
|
jtulach@678
|
16528 |
newLen = this$static.charBufferLen + length;
|
jtulach@678
|
16529 |
if (newLen > this$static.charBuffer.length) {
|
jtulach@678
|
16530 |
newBuf = initDim(_3C_classLit, 42, -1, newLen, 1);
|
jtulach@678
|
16531 |
arraycopy(this$static.charBuffer, 0, newBuf, 0, this$static.charBufferLen);
|
jtulach@678
|
16532 |
this$static.charBuffer = newBuf;
|
jtulach@678
|
16533 |
}
|
jtulach@678
|
16534 |
arraycopy(buf, start, this$static.charBuffer, this$static.charBufferLen, length);
|
jtulach@678
|
16535 |
this$static.charBufferLen = newLen;
|
jtulach@678
|
16536 |
}
|
jtulach@678
|
16537 |
|
jtulach@678
|
16538 |
function $insertFosterParentedCharacters_0(this$static, buf, start, length, table, stackParent){
|
jtulach@678
|
16539 |
var end;
|
jtulach@678
|
16540 |
$insertFosterParentedCharacters(this$static, (end = start + length , __checkBounds(buf.length, start, end) , __valueOf(buf, start, end)), table, stackParent);
|
jtulach@678
|
16541 |
}
|
jtulach@678
|
16542 |
|
jtulach@678
|
16543 |
function getClass_50(){
|
jtulach@678
|
16544 |
return Lnu_validator_htmlparser_impl_CoalescingTreeBuilder_2_classLit;
|
jtulach@678
|
16545 |
}
|
jtulach@678
|
16546 |
|
jtulach@678
|
16547 |
function CoalescingTreeBuilder(){
|
jtulach@678
|
16548 |
}
|
jtulach@678
|
16549 |
|
jtulach@678
|
16550 |
_ = CoalescingTreeBuilder.prototype = new TreeBuilder();
|
jtulach@678
|
16551 |
_.getClass$ = getClass_50;
|
jtulach@678
|
16552 |
_.typeId$ = 0;
|
jtulach@678
|
16553 |
function $clinit_82(){
|
jtulach@678
|
16554 |
$clinit_82 = nullMethod;
|
jtulach@678
|
16555 |
$clinit_88();
|
jtulach@678
|
16556 |
}
|
jtulach@678
|
16557 |
|
jtulach@678
|
16558 |
function $BrowserTreeBuilder(this$static, document_0){
|
jtulach@678
|
16559 |
$clinit_82();
|
jtulach@678
|
16560 |
this$static.doctypeExpectation = ($clinit_77() , HTML);
|
jtulach@678
|
16561 |
this$static.namePolicy = ($clinit_80() , ALTER_INFOSET);
|
jtulach@678
|
16562 |
this$static.idLocations = $HashMap(new HashMap());
|
jtulach@678
|
16563 |
this$static.fragment = false;
|
jtulach@678
|
16564 |
this$static.scriptStack = $LinkedList(new LinkedList());
|
jtulach@678
|
16565 |
this$static.document_0 = document_0;
|
jtulach@678
|
16566 |
installExplorerCreateElementNS(document_0);
|
jtulach@678
|
16567 |
return this$static;
|
jtulach@678
|
16568 |
}
|
jtulach@678
|
16569 |
|
jtulach@678
|
16570 |
function $addAttributesToElement(this$static, element, attributes){
|
jtulach@678
|
16571 |
var $e0, e, i, localName, uri;
|
jtulach@678
|
16572 |
try {
|
jtulach@678
|
16573 |
for (i = 0; i < attributes.length_0; ++i) {
|
jtulach@678
|
16574 |
localName = $getLocalName(attributes, i);
|
jtulach@678
|
16575 |
uri = $getURI(attributes, i);
|
jtulach@678
|
16576 |
if (!element.hasAttributeNS(uri, localName)) {
|
jtulach@678
|
16577 |
element.setAttributeNS(uri, localName, $getValue(attributes, i));
|
jtulach@678
|
16578 |
}
|
jtulach@678
|
16579 |
}
|
jtulach@678
|
16580 |
}
|
jtulach@678
|
16581 |
catch ($e0) {
|
jtulach@678
|
16582 |
$e0 = caught($e0);
|
jtulach@678
|
16583 |
if (instanceOf($e0, 19)) {
|
jtulach@678
|
16584 |
e = $e0;
|
jtulach@678
|
16585 |
$fatal_0(this$static, e);
|
jtulach@678
|
16586 |
}
|
jtulach@678
|
16587 |
else
|
jtulach@678
|
16588 |
throw $e0;
|
jtulach@678
|
16589 |
}
|
jtulach@678
|
16590 |
}
|
jtulach@678
|
16591 |
|
jtulach@678
|
16592 |
function $appendCharacters(this$static, parent, text){
|
jtulach@678
|
16593 |
var $e0, e;
|
jtulach@678
|
16594 |
try {
|
jtulach@678
|
16595 |
if (parent == this$static.placeholder) {
|
jtulach@678
|
16596 |
this$static.script.appendChild(this$static.document_0.createTextNode(text));
|
jtulach@678
|
16597 |
}
|
jtulach@678
|
16598 |
parent.appendChild(this$static.document_0.createTextNode(text));
|
jtulach@678
|
16599 |
}
|
jtulach@678
|
16600 |
catch ($e0) {
|
jtulach@678
|
16601 |
$e0 = caught($e0);
|
jtulach@678
|
16602 |
if (instanceOf($e0, 19)) {
|
jtulach@678
|
16603 |
e = $e0;
|
jtulach@678
|
16604 |
$fatal_0(this$static, e);
|
jtulach@678
|
16605 |
}
|
jtulach@678
|
16606 |
else
|
jtulach@678
|
16607 |
throw $e0;
|
jtulach@678
|
16608 |
}
|
jtulach@678
|
16609 |
}
|
jtulach@678
|
16610 |
|
jtulach@678
|
16611 |
function $appendChildrenToNewParent(this$static, oldParent, newParent){
|
jtulach@678
|
16612 |
var $e0, e;
|
jtulach@678
|
16613 |
try {
|
jtulach@678
|
16614 |
while (oldParent.hasChildNodes()) {
|
jtulach@678
|
16615 |
newParent.appendChild(oldParent.firstChild);
|
jtulach@678
|
16616 |
}
|
jtulach@678
|
16617 |
}
|
jtulach@678
|
16618 |
catch ($e0) {
|
jtulach@678
|
16619 |
$e0 = caught($e0);
|
jtulach@678
|
16620 |
if (instanceOf($e0, 19)) {
|
jtulach@678
|
16621 |
e = $e0;
|
jtulach@678
|
16622 |
$fatal_0(this$static, e);
|
jtulach@678
|
16623 |
}
|
jtulach@678
|
16624 |
else
|
jtulach@678
|
16625 |
throw $e0;
|
jtulach@678
|
16626 |
}
|
jtulach@678
|
16627 |
}
|
jtulach@678
|
16628 |
|
jtulach@678
|
16629 |
function $appendComment(this$static, parent, comment){
|
jtulach@678
|
16630 |
var $e0, e;
|
jtulach@678
|
16631 |
try {
|
jtulach@678
|
16632 |
if (parent == this$static.placeholder) {
|
jtulach@678
|
16633 |
this$static.script.appendChild(this$static.document_0.createComment(comment));
|
jtulach@678
|
16634 |
}
|
jtulach@678
|
16635 |
parent.appendChild(this$static.document_0.createComment(comment));
|
jtulach@678
|
16636 |
}
|
jtulach@678
|
16637 |
catch ($e0) {
|
jtulach@678
|
16638 |
$e0 = caught($e0);
|
jtulach@678
|
16639 |
if (instanceOf($e0, 19)) {
|
jtulach@678
|
16640 |
e = $e0;
|
jtulach@678
|
16641 |
$fatal_0(this$static, e);
|
jtulach@678
|
16642 |
}
|
jtulach@678
|
16643 |
else
|
jtulach@678
|
16644 |
throw $e0;
|
jtulach@678
|
16645 |
}
|
jtulach@678
|
16646 |
}
|
jtulach@678
|
16647 |
|
jtulach@678
|
16648 |
function $appendCommentToDocument(this$static, comment){
|
jtulach@678
|
16649 |
var $e0, e;
|
jtulach@678
|
16650 |
try {
|
jtulach@678
|
16651 |
this$static.document_0.appendChild(this$static.document_0.createComment(comment));
|
jtulach@678
|
16652 |
}
|
jtulach@678
|
16653 |
catch ($e0) {
|
jtulach@678
|
16654 |
$e0 = caught($e0);
|
jtulach@678
|
16655 |
if (instanceOf($e0, 19)) {
|
jtulach@678
|
16656 |
e = $e0;
|
jtulach@678
|
16657 |
$fatal_0(this$static, e);
|
jtulach@678
|
16658 |
}
|
jtulach@678
|
16659 |
else
|
jtulach@678
|
16660 |
throw $e0;
|
jtulach@678
|
16661 |
}
|
jtulach@678
|
16662 |
}
|
jtulach@678
|
16663 |
|
jtulach@678
|
16664 |
function $appendElement(this$static, child, newParent){
|
jtulach@678
|
16665 |
var $e0, e;
|
jtulach@678
|
16666 |
try {
|
jtulach@678
|
16667 |
if (newParent == this$static.placeholder) {
|
jtulach@678
|
16668 |
this$static.script.appendChild(child.cloneNode(true));
|
jtulach@678
|
16669 |
}
|
jtulach@678
|
16670 |
newParent.appendChild(child);
|
jtulach@678
|
16671 |
}
|
jtulach@678
|
16672 |
catch ($e0) {
|
jtulach@678
|
16673 |
$e0 = caught($e0);
|
jtulach@678
|
16674 |
if (instanceOf($e0, 19)) {
|
jtulach@678
|
16675 |
e = $e0;
|
jtulach@678
|
16676 |
$fatal_0(this$static, e);
|
jtulach@678
|
16677 |
}
|
jtulach@678
|
16678 |
else
|
jtulach@678
|
16679 |
throw $e0;
|
jtulach@678
|
16680 |
}
|
jtulach@678
|
16681 |
}
|
jtulach@678
|
16682 |
|
jtulach@678
|
16683 |
function $createElement(this$static, ns, name, attributes){
|
jtulach@678
|
16684 |
var $e0, e, i, rv;
|
jtulach@678
|
16685 |
try {
|
jtulach@678
|
16686 |
rv = this$static.document_0.createElementNS(ns, name);
|
jtulach@678
|
16687 |
for (i = 0; i < attributes.length_0; ++i) {
|
jtulach@678
|
16688 |
rv.setAttributeNS($getURI(attributes, i), $getLocalName(attributes, i), $getValue(attributes, i));
|
jtulach@678
|
16689 |
}
|
jtulach@678
|
16690 |
if ('script' == name) {
|
jtulach@678
|
16691 |
if (this$static.placeholder) {
|
jtulach@678
|
16692 |
$addLast(this$static.scriptStack, $BrowserTreeBuilder$ScriptHolder(new BrowserTreeBuilder$ScriptHolder(), this$static.script, this$static.placeholder));
|
jtulach@678
|
16693 |
}
|
jtulach@678
|
16694 |
this$static.script = rv;
|
jtulach@678
|
16695 |
this$static.placeholder = this$static.document_0.createElementNS('http://n.validator.nu/placeholder/', 'script');
|
jtulach@678
|
16696 |
rv = this$static.placeholder;
|
jtulach@678
|
16697 |
for (i = 0; i < attributes.length_0; ++i) {
|
jtulach@678
|
16698 |
rv.setAttributeNS($getURI(attributes, i), $getLocalName(attributes, i), $getValue(attributes, i));
|
jtulach@678
|
16699 |
}
|
jtulach@678
|
16700 |
}
|
jtulach@678
|
16701 |
return rv;
|
jtulach@678
|
16702 |
}
|
jtulach@678
|
16703 |
catch ($e0) {
|
jtulach@678
|
16704 |
$e0 = caught($e0);
|
jtulach@678
|
16705 |
if (instanceOf($e0, 19)) {
|
jtulach@678
|
16706 |
e = $e0;
|
jtulach@678
|
16707 |
$fatal_0(this$static, e);
|
jtulach@678
|
16708 |
throw $RuntimeException(new RuntimeException(), 'Unreachable');
|
jtulach@678
|
16709 |
}
|
jtulach@678
|
16710 |
else
|
jtulach@678
|
16711 |
throw $e0;
|
jtulach@678
|
16712 |
}
|
jtulach@678
|
16713 |
}
|
jtulach@678
|
16714 |
|
jtulach@678
|
16715 |
function $createElement_0(this$static, ns, name, attributes){
|
jtulach@678
|
16716 |
var $e0, e, rv;
|
jtulach@678
|
16717 |
try {
|
jtulach@678
|
16718 |
rv = $createElement(this$static, ns, name, attributes);
|
jtulach@678
|
16719 |
return rv;
|
jtulach@678
|
16720 |
}
|
jtulach@678
|
16721 |
catch ($e0) {
|
jtulach@678
|
16722 |
$e0 = caught($e0);
|
jtulach@678
|
16723 |
if (instanceOf($e0, 19)) {
|
jtulach@678
|
16724 |
e = $e0;
|
jtulach@678
|
16725 |
$fatal_0(this$static, e);
|
jtulach@678
|
16726 |
return null;
|
jtulach@678
|
16727 |
}
|
jtulach@678
|
16728 |
else
|
jtulach@678
|
16729 |
throw $e0;
|
jtulach@678
|
16730 |
}
|
jtulach@678
|
16731 |
}
|
jtulach@678
|
16732 |
|
jtulach@678
|
16733 |
function $createHtmlElementSetAsRoot(this$static, attributes){
|
jtulach@678
|
16734 |
var $e0, e, i, rv;
|
jtulach@678
|
16735 |
try {
|
jtulach@678
|
16736 |
rv = this$static.document_0.createElementNS('http://www.w3.org/1999/xhtml', 'html');
|
jtulach@678
|
16737 |
for (i = 0; i < attributes.length_0; ++i) {
|
jtulach@678
|
16738 |
rv.setAttributeNS($getURI(attributes, i), $getLocalName(attributes, i), $getValue(attributes, i));
|
jtulach@678
|
16739 |
}
|
jtulach@678
|
16740 |
this$static.document_0.appendChild(rv);
|
jtulach@678
|
16741 |
return rv;
|
jtulach@678
|
16742 |
}
|
jtulach@678
|
16743 |
catch ($e0) {
|
jtulach@678
|
16744 |
$e0 = caught($e0);
|
jtulach@678
|
16745 |
if (instanceOf($e0, 19)) {
|
jtulach@678
|
16746 |
e = $e0;
|
jtulach@678
|
16747 |
$fatal_0(this$static, e);
|
jtulach@678
|
16748 |
throw $RuntimeException(new RuntimeException(), 'Unreachable');
|
jtulach@678
|
16749 |
}
|
jtulach@678
|
16750 |
else
|
jtulach@678
|
16751 |
throw $e0;
|
jtulach@678
|
16752 |
}
|
jtulach@678
|
16753 |
}
|
jtulach@678
|
16754 |
|
jtulach@678
|
16755 |
function $detachFromParent(this$static, element){
|
jtulach@678
|
16756 |
var $e0, e, parent;
|
jtulach@678
|
16757 |
try {
|
jtulach@678
|
16758 |
parent = element.parentNode;
|
jtulach@678
|
16759 |
if (parent) {
|
jtulach@678
|
16760 |
parent.removeChild(element);
|
jtulach@678
|
16761 |
}
|
jtulach@678
|
16762 |
}
|
jtulach@678
|
16763 |
catch ($e0) {
|
jtulach@678
|
16764 |
$e0 = caught($e0);
|
jtulach@678
|
16765 |
if (instanceOf($e0, 19)) {
|
jtulach@678
|
16766 |
e = $e0;
|
jtulach@678
|
16767 |
$fatal_0(this$static, e);
|
jtulach@678
|
16768 |
}
|
jtulach@678
|
16769 |
else
|
jtulach@678
|
16770 |
throw $e0;
|
jtulach@678
|
16771 |
}
|
jtulach@678
|
16772 |
}
|
jtulach@678
|
16773 |
|
jtulach@678
|
16774 |
function $elementPopped(this$static, ns, name, node){
|
jtulach@678
|
16775 |
if (node == this$static.placeholder) {
|
jtulach@678
|
16776 |
this$static.readyToRun = true;
|
jtulach@678
|
16777 |
this$static.tokenizer.shouldSuspend = true;
|
jtulach@678
|
16778 |
}
|
jtulach@678
|
16779 |
__elementPopped__(ns, name, node);
|
jtulach@678
|
16780 |
}
|
jtulach@678
|
16781 |
|
jtulach@678
|
16782 |
function $getDocument(this$static){
|
jtulach@678
|
16783 |
var rv;
|
jtulach@678
|
16784 |
rv = this$static.document_0;
|
jtulach@678
|
16785 |
this$static.document_0 = null;
|
jtulach@678
|
16786 |
return rv;
|
jtulach@678
|
16787 |
}
|
jtulach@678
|
16788 |
|
jtulach@678
|
16789 |
function $insertFosterParentedCharacters(this$static, text, table, stackParent){
|
jtulach@678
|
16790 |
var $e0, child, e, parent;
|
jtulach@678
|
16791 |
try {
|
jtulach@678
|
16792 |
child = this$static.document_0.createTextNode(text);
|
jtulach@678
|
16793 |
parent = table.parentNode;
|
jtulach@678
|
16794 |
if (!!parent && parent.nodeType == 1) {
|
jtulach@678
|
16795 |
parent.insertBefore(child, table);
|
jtulach@678
|
16796 |
}
|
jtulach@678
|
16797 |
else {
|
jtulach@678
|
16798 |
stackParent.appendChild(child);
|
jtulach@678
|
16799 |
}
|
jtulach@678
|
16800 |
}
|
jtulach@678
|
16801 |
catch ($e0) {
|
jtulach@678
|
16802 |
$e0 = caught($e0);
|
jtulach@678
|
16803 |
if (instanceOf($e0, 19)) {
|
jtulach@678
|
16804 |
e = $e0;
|
jtulach@678
|
16805 |
$fatal_0(this$static, e);
|
jtulach@678
|
16806 |
}
|
jtulach@678
|
16807 |
else
|
jtulach@678
|
16808 |
throw $e0;
|
jtulach@678
|
16809 |
}
|
jtulach@678
|
16810 |
}
|
jtulach@678
|
16811 |
|
jtulach@678
|
16812 |
function $insertFosterParentedChild(this$static, child, table, stackParent){
|
jtulach@678
|
16813 |
var $e0, e, parent;
|
jtulach@678
|
16814 |
parent = table.parentNode;
|
jtulach@678
|
16815 |
try {
|
jtulach@678
|
16816 |
if (!!parent && parent.nodeType == 1) {
|
jtulach@678
|
16817 |
parent.insertBefore(child, table);
|
jtulach@678
|
16818 |
}
|
jtulach@678
|
16819 |
else {
|
jtulach@678
|
16820 |
stackParent.appendChild(child);
|
jtulach@678
|
16821 |
}
|
jtulach@678
|
16822 |
}
|
jtulach@678
|
16823 |
catch ($e0) {
|
jtulach@678
|
16824 |
$e0 = caught($e0);
|
jtulach@678
|
16825 |
if (instanceOf($e0, 19)) {
|
jtulach@678
|
16826 |
e = $e0;
|
jtulach@678
|
16827 |
$fatal_0(this$static, e);
|
jtulach@678
|
16828 |
}
|
jtulach@678
|
16829 |
else
|
jtulach@678
|
16830 |
throw $e0;
|
jtulach@678
|
16831 |
}
|
jtulach@678
|
16832 |
}
|
jtulach@678
|
16833 |
|
jtulach@678
|
16834 |
function $maybeRunScript(this$static){
|
jtulach@678
|
16835 |
var scriptHolder;
|
jtulach@678
|
16836 |
if (this$static.readyToRun) {
|
jtulach@678
|
16837 |
this$static.readyToRun = false;
|
jtulach@678
|
16838 |
replace_0(this$static.placeholder, this$static.script);
|
jtulach@678
|
16839 |
if (this$static.scriptStack.size == 0) {
|
jtulach@678
|
16840 |
this$static.script = null;
|
jtulach@678
|
16841 |
this$static.placeholder = null;
|
jtulach@678
|
16842 |
}
|
jtulach@678
|
16843 |
else {
|
jtulach@678
|
16844 |
scriptHolder = dynamicCast($removeLast(this$static.scriptStack), 20);
|
jtulach@678
|
16845 |
this$static.script = scriptHolder.script;
|
jtulach@678
|
16846 |
this$static.placeholder = scriptHolder.placeholder;
|
jtulach@678
|
16847 |
}
|
jtulach@678
|
16848 |
}
|
jtulach@678
|
16849 |
}
|
jtulach@678
|
16850 |
|
jtulach@678
|
16851 |
function getClass_45(){
|
jtulach@678
|
16852 |
return Lnu_validator_htmlparser_gwt_BrowserTreeBuilder_2_classLit;
|
jtulach@678
|
16853 |
}
|
jtulach@678
|
16854 |
|
jtulach@678
|
16855 |
function installExplorerCreateElementNS(doc){
|
jtulach@678
|
16856 |
if (!doc.createElementNS) {
|
jtulach@678
|
16857 |
doc.createElementNS = function(uri, local){
|
jtulach@678
|
16858 |
if ('http://www.w3.org/1999/xhtml' == uri) {
|
jtulach@678
|
16859 |
return doc.createElement(local);
|
jtulach@678
|
16860 |
}
|
jtulach@678
|
16861 |
else if ('http://www.w3.org/1998/Math/MathML' == uri) {
|
jtulach@678
|
16862 |
if (!doc.mathplayerinitialized) {
|
jtulach@678
|
16863 |
var obj = document.createElement('object');
|
jtulach@678
|
16864 |
obj.setAttribute('id', 'mathplayer');
|
jtulach@678
|
16865 |
obj.setAttribute('classid', 'clsid:32F66A20-7614-11D4-BD11-00104BD3F987');
|
jtulach@678
|
16866 |
document.getElementsByTagName('head')[0].appendChild(obj);
|
jtulach@678
|
16867 |
document.namespaces.add('m', 'http://www.w3.org/1998/Math/MathML', '#mathplayer');
|
jtulach@678
|
16868 |
doc.mathplayerinitialized = true;
|
jtulach@678
|
16869 |
}
|
jtulach@678
|
16870 |
return doc.createElement('m:' + local);
|
jtulach@678
|
16871 |
}
|
jtulach@678
|
16872 |
else if ('http://www.w3.org/2000/svg' == uri) {
|
jtulach@678
|
16873 |
if (!doc.renesisinitialized) {
|
jtulach@678
|
16874 |
var obj = document.createElement('object');
|
jtulach@678
|
16875 |
obj.setAttribute('id', 'renesis');
|
jtulach@678
|
16876 |
obj.setAttribute('classid', 'clsid:AC159093-1683-4BA2-9DCF-0C350141D7F2');
|
jtulach@678
|
16877 |
document.getElementsByTagName('head')[0].appendChild(obj);
|
jtulach@678
|
16878 |
document.namespaces.add('s', 'http://www.w3.org/2000/svg', '#renesis');
|
jtulach@678
|
16879 |
doc.renesisinitialized = true;
|
jtulach@678
|
16880 |
}
|
jtulach@678
|
16881 |
return doc.createElement('s:' + local);
|
jtulach@678
|
16882 |
}
|
jtulach@678
|
16883 |
else {
|
jtulach@678
|
16884 |
}
|
jtulach@678
|
16885 |
}
|
jtulach@678
|
16886 |
;
|
jtulach@678
|
16887 |
}
|
jtulach@678
|
16888 |
}
|
jtulach@678
|
16889 |
|
jtulach@678
|
16890 |
function replace_0(oldNode, newNode){
|
jtulach@678
|
16891 |
oldNode.parentNode.replaceChild(newNode, oldNode);
|
jtulach@678
|
16892 |
__elementPopped__('', newNode.nodeName, newNode);
|
jtulach@678
|
16893 |
}
|
jtulach@678
|
16894 |
|
jtulach@678
|
16895 |
function BrowserTreeBuilder(){
|
jtulach@678
|
16896 |
}
|
jtulach@678
|
16897 |
|
jtulach@678
|
16898 |
_ = BrowserTreeBuilder.prototype = new CoalescingTreeBuilder();
|
jtulach@678
|
16899 |
_.getClass$ = getClass_45;
|
jtulach@678
|
16900 |
_.typeId$ = 0;
|
jtulach@678
|
16901 |
_.document_0 = null;
|
jtulach@678
|
16902 |
_.placeholder = null;
|
jtulach@678
|
16903 |
_.readyToRun = false;
|
jtulach@678
|
16904 |
_.script = null;
|
jtulach@678
|
16905 |
function $BrowserTreeBuilder$ScriptHolder(this$static, script, placeholder){
|
jtulach@678
|
16906 |
this$static.script = script;
|
jtulach@678
|
16907 |
this$static.placeholder = placeholder;
|
jtulach@678
|
16908 |
return this$static;
|
jtulach@678
|
16909 |
}
|
jtulach@678
|
16910 |
|
jtulach@678
|
16911 |
function getClass_44(){
|
jtulach@678
|
16912 |
return Lnu_validator_htmlparser_gwt_BrowserTreeBuilder$ScriptHolder_2_classLit;
|
jtulach@678
|
16913 |
}
|
jtulach@678
|
16914 |
|
jtulach@678
|
16915 |
function BrowserTreeBuilder$ScriptHolder(){
|
jtulach@678
|
16916 |
}
|
jtulach@678
|
16917 |
|
jtulach@678
|
16918 |
_ = BrowserTreeBuilder$ScriptHolder.prototype = new Object_0();
|
jtulach@678
|
16919 |
_.getClass$ = getClass_44;
|
jtulach@678
|
16920 |
_.typeId$ = 34;
|
jtulach@678
|
16921 |
_.placeholder = null;
|
jtulach@678
|
16922 |
_.script = null;
|
jtulach@678
|
16923 |
function $HtmlParser(this$static, document_0){
|
jtulach@678
|
16924 |
this$static.documentWriteBuffer = $StringBuilder(new StringBuilder());
|
jtulach@678
|
16925 |
this$static.bufferStack = $LinkedList(new LinkedList());
|
jtulach@678
|
16926 |
this$static.domTreeBuilder = $BrowserTreeBuilder(new BrowserTreeBuilder(), document_0);
|
jtulach@678
|
16927 |
this$static.tokenizer = $ErrorReportingTokenizer(new ErrorReportingTokenizer(), this$static.domTreeBuilder);
|
jtulach@678
|
16928 |
this$static.domTreeBuilder.namePolicy = ($clinit_80() , ALTER_INFOSET);
|
jtulach@678
|
16929 |
this$static.tokenizer.commentPolicy = ALTER_INFOSET;
|
jtulach@678
|
16930 |
this$static.tokenizer.contentNonXmlCharPolicy = ALTER_INFOSET;
|
jtulach@678
|
16931 |
this$static.tokenizer.contentSpacePolicy = ALTER_INFOSET;
|
jtulach@678
|
16932 |
this$static.tokenizer.namePolicy = ALTER_INFOSET;
|
jtulach@678
|
16933 |
$setXmlnsPolicy(this$static.tokenizer, ALTER_INFOSET);
|
jtulach@678
|
16934 |
return this$static;
|
jtulach@678
|
16935 |
}
|
jtulach@678
|
16936 |
|
jtulach@678
|
16937 |
function $parse(this$static, source, useSetTimeouts, callback){
|
jtulach@678
|
16938 |
this$static.parseEndListener = callback;
|
jtulach@678
|
16939 |
$setFragmentContext(this$static.domTreeBuilder, null);
|
jtulach@678
|
16940 |
this$static.lastWasCR = false;
|
jtulach@678
|
16941 |
this$static.ending = false;
|
jtulach@678
|
16942 |
$setLength(this$static.documentWriteBuffer, 0);
|
jtulach@678
|
16943 |
this$static.streamLength = source.length;
|
jtulach@678
|
16944 |
this$static.stream = $UTF16Buffer(new UTF16Buffer(), $toCharArray(source), 0, this$static.streamLength < 512?this$static.streamLength:512);
|
jtulach@678
|
16945 |
$clear(this$static.bufferStack);
|
jtulach@678
|
16946 |
$addLast(this$static.bufferStack, this$static.stream);
|
jtulach@678
|
16947 |
$setFragmentContext(this$static.domTreeBuilder, null);
|
jtulach@678
|
16948 |
$start_0(this$static.tokenizer);
|
jtulach@678
|
16949 |
$pump(this$static, useSetTimeouts);
|
jtulach@678
|
16950 |
}
|
jtulach@678
|
16951 |
|
jtulach@678
|
16952 |
function $pump(this$static, useSetTimeouts){
|
jtulach@678
|
16953 |
var $e0, buffer, docWriteLen, newBuf, newEnd, timer;
|
jtulach@678
|
16954 |
if (this$static.ending) {
|
jtulach@678
|
16955 |
$end(this$static.tokenizer);
|
jtulach@678
|
16956 |
$getDocument(this$static.domTreeBuilder);
|
jtulach@678
|
16957 |
this$static.parseEndListener.callback();
|
jtulach@678
|
16958 |
return;
|
jtulach@678
|
16959 |
}
|
jtulach@678
|
16960 |
docWriteLen = this$static.documentWriteBuffer.stringLength;
|
jtulach@678
|
16961 |
if (docWriteLen > 0) {
|
jtulach@678
|
16962 |
newBuf = initDim(_3C_classLit, 42, -1, docWriteLen, 1);
|
jtulach@678
|
16963 |
$getChars(this$static.documentWriteBuffer, 0, docWriteLen, newBuf, 0);
|
jtulach@678
|
16964 |
$addLast(this$static.bufferStack, $UTF16Buffer(new UTF16Buffer(), newBuf, 0, docWriteLen));
|
jtulach@678
|
16965 |
$setLength(this$static.documentWriteBuffer, 0);
|
jtulach@678
|
16966 |
}
|
jtulach@678
|
16967 |
for (;;) {
|
jtulach@678
|
16968 |
buffer = dynamicCast($getLast(this$static.bufferStack), 21);
|
jtulach@678
|
16969 |
if (buffer.start >= buffer.end) {
|
jtulach@678
|
16970 |
if (buffer == this$static.stream) {
|
jtulach@678
|
16971 |
if (buffer.end == this$static.streamLength) {
|
jtulach@678
|
16972 |
$eof(this$static.tokenizer);
|
jtulach@678
|
16973 |
this$static.ending = true;
|
jtulach@678
|
16974 |
break;
|
jtulach@678
|
16975 |
}
|
jtulach@678
|
16976 |
else {
|
jtulach@678
|
16977 |
newEnd = buffer.start + 512;
|
jtulach@678
|
16978 |
buffer.end = newEnd < this$static.streamLength?newEnd:this$static.streamLength;
|
jtulach@678
|
16979 |
continue;
|
jtulach@678
|
16980 |
}
|
jtulach@678
|
16981 |
}
|
jtulach@678
|
16982 |
else {
|
jtulach@678
|
16983 |
dynamicCast($removeLast(this$static.bufferStack), 21);
|
jtulach@678
|
16984 |
continue;
|
jtulach@678
|
16985 |
}
|
jtulach@678
|
16986 |
}
|
jtulach@678
|
16987 |
$adjust(buffer, this$static.lastWasCR);
|
jtulach@678
|
16988 |
this$static.lastWasCR = false;
|
jtulach@678
|
16989 |
if (buffer.start < buffer.end) {
|
jtulach@678
|
16990 |
this$static.lastWasCR = $tokenizeBuffer(this$static.tokenizer, buffer);
|
jtulach@678
|
16991 |
$maybeRunScript(this$static.domTreeBuilder);
|
jtulach@678
|
16992 |
break;
|
jtulach@678
|
16993 |
}
|
jtulach@678
|
16994 |
else {
|
jtulach@678
|
16995 |
continue;
|
jtulach@678
|
16996 |
}
|
jtulach@678
|
16997 |
}
|
jtulach@678
|
16998 |
if (useSetTimeouts) {
|
jtulach@678
|
16999 |
timer = $HtmlParser$1(new HtmlParser$1(), this$static);
|
jtulach@678
|
17000 |
$schedule(timer, 1);
|
jtulach@678
|
17001 |
}
|
jtulach@678
|
17002 |
else {
|
jtulach@678
|
17003 |
try {
|
jtulach@678
|
17004 |
$pump(this$static, false);
|
jtulach@678
|
17005 |
}
|
jtulach@678
|
17006 |
catch ($e0) {
|
jtulach@678
|
17007 |
$e0 = caught($e0);
|
jtulach@678
|
17008 |
if (instanceOf($e0, 22)) {
|
jtulach@678
|
17009 |
this$static.ending = true;
|
jtulach@678
|
17010 |
}
|
jtulach@678
|
17011 |
else
|
jtulach@678
|
17012 |
throw $e0;
|
jtulach@678
|
17013 |
}
|
jtulach@678
|
17014 |
}
|
jtulach@678
|
17015 |
}
|
jtulach@678
|
17016 |
|
jtulach@678
|
17017 |
function documentWrite(text){
|
jtulach@678
|
17018 |
var buffer;
|
jtulach@678
|
17019 |
buffer = $UTF16Buffer(new UTF16Buffer(), $toCharArray(text), 0, text.length);
|
jtulach@678
|
17020 |
while (buffer.start < buffer.end) {
|
jtulach@678
|
17021 |
$adjust(buffer, this.lastWasCR);
|
jtulach@678
|
17022 |
this.lastWasCR = false;
|
jtulach@678
|
17023 |
if (buffer.start < buffer.end) {
|
jtulach@678
|
17024 |
this.lastWasCR = $tokenizeBuffer(this.tokenizer, buffer);
|
jtulach@678
|
17025 |
$maybeRunScript(this.domTreeBuilder);
|
jtulach@678
|
17026 |
}
|
jtulach@678
|
17027 |
}
|
jtulach@678
|
17028 |
}
|
jtulach@678
|
17029 |
|
jtulach@678
|
17030 |
function getClass_47(){
|
jtulach@678
|
17031 |
return Lnu_validator_htmlparser_gwt_HtmlParser_2_classLit;
|
jtulach@678
|
17032 |
}
|
jtulach@678
|
17033 |
|
jtulach@678
|
17034 |
function HtmlParser(){
|
jtulach@678
|
17035 |
}
|
jtulach@678
|
17036 |
|
jtulach@678
|
17037 |
_ = HtmlParser.prototype = new Object_0();
|
jtulach@678
|
17038 |
_.documentWrite = documentWrite;
|
jtulach@678
|
17039 |
_.getClass$ = getClass_47;
|
jtulach@678
|
17040 |
_.typeId$ = 0;
|
jtulach@678
|
17041 |
_.domTreeBuilder = null;
|
jtulach@678
|
17042 |
_.ending = false;
|
jtulach@678
|
17043 |
_.lastWasCR = false;
|
jtulach@678
|
17044 |
_.parseEndListener = null;
|
jtulach@678
|
17045 |
_.stream = null;
|
jtulach@678
|
17046 |
_.streamLength = 0;
|
jtulach@678
|
17047 |
_.tokenizer = null;
|
jtulach@678
|
17048 |
function $clinit_83(){
|
jtulach@678
|
17049 |
$clinit_83 = nullMethod;
|
jtulach@678
|
17050 |
$clinit_12();
|
jtulach@678
|
17051 |
}
|
jtulach@678
|
17052 |
|
jtulach@678
|
17053 |
function $HtmlParser$1(this$static, this$0){
|
jtulach@678
|
17054 |
$clinit_83();
|
jtulach@678
|
17055 |
this$static.this$0 = this$0;
|
jtulach@678
|
17056 |
return this$static;
|
jtulach@678
|
17057 |
}
|
jtulach@678
|
17058 |
|
jtulach@678
|
17059 |
function $run(this$static){
|
jtulach@678
|
17060 |
var $e0;
|
jtulach@678
|
17061 |
// try {
|
jtulach@678
|
17062 |
$pump(this$static.this$0, true);
|
jtulach@678
|
17063 |
/*}
|
jtulach@678
|
17064 |
catch ($e0) {
|
jtulach@678
|
17065 |
$e0 = caught($e0);
|
jtulach@678
|
17066 |
if (instanceOf($e0, 22)) {
|
jtulach@678
|
17067 |
this$static.this$0.ending = true;
|
jtulach@678
|
17068 |
}
|
jtulach@678
|
17069 |
else
|
jtulach@678
|
17070 |
throw $e0;
|
jtulach@678
|
17071 |
} */
|
jtulach@678
|
17072 |
}
|
jtulach@678
|
17073 |
|
jtulach@678
|
17074 |
function getClass_46(){
|
jtulach@678
|
17075 |
return Lnu_validator_htmlparser_gwt_HtmlParser$1_2_classLit;
|
jtulach@678
|
17076 |
}
|
jtulach@678
|
17077 |
|
jtulach@678
|
17078 |
function HtmlParser$1(){
|
jtulach@678
|
17079 |
}
|
jtulach@678
|
17080 |
|
jtulach@678
|
17081 |
_ = HtmlParser$1.prototype = new Timer();
|
jtulach@678
|
17082 |
_.getClass$ = getClass_46;
|
jtulach@678
|
17083 |
_.typeId$ = 35;
|
jtulach@678
|
17084 |
_.this$0 = null;
|
jtulach@678
|
17085 |
function installDocWrite(doc, parser){
|
jtulach@678
|
17086 |
doc.write = function(){
|
jtulach@678
|
17087 |
if (arguments.length == 0) {
|
jtulach@678
|
17088 |
return;
|
jtulach@678
|
17089 |
}
|
jtulach@678
|
17090 |
var text = arguments[0];
|
jtulach@678
|
17091 |
for (var i = 1; i < arguments.length; i++) {
|
jtulach@678
|
17092 |
text += arguments[i];
|
jtulach@678
|
17093 |
}
|
jtulach@678
|
17094 |
parser.documentWrite(text);
|
jtulach@678
|
17095 |
}
|
jtulach@678
|
17096 |
;
|
jtulach@678
|
17097 |
doc.writeln = function(){
|
jtulach@678
|
17098 |
if (arguments.length == 0) {
|
jtulach@678
|
17099 |
parser.documentWrite('\n');
|
jtulach@678
|
17100 |
return;
|
jtulach@678
|
17101 |
}
|
jtulach@678
|
17102 |
var text = arguments[0];
|
jtulach@678
|
17103 |
for (var i = 1; i < arguments.length; i++) {
|
jtulach@678
|
17104 |
text += arguments[i];
|
jtulach@678
|
17105 |
}
|
jtulach@678
|
17106 |
text += '\n';
|
jtulach@678
|
17107 |
parser.documentWrite(text);
|
jtulach@678
|
17108 |
}
|
jtulach@678
|
17109 |
;
|
jtulach@678
|
17110 |
}
|
jtulach@678
|
17111 |
|
jtulach@678
|
17112 |
function parseHtmlDocument(source, document_0, useSetTimeouts, readyCallback, errorHandler){
|
jtulach@678
|
17113 |
var parser;
|
jtulach@678
|
17114 |
if (!readyCallback) {
|
jtulach@678
|
17115 |
readyCallback = createFunction();
|
jtulach@678
|
17116 |
}
|
jtulach@678
|
17117 |
zapChildren(document_0);
|
jtulach@678
|
17118 |
parser = $HtmlParser(new HtmlParser(), document_0);
|
jtulach@678
|
17119 |
installDocWrite(document_0, parser);
|
jtulach@678
|
17120 |
$parse(parser, source, useSetTimeouts, $ParseEndListener(new ParseEndListener(), readyCallback));
|
jtulach@678
|
17121 |
}
|
jtulach@678
|
17122 |
|
jtulach@678
|
17123 |
function zapChildren(node){
|
jtulach@678
|
17124 |
while (node.hasChildNodes()) {
|
jtulach@678
|
17125 |
node.removeChild(node.lastChild);
|
jtulach@678
|
17126 |
}
|
jtulach@678
|
17127 |
}
|
jtulach@678
|
17128 |
|
jtulach@678
|
17129 |
function $ParseEndListener(this$static, callback){
|
jtulach@678
|
17130 |
this$static.callback = callback;
|
jtulach@678
|
17131 |
return this$static;
|
jtulach@678
|
17132 |
}
|
jtulach@678
|
17133 |
|
jtulach@678
|
17134 |
function getClass_48(){
|
jtulach@678
|
17135 |
return Lnu_validator_htmlparser_gwt_ParseEndListener_2_classLit;
|
jtulach@678
|
17136 |
}
|
jtulach@678
|
17137 |
|
jtulach@678
|
17138 |
function ParseEndListener(){
|
jtulach@678
|
17139 |
}
|
jtulach@678
|
17140 |
|
jtulach@678
|
17141 |
_ = ParseEndListener.prototype = new Object_0();
|
jtulach@678
|
17142 |
_.getClass$ = getClass_48;
|
jtulach@678
|
17143 |
_.typeId$ = 0;
|
jtulach@678
|
17144 |
_.callback = null;
|
jtulach@678
|
17145 |
function $clinit_87(){
|
jtulach@678
|
17146 |
var arr_32;
|
jtulach@678
|
17147 |
$clinit_87 = nullMethod;
|
jtulach@678
|
17148 |
ALL_NO_NS = initValues(_3Ljava_lang_String_2_classLit, 48, 1, ['', '', '', '']);
|
jtulach@678
|
17149 |
XMLNS_NS = initValues(_3Ljava_lang_String_2_classLit, 48, 1, ['', 'http://www.w3.org/2000/xmlns/', 'http://www.w3.org/2000/xmlns/', '']);
|
jtulach@678
|
17150 |
XML_NS = initValues(_3Ljava_lang_String_2_classLit, 48, 1, ['', 'http://www.w3.org/XML/1998/namespace', 'http://www.w3.org/XML/1998/namespace', '']);
|
jtulach@678
|
17151 |
XLINK_NS = initValues(_3Ljava_lang_String_2_classLit, 48, 1, ['', 'http://www.w3.org/1999/xlink', 'http://www.w3.org/1999/xlink', '']);
|
jtulach@678
|
17152 |
LANG_NS = initValues(_3Ljava_lang_String_2_classLit, 48, 1, ['', '', '', 'http://www.w3.org/XML/1998/namespace']);
|
jtulach@678
|
17153 |
ALL_NO_PREFIX = initValues(_3Ljava_lang_String_2_classLit, 48, 1, [null, null, null, null]);
|
jtulach@678
|
17154 |
XMLNS_PREFIX = initValues(_3Ljava_lang_String_2_classLit, 48, 1, [null, 'xmlns', 'xmlns', null]);
|
jtulach@678
|
17155 |
XLINK_PREFIX = initValues(_3Ljava_lang_String_2_classLit, 48, 1, [null, 'xlink', 'xlink', null]);
|
jtulach@678
|
17156 |
XML_PREFIX = initValues(_3Ljava_lang_String_2_classLit, 48, 1, [null, 'xml', 'xml', null]);
|
jtulach@678
|
17157 |
LANG_PREFIX = initValues(_3Ljava_lang_String_2_classLit, 48, 1, [null, null, null, 'xml']);
|
jtulach@678
|
17158 |
ALL_NCNAME = initValues(_3Z_classLit, 0, -1, [true, true, true, true]);
|
jtulach@678
|
17159 |
ALL_NO_NCNAME = initValues(_3Z_classLit, 0, -1, [false, false, false, false]);
|
jtulach@678
|
17160 |
D = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('d'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17161 |
K = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('k'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17162 |
R = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('r'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17163 |
X = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('x'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17164 |
Y = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('y'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17165 |
Z = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('z'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17166 |
BY = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('by'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17167 |
CX = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('cx'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17168 |
CY = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('cy'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17169 |
DX = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('dx'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17170 |
DY = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('dy'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17171 |
G2 = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('g2'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17172 |
G1 = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('g1'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17173 |
FX = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('fx'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17174 |
FY = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('fy'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17175 |
K4 = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('k4'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17176 |
K2 = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('k2'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17177 |
K3 = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('k3'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17178 |
K1 = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('k1'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17179 |
ID = $AttributeName_0(new AttributeName(), ALL_NO_NS, SAME_LOCAL('id'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17180 |
IN = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('in'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17181 |
U2 = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('u2'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17182 |
U1 = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('u1'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17183 |
RT = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('rt'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17184 |
RX = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('rx'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17185 |
RY = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('ry'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17186 |
TO = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('to'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17187 |
Y2 = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('y2'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17188 |
Y1 = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('y1'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17189 |
X1 = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('x1'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17190 |
X2 = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('x2'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17191 |
ALT = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('alt'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17192 |
DIR = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('dir'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17193 |
DUR = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('dur'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17194 |
END = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('end'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17195 |
FOR = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('for'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17196 |
IN2 = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('in2'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17197 |
MAX = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('max'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17198 |
MIN = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('min'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17199 |
LOW = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('low'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17200 |
REL = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('rel'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17201 |
REV = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('rev'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17202 |
SRC = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('src'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17203 |
AXIS = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('axis'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17204 |
ABBR = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('abbr'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17205 |
BBOX = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('bbox'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17206 |
CITE = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('cite'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17207 |
CODE = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('code'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17208 |
BIAS = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('bias'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17209 |
COLS = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('cols'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17210 |
CLIP = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('clip'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17211 |
CHAR = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('char'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17212 |
BASE = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('base'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17213 |
EDGE = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('edge'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17214 |
DATA = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('data'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17215 |
FILL = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('fill'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17216 |
FROM = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('from'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17217 |
FORM = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('form'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17218 |
FACE = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('face'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17219 |
HIGH = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('high'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17220 |
HREF = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('href'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17221 |
OPEN = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('open'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17222 |
ICON = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('icon'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17223 |
NAME = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('name'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17224 |
MODE = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('mode'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17225 |
MASK = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('mask'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17226 |
LINK = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('link'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17227 |
LANG = $AttributeName(new AttributeName(), LANG_NS, SAME_LOCAL('lang'), LANG_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17228 |
LIST = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('list'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17229 |
TYPE = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('type'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17230 |
WHEN = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('when'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17231 |
WRAP = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('wrap'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17232 |
TEXT = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('text'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17233 |
PATH = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('path'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17234 |
PING = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('ping'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17235 |
REFX = $AttributeName(new AttributeName(), ALL_NO_NS, SVG_DIFFERENT('refx', 'refX'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17236 |
REFY = $AttributeName(new AttributeName(), ALL_NO_NS, SVG_DIFFERENT('refy', 'refY'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17237 |
SIZE = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('size'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17238 |
SEED = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('seed'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17239 |
ROWS = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('rows'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17240 |
SPAN = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('span'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17241 |
STEP = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('step'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17242 |
ROLE = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('role'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17243 |
XREF = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('xref'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17244 |
ASYNC = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('async'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17245 |
ALINK = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('alink'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17246 |
ALIGN = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('align'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17247 |
CLOSE = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('close'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17248 |
COLOR = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('color'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17249 |
CLASS = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('class'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17250 |
CLEAR = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('clear'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17251 |
BEGIN = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('begin'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17252 |
DEPTH = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('depth'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17253 |
DEFER = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('defer'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17254 |
FENCE = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('fence'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17255 |
FRAME = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('frame'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17256 |
ISMAP = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('ismap'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17257 |
ONEND = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('onend'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17258 |
INDEX = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('index'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17259 |
ORDER = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('order'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17260 |
OTHER = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('other'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17261 |
ONCUT = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('oncut'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17262 |
NARGS = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('nargs'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17263 |
MEDIA = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('media'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17264 |
LABEL = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('label'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17265 |
LOCAL = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('local'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17266 |
WIDTH = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('width'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17267 |
TITLE = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('title'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17268 |
VLINK = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('vlink'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17269 |
VALUE = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('value'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17270 |
SLOPE = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('slope'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17271 |
SHAPE = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('shape'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17272 |
SCOPE = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('scope'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17273 |
SCALE = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('scale'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17274 |
SPEED = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('speed'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17275 |
STYLE = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('style'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17276 |
RULES = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('rules'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17277 |
STEMH = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('stemh'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17278 |
STEMV = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('stemv'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17279 |
START = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('start'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17280 |
XMLNS = $AttributeName(new AttributeName(), XMLNS_NS, SAME_LOCAL('xmlns'), ALL_NO_PREFIX, initValues(_3Z_classLit, 0, -1, [false, false, false, false]), true);
|
jtulach@678
|
17281 |
ACCEPT = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('accept'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17282 |
ACCENT = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('accent'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17283 |
ASCENT = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('ascent'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17284 |
ACTIVE = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('active'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17285 |
ALTIMG = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('altimg'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17286 |
ACTION = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('action'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17287 |
BORDER = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('border'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17288 |
CURSOR = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('cursor'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17289 |
COORDS = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('coords'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17290 |
FILTER = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('filter'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17291 |
FORMAT = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('format'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17292 |
HIDDEN = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('hidden'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17293 |
HSPACE = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('hspace'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17294 |
HEIGHT = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('height'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17295 |
ONMOVE = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('onmove'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17296 |
ONLOAD = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('onload'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17297 |
ONDRAG = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('ondrag'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17298 |
ORIGIN = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('origin'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17299 |
ONZOOM = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('onzoom'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17300 |
ONHELP = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('onhelp'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17301 |
ONSTOP = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('onstop'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17302 |
ONDROP = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('ondrop'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17303 |
ONBLUR = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('onblur'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17304 |
OBJECT = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('object'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17305 |
OFFSET = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('offset'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17306 |
ORIENT = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('orient'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17307 |
ONCOPY = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('oncopy'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17308 |
NOWRAP = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('nowrap'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17309 |
NOHREF = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('nohref'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17310 |
MACROS = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('macros'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17311 |
METHOD = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('method'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17312 |
LOWSRC = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('lowsrc'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17313 |
LSPACE = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('lspace'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17314 |
LQUOTE = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('lquote'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17315 |
USEMAP = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('usemap'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17316 |
WIDTHS = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('widths'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17317 |
TARGET = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('target'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17318 |
VALUES = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('values'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17319 |
VALIGN = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('valign'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17320 |
VSPACE = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('vspace'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17321 |
POSTER = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('poster'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17322 |
POINTS = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('points'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17323 |
PROMPT = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('prompt'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17324 |
SCOPED = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('scoped'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17325 |
STRING = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('string'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17326 |
SCHEME = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('scheme'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17327 |
STROKE = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('stroke'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17328 |
RADIUS = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('radius'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17329 |
RESULT = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('result'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17330 |
REPEAT = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('repeat'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17331 |
RSPACE = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('rspace'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17332 |
ROTATE = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('rotate'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17333 |
RQUOTE = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('rquote'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17334 |
ALTTEXT = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('alttext'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17335 |
ARCHIVE = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('archive'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17336 |
AZIMUTH = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('azimuth'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17337 |
CLOSURE = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('closure'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17338 |
CHECKED = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('checked'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17339 |
CLASSID = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('classid'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17340 |
CHAROFF = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('charoff'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17341 |
BGCOLOR = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('bgcolor'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17342 |
COLSPAN = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('colspan'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17343 |
CHARSET = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('charset'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17344 |
COMPACT = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('compact'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17345 |
CONTENT = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('content'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17346 |
ENCTYPE = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('enctype'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17347 |
DATASRC = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('datasrc'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17348 |
DATAFLD = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('datafld'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17349 |
DECLARE = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('declare'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17350 |
DISPLAY = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('display'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17351 |
DIVISOR = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('divisor'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17352 |
DEFAULT = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('default'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17353 |
DESCENT = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('descent'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17354 |
KERNING = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('kerning'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17355 |
HANGING = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('hanging'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17356 |
HEADERS = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('headers'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17357 |
ONPASTE = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('onpaste'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17358 |
ONCLICK = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('onclick'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17359 |
OPTIMUM = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('optimum'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17360 |
ONBEGIN = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('onbegin'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17361 |
ONKEYUP = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('onkeyup'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17362 |
ONFOCUS = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('onfocus'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17363 |
ONERROR = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('onerror'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17364 |
ONINPUT = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('oninput'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17365 |
ONABORT = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('onabort'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17366 |
ONSTART = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('onstart'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17367 |
ONRESET = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('onreset'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17368 |
OPACITY = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('opacity'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17369 |
NOSHADE = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('noshade'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17370 |
MINSIZE = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('minsize'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17371 |
MAXSIZE = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('maxsize'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17372 |
LOOPEND = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('loopend'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17373 |
LARGEOP = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('largeop'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17374 |
UNICODE = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('unicode'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17375 |
TARGETX = $AttributeName(new AttributeName(), ALL_NO_NS, SVG_DIFFERENT('targetx', 'targetX'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17376 |
TARGETY = $AttributeName(new AttributeName(), ALL_NO_NS, SVG_DIFFERENT('targety', 'targetY'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17377 |
VIEWBOX = $AttributeName(new AttributeName(), ALL_NO_NS, SVG_DIFFERENT('viewbox', 'viewBox'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17378 |
VERSION = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('version'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17379 |
PATTERN = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('pattern'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17380 |
PROFILE = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('profile'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17381 |
SPACING = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('spacing'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17382 |
RESTART = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('restart'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17383 |
ROWSPAN = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('rowspan'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17384 |
SANDBOX = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('sandbox'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17385 |
SUMMARY = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('summary'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17386 |
STANDBY = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('standby'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17387 |
REPLACE = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('replace'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17388 |
AUTOPLAY = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('autoplay'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17389 |
ADDITIVE = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('additive'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17390 |
CALCMODE = $AttributeName(new AttributeName(), ALL_NO_NS, SVG_DIFFERENT('calcmode', 'calcMode'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17391 |
CODETYPE = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('codetype'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17392 |
CODEBASE = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('codebase'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17393 |
CONTROLS = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('controls'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17394 |
BEVELLED = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('bevelled'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17395 |
BASELINE = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('baseline'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17396 |
EXPONENT = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('exponent'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17397 |
EDGEMODE = $AttributeName(new AttributeName(), ALL_NO_NS, SVG_DIFFERENT('edgemode', 'edgeMode'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17398 |
ENCODING = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('encoding'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17399 |
GLYPHREF = $AttributeName(new AttributeName(), ALL_NO_NS, SVG_DIFFERENT('glyphref', 'glyphRef'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17400 |
DATETIME = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('datetime'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17401 |
DISABLED = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('disabled'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17402 |
FONTSIZE = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('fontsize'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17403 |
KEYTIMES = $AttributeName(new AttributeName(), ALL_NO_NS, SVG_DIFFERENT('keytimes', 'keyTimes'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17404 |
PANOSE_1 = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('panose-1'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17405 |
HREFLANG = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('hreflang'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17406 |
ONRESIZE = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('onresize'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17407 |
ONCHANGE = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('onchange'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17408 |
ONBOUNCE = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('onbounce'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17409 |
ONUNLOAD = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('onunload'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17410 |
ONFINISH = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('onfinish'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17411 |
ONSCROLL = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('onscroll'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17412 |
OPERATOR = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('operator'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17413 |
OVERFLOW = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('overflow'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17414 |
ONSUBMIT = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('onsubmit'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17415 |
ONREPEAT = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('onrepeat'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17416 |
ONSELECT = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('onselect'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17417 |
NOTATION = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('notation'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17418 |
NORESIZE = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('noresize'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17419 |
MANIFEST = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('manifest'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17420 |
MATHSIZE = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('mathsize'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17421 |
MULTIPLE = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('multiple'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17422 |
LONGDESC = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('longdesc'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17423 |
LANGUAGE = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('language'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17424 |
TEMPLATE = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('template'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17425 |
TABINDEX = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('tabindex'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17426 |
READONLY = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('readonly'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17427 |
SELECTED = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('selected'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17428 |
ROWLINES = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('rowlines'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17429 |
SEAMLESS = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('seamless'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17430 |
ROWALIGN = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('rowalign'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17431 |
STRETCHY = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('stretchy'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17432 |
REQUIRED = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('required'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17433 |
XML_BASE = $AttributeName(new AttributeName(), XML_NS, COLONIFIED_LOCAL('xml:base', 'base'), XML_PREFIX, initValues(_3Z_classLit, 0, -1, [false, true, true, false]), false);
|
jtulach@678
|
17434 |
XML_LANG = $AttributeName(new AttributeName(), XML_NS, COLONIFIED_LOCAL('xml:lang', 'lang'), XML_PREFIX, initValues(_3Z_classLit, 0, -1, [false, true, true, false]), false);
|
jtulach@678
|
17435 |
X_HEIGHT = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('x-height'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17436 |
ARIA_OWNS = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('aria-owns'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17437 |
AUTOFOCUS = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('autofocus'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17438 |
ARIA_SORT = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('aria-sort'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17439 |
ACCESSKEY = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('accesskey'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17440 |
ARIA_BUSY = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('aria-busy'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17441 |
ARIA_GRAB = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('aria-grab'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17442 |
AMPLITUDE = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('amplitude'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17443 |
ARIA_LIVE = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('aria-live'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17444 |
CLIP_RULE = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('clip-rule'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17445 |
CLIP_PATH = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('clip-path'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17446 |
EQUALROWS = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('equalrows'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17447 |
ELEVATION = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('elevation'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17448 |
DIRECTION = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('direction'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17449 |
DRAGGABLE = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('draggable'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17450 |
FILTERRES = $AttributeName(new AttributeName(), ALL_NO_NS, SVG_DIFFERENT('filterres', 'filterRes'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17451 |
FILL_RULE = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('fill-rule'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17452 |
FONTSTYLE = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('fontstyle'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17453 |
FONT_SIZE = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('font-size'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17454 |
KEYPOINTS = $AttributeName(new AttributeName(), ALL_NO_NS, SVG_DIFFERENT('keypoints', 'keyPoints'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17455 |
HIDEFOCUS = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('hidefocus'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17456 |
ONMESSAGE = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('onmessage'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17457 |
INTERCEPT = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('intercept'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17458 |
ONDRAGEND = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('ondragend'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17459 |
ONMOVEEND = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('onmoveend'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17460 |
ONINVALID = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('oninvalid'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17461 |
ONKEYDOWN = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('onkeydown'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17462 |
ONFOCUSIN = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('onfocusin'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17463 |
ONMOUSEUP = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('onmouseup'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17464 |
INPUTMODE = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('inputmode'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17465 |
ONROWEXIT = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('onrowexit'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17466 |
MATHCOLOR = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('mathcolor'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17467 |
MASKUNITS = $AttributeName(new AttributeName(), ALL_NO_NS, SVG_DIFFERENT('maskunits', 'maskUnits'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17468 |
MAXLENGTH = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('maxlength'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17469 |
LINEBREAK = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('linebreak'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17470 |
LOOPSTART = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('loopstart'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17471 |
TRANSFORM = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('transform'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17472 |
V_HANGING = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('v-hanging'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17473 |
VALUETYPE = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('valuetype'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17474 |
POINTSATZ = $AttributeName(new AttributeName(), ALL_NO_NS, SVG_DIFFERENT('pointsatz', 'pointsAtZ'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17475 |
POINTSATX = $AttributeName(new AttributeName(), ALL_NO_NS, SVG_DIFFERENT('pointsatx', 'pointsAtX'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17476 |
POINTSATY = $AttributeName(new AttributeName(), ALL_NO_NS, SVG_DIFFERENT('pointsaty', 'pointsAtY'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17477 |
PLAYCOUNT = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('playcount'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17478 |
SYMMETRIC = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('symmetric'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17479 |
SCROLLING = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('scrolling'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17480 |
REPEATDUR = $AttributeName(new AttributeName(), ALL_NO_NS, SVG_DIFFERENT('repeatdur', 'repeatDur'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17481 |
SELECTION = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('selection'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17482 |
SEPARATOR = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('separator'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17483 |
XML_SPACE = $AttributeName(new AttributeName(), XML_NS, COLONIFIED_LOCAL('xml:space', 'space'), XML_PREFIX, initValues(_3Z_classLit, 0, -1, [false, true, true, false]), false);
|
jtulach@678
|
17484 |
AUTOSUBMIT = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('autosubmit'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17485 |
ALPHABETIC = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('alphabetic'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17486 |
ACTIONTYPE = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('actiontype'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17487 |
ACCUMULATE = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('accumulate'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17488 |
ARIA_LEVEL = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('aria-level'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17489 |
COLUMNSPAN = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('columnspan'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17490 |
CAP_HEIGHT = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('cap-height'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17491 |
BACKGROUND = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('background'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17492 |
GLYPH_NAME = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('glyph-name'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17493 |
GROUPALIGN = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('groupalign'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17494 |
FONTFAMILY = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('fontfamily'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17495 |
FONTWEIGHT = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('fontweight'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17496 |
FONT_STYLE = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('font-style'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17497 |
KEYSPLINES = $AttributeName(new AttributeName(), ALL_NO_NS, SVG_DIFFERENT('keysplines', 'keySplines'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17498 |
HTTP_EQUIV = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('http-equiv'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17499 |
ONACTIVATE = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('onactivate'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17500 |
OCCURRENCE = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('occurrence'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17501 |
IRRELEVANT = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('irrelevant'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17502 |
ONDBLCLICK = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('ondblclick'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17503 |
ONDRAGDROP = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('ondragdrop'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17504 |
ONKEYPRESS = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('onkeypress'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17505 |
ONROWENTER = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('onrowenter'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17506 |
ONDRAGOVER = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('ondragover'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17507 |
ONFOCUSOUT = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('onfocusout'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17508 |
ONMOUSEOUT = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('onmouseout'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17509 |
NUMOCTAVES = $AttributeName(new AttributeName(), ALL_NO_NS, SVG_DIFFERENT('numoctaves', 'numOctaves'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17510 |
MARKER_MID = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('marker-mid'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17511 |
MARKER_END = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('marker-end'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17512 |
TEXTLENGTH = $AttributeName(new AttributeName(), ALL_NO_NS, SVG_DIFFERENT('textlength', 'textLength'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17513 |
VISIBILITY = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('visibility'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17514 |
VIEWTARGET = $AttributeName(new AttributeName(), ALL_NO_NS, SVG_DIFFERENT('viewtarget', 'viewTarget'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17515 |
VERT_ADV_Y = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('vert-adv-y'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17516 |
PATHLENGTH = $AttributeName(new AttributeName(), ALL_NO_NS, SVG_DIFFERENT('pathlength', 'pathLength'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17517 |
REPEAT_MAX = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('repeat-max'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17518 |
RADIOGROUP = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('radiogroup'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17519 |
STOP_COLOR = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('stop-color'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17520 |
SEPARATORS = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('separators'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17521 |
REPEAT_MIN = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('repeat-min'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17522 |
ROWSPACING = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('rowspacing'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17523 |
ZOOMANDPAN = $AttributeName(new AttributeName(), ALL_NO_NS, SVG_DIFFERENT('zoomandpan', 'zoomAndPan'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17524 |
XLINK_TYPE = $AttributeName(new AttributeName(), XLINK_NS, COLONIFIED_LOCAL('xlink:type', 'type'), XLINK_PREFIX, initValues(_3Z_classLit, 0, -1, [false, true, true, false]), false);
|
jtulach@678
|
17525 |
XLINK_ROLE = $AttributeName(new AttributeName(), XLINK_NS, COLONIFIED_LOCAL('xlink:role', 'role'), XLINK_PREFIX, initValues(_3Z_classLit, 0, -1, [false, true, true, false]), false);
|
jtulach@678
|
17526 |
XLINK_HREF = $AttributeName(new AttributeName(), XLINK_NS, COLONIFIED_LOCAL('xlink:href', 'href'), XLINK_PREFIX, initValues(_3Z_classLit, 0, -1, [false, true, true, false]), false);
|
jtulach@678
|
17527 |
XLINK_SHOW = $AttributeName(new AttributeName(), XLINK_NS, COLONIFIED_LOCAL('xlink:show', 'show'), XLINK_PREFIX, initValues(_3Z_classLit, 0, -1, [false, true, true, false]), false);
|
jtulach@678
|
17528 |
ACCENTUNDER = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('accentunder'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17529 |
ARIA_SECRET = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('aria-secret'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17530 |
ARIA_ATOMIC = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('aria-atomic'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17531 |
ARIA_HIDDEN = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('aria-hidden'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17532 |
ARIA_FLOWTO = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('aria-flowto'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17533 |
ARABIC_FORM = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('arabic-form'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17534 |
CELLPADDING = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('cellpadding'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17535 |
CELLSPACING = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('cellspacing'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17536 |
COLUMNWIDTH = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('columnwidth'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17537 |
COLUMNALIGN = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('columnalign'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17538 |
COLUMNLINES = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('columnlines'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17539 |
CONTEXTMENU = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('contextmenu'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17540 |
BASEPROFILE = $AttributeName(new AttributeName(), ALL_NO_NS, SVG_DIFFERENT('baseprofile', 'baseProfile'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17541 |
FONT_FAMILY = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('font-family'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17542 |
FRAMEBORDER = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('frameborder'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17543 |
FILTERUNITS = $AttributeName(new AttributeName(), ALL_NO_NS, SVG_DIFFERENT('filterunits', 'filterUnits'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17544 |
FLOOD_COLOR = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('flood-color'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17545 |
FONT_WEIGHT = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('font-weight'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17546 |
HORIZ_ADV_X = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('horiz-adv-x'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17547 |
ONDRAGLEAVE = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('ondragleave'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17548 |
ONMOUSEMOVE = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('onmousemove'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17549 |
ORIENTATION = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('orientation'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17550 |
ONMOUSEDOWN = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('onmousedown'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17551 |
ONMOUSEOVER = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('onmouseover'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17552 |
ONDRAGENTER = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('ondragenter'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17553 |
IDEOGRAPHIC = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('ideographic'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17554 |
ONBEFORECUT = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('onbeforecut'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17555 |
ONFORMINPUT = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('onforminput'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17556 |
ONDRAGSTART = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('ondragstart'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17557 |
ONMOVESTART = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('onmovestart'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17558 |
MARKERUNITS = $AttributeName(new AttributeName(), ALL_NO_NS, SVG_DIFFERENT('markerunits', 'markerUnits'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17559 |
MATHVARIANT = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('mathvariant'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17560 |
MARGINWIDTH = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('marginwidth'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17561 |
MARKERWIDTH = $AttributeName(new AttributeName(), ALL_NO_NS, SVG_DIFFERENT('markerwidth', 'markerWidth'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17562 |
TEXT_ANCHOR = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('text-anchor'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17563 |
TABLEVALUES = $AttributeName(new AttributeName(), ALL_NO_NS, SVG_DIFFERENT('tablevalues', 'tableValues'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17564 |
SCRIPTLEVEL = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('scriptlevel'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17565 |
REPEATCOUNT = $AttributeName(new AttributeName(), ALL_NO_NS, SVG_DIFFERENT('repeatcount', 'repeatCount'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17566 |
STITCHTILES = $AttributeName(new AttributeName(), ALL_NO_NS, SVG_DIFFERENT('stitchtiles', 'stitchTiles'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17567 |
STARTOFFSET = $AttributeName(new AttributeName(), ALL_NO_NS, SVG_DIFFERENT('startoffset', 'startOffset'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17568 |
SCROLLDELAY = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('scrolldelay'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17569 |
XMLNS_XLINK = $AttributeName(new AttributeName(), XMLNS_NS, COLONIFIED_LOCAL('xmlns:xlink', 'xlink'), XMLNS_PREFIX, initValues(_3Z_classLit, 0, -1, [false, false, false, false]), true);
|
jtulach@678
|
17570 |
XLINK_TITLE = $AttributeName(new AttributeName(), XLINK_NS, COLONIFIED_LOCAL('xlink:title', 'title'), XLINK_PREFIX, initValues(_3Z_classLit, 0, -1, [false, true, true, false]), false);
|
jtulach@678
|
17571 |
ARIA_INVALID = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('aria-invalid'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17572 |
ARIA_PRESSED = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('aria-pressed'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17573 |
ARIA_CHECKED = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('aria-checked'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17574 |
AUTOCOMPLETE = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('autocomplete'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17575 |
ARIA_SETSIZE = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('aria-setsize'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17576 |
ARIA_CHANNEL = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('aria-channel'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17577 |
EQUALCOLUMNS = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('equalcolumns'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17578 |
DISPLAYSTYLE = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('displaystyle'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17579 |
DATAFORMATAS = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('dataformatas'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17580 |
FILL_OPACITY = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('fill-opacity'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17581 |
FONT_VARIANT = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('font-variant'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17582 |
FONT_STRETCH = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('font-stretch'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17583 |
FRAMESPACING = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('framespacing'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17584 |
KERNELMATRIX = $AttributeName(new AttributeName(), ALL_NO_NS, SVG_DIFFERENT('kernelmatrix', 'kernelMatrix'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17585 |
ONDEACTIVATE = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('ondeactivate'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17586 |
ONROWSDELETE = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('onrowsdelete'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17587 |
ONMOUSELEAVE = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('onmouseleave'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17588 |
ONFORMCHANGE = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('onformchange'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17589 |
ONCELLCHANGE = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('oncellchange'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17590 |
ONMOUSEWHEEL = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('onmousewheel'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17591 |
ONMOUSEENTER = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('onmouseenter'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17592 |
ONAFTERPRINT = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('onafterprint'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17593 |
ONBEFORECOPY = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('onbeforecopy'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17594 |
MARGINHEIGHT = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('marginheight'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17595 |
MARKERHEIGHT = $AttributeName(new AttributeName(), ALL_NO_NS, SVG_DIFFERENT('markerheight', 'markerHeight'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17596 |
MARKER_START = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('marker-start'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17597 |
MATHEMATICAL = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('mathematical'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17598 |
LENGTHADJUST = $AttributeName(new AttributeName(), ALL_NO_NS, SVG_DIFFERENT('lengthadjust', 'lengthAdjust'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17599 |
UNSELECTABLE = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('unselectable'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17600 |
UNICODE_BIDI = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('unicode-bidi'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17601 |
UNITS_PER_EM = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('units-per-em'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17602 |
WORD_SPACING = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('word-spacing'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17603 |
WRITING_MODE = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('writing-mode'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17604 |
V_ALPHABETIC = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('v-alphabetic'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17605 |
PATTERNUNITS = $AttributeName(new AttributeName(), ALL_NO_NS, SVG_DIFFERENT('patternunits', 'patternUnits'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17606 |
SPREADMETHOD = $AttributeName(new AttributeName(), ALL_NO_NS, SVG_DIFFERENT('spreadmethod', 'spreadMethod'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17607 |
SURFACESCALE = $AttributeName(new AttributeName(), ALL_NO_NS, SVG_DIFFERENT('surfacescale', 'surfaceScale'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17608 |
STROKE_WIDTH = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('stroke-width'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17609 |
REPEAT_START = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('repeat-start'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17610 |
STDDEVIATION = $AttributeName(new AttributeName(), ALL_NO_NS, SVG_DIFFERENT('stddeviation', 'stdDeviation'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17611 |
STOP_OPACITY = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('stop-opacity'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17612 |
ARIA_CONTROLS = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('aria-controls'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17613 |
ARIA_HASPOPUP = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('aria-haspopup'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17614 |
ACCENT_HEIGHT = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('accent-height'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17615 |
ARIA_VALUENOW = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('aria-valuenow'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17616 |
ARIA_RELEVANT = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('aria-relevant'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17617 |
ARIA_POSINSET = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('aria-posinset'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17618 |
ARIA_VALUEMAX = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('aria-valuemax'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17619 |
ARIA_READONLY = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('aria-readonly'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17620 |
ARIA_SELECTED = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('aria-selected'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17621 |
ARIA_REQUIRED = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('aria-required'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17622 |
ARIA_EXPANDED = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('aria-expanded'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17623 |
ARIA_DISABLED = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('aria-disabled'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17624 |
ATTRIBUTETYPE = $AttributeName(new AttributeName(), ALL_NO_NS, SVG_DIFFERENT('attributetype', 'attributeType'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17625 |
ATTRIBUTENAME = $AttributeName(new AttributeName(), ALL_NO_NS, SVG_DIFFERENT('attributename', 'attributeName'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17626 |
ARIA_DATATYPE = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('aria-datatype'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17627 |
ARIA_VALUEMIN = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('aria-valuemin'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17628 |
BASEFREQUENCY = $AttributeName(new AttributeName(), ALL_NO_NS, SVG_DIFFERENT('basefrequency', 'baseFrequency'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17629 |
COLUMNSPACING = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('columnspacing'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17630 |
COLOR_PROFILE = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('color-profile'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17631 |
CLIPPATHUNITS = $AttributeName(new AttributeName(), ALL_NO_NS, SVG_DIFFERENT('clippathunits', 'clipPathUnits'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17632 |
DEFINITIONURL = $AttributeName(new AttributeName(), ALL_NO_NS, (arr_32 = initDim(_3Ljava_lang_String_2_classLit, 48, 1, 4, 0) , arr_32[0] = 'definitionurl' , arr_32[1] = 'definitionURL' , arr_32[2] = 'definitionurl' , arr_32[3] = 'definitionurl' , arr_32), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17633 |
GRADIENTUNITS = $AttributeName(new AttributeName(), ALL_NO_NS, SVG_DIFFERENT('gradientunits', 'gradientUnits'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17634 |
FLOOD_OPACITY = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('flood-opacity'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17635 |
ONAFTERUPDATE = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('onafterupdate'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17636 |
ONERRORUPDATE = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('onerrorupdate'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17637 |
ONBEFOREPASTE = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('onbeforepaste'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17638 |
ONLOSECAPTURE = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('onlosecapture'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17639 |
ONCONTEXTMENU = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('oncontextmenu'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17640 |
ONSELECTSTART = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('onselectstart'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17641 |
ONBEFOREPRINT = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('onbeforeprint'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17642 |
MOVABLELIMITS = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('movablelimits'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17643 |
LINETHICKNESS = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('linethickness'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17644 |
UNICODE_RANGE = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('unicode-range'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17645 |
THINMATHSPACE = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('thinmathspace'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17646 |
VERT_ORIGIN_X = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('vert-origin-x'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17647 |
VERT_ORIGIN_Y = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('vert-origin-y'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17648 |
V_IDEOGRAPHIC = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('v-ideographic'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17649 |
PRESERVEALPHA = $AttributeName(new AttributeName(), ALL_NO_NS, SVG_DIFFERENT('preservealpha', 'preserveAlpha'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17650 |
SCRIPTMINSIZE = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('scriptminsize'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17651 |
SPECIFICATION = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('specification'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17652 |
XLINK_ACTUATE = $AttributeName(new AttributeName(), XLINK_NS, COLONIFIED_LOCAL('xlink:actuate', 'actuate'), XLINK_PREFIX, initValues(_3Z_classLit, 0, -1, [false, true, true, false]), false);
|
jtulach@678
|
17653 |
XLINK_ARCROLE = $AttributeName(new AttributeName(), XLINK_NS, COLONIFIED_LOCAL('xlink:arcrole', 'arcrole'), XLINK_PREFIX, initValues(_3Z_classLit, 0, -1, [false, true, true, false]), false);
|
jtulach@678
|
17654 |
ACCEPT_CHARSET = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('accept-charset'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17655 |
ALIGNMENTSCOPE = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('alignmentscope'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17656 |
ARIA_MULTILINE = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('aria-multiline'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17657 |
BASELINE_SHIFT = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('baseline-shift'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17658 |
HORIZ_ORIGIN_X = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('horiz-origin-x'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17659 |
HORIZ_ORIGIN_Y = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('horiz-origin-y'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17660 |
ONBEFOREUPDATE = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('onbeforeupdate'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17661 |
ONFILTERCHANGE = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('onfilterchange'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17662 |
ONROWSINSERTED = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('onrowsinserted'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17663 |
ONBEFOREUNLOAD = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('onbeforeunload'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17664 |
MATHBACKGROUND = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('mathbackground'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17665 |
LETTER_SPACING = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('letter-spacing'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17666 |
LIGHTING_COLOR = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('lighting-color'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17667 |
THICKMATHSPACE = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('thickmathspace'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17668 |
TEXT_RENDERING = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('text-rendering'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17669 |
V_MATHEMATICAL = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('v-mathematical'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17670 |
POINTER_EVENTS = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('pointer-events'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17671 |
PRIMITIVEUNITS = $AttributeName(new AttributeName(), ALL_NO_NS, SVG_DIFFERENT('primitiveunits', 'primitiveUnits'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17672 |
SYSTEMLANGUAGE = $AttributeName(new AttributeName(), ALL_NO_NS, SVG_DIFFERENT('systemlanguage', 'systemLanguage'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17673 |
STROKE_LINECAP = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('stroke-linecap'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17674 |
SUBSCRIPTSHIFT = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('subscriptshift'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17675 |
STROKE_OPACITY = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('stroke-opacity'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17676 |
ARIA_DROPEFFECT = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('aria-dropeffect'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17677 |
ARIA_LABELLEDBY = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('aria-labelledby'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17678 |
ARIA_TEMPLATEID = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('aria-templateid'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17679 |
COLOR_RENDERING = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('color-rendering'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17680 |
CONTENTEDITABLE = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('contenteditable'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17681 |
DIFFUSECONSTANT = $AttributeName(new AttributeName(), ALL_NO_NS, SVG_DIFFERENT('diffuseconstant', 'diffuseConstant'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17682 |
ONDATAAVAILABLE = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('ondataavailable'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17683 |
ONCONTROLSELECT = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('oncontrolselect'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17684 |
IMAGE_RENDERING = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('image-rendering'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17685 |
MEDIUMMATHSPACE = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('mediummathspace'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17686 |
TEXT_DECORATION = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('text-decoration'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17687 |
SHAPE_RENDERING = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('shape-rendering'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17688 |
STROKE_LINEJOIN = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('stroke-linejoin'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17689 |
REPEAT_TEMPLATE = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('repeat-template'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17690 |
ARIA_DESCRIBEDBY = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('aria-describedby'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17691 |
CONTENTSTYLETYPE = $AttributeName(new AttributeName(), ALL_NO_NS, SVG_DIFFERENT('contentstyletype', 'contentStyleType'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17692 |
FONT_SIZE_ADJUST = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('font-size-adjust'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17693 |
KERNELUNITLENGTH = $AttributeName(new AttributeName(), ALL_NO_NS, SVG_DIFFERENT('kernelunitlength', 'kernelUnitLength'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17694 |
ONBEFOREACTIVATE = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('onbeforeactivate'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17695 |
ONPROPERTYCHANGE = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('onpropertychange'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17696 |
ONDATASETCHANGED = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('ondatasetchanged'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17697 |
MASKCONTENTUNITS = $AttributeName(new AttributeName(), ALL_NO_NS, SVG_DIFFERENT('maskcontentunits', 'maskContentUnits'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17698 |
PATTERNTRANSFORM = $AttributeName(new AttributeName(), ALL_NO_NS, SVG_DIFFERENT('patterntransform', 'patternTransform'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17699 |
REQUIREDFEATURES = $AttributeName(new AttributeName(), ALL_NO_NS, SVG_DIFFERENT('requiredfeatures', 'requiredFeatures'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17700 |
RENDERING_INTENT = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('rendering-intent'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17701 |
SPECULAREXPONENT = $AttributeName(new AttributeName(), ALL_NO_NS, SVG_DIFFERENT('specularexponent', 'specularExponent'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17702 |
SPECULARCONSTANT = $AttributeName(new AttributeName(), ALL_NO_NS, SVG_DIFFERENT('specularconstant', 'specularConstant'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17703 |
SUPERSCRIPTSHIFT = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('superscriptshift'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17704 |
STROKE_DASHARRAY = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('stroke-dasharray'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17705 |
XCHANNELSELECTOR = $AttributeName(new AttributeName(), ALL_NO_NS, SVG_DIFFERENT('xchannelselector', 'xChannelSelector'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17706 |
YCHANNELSELECTOR = $AttributeName(new AttributeName(), ALL_NO_NS, SVG_DIFFERENT('ychannelselector', 'yChannelSelector'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17707 |
ARIA_AUTOCOMPLETE = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('aria-autocomplete'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17708 |
CONTENTSCRIPTTYPE = $AttributeName(new AttributeName(), ALL_NO_NS, SVG_DIFFERENT('contentscripttype', 'contentScriptType'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17709 |
ENABLE_BACKGROUND = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('enable-background'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17710 |
DOMINANT_BASELINE = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('dominant-baseline'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17711 |
GRADIENTTRANSFORM = $AttributeName(new AttributeName(), ALL_NO_NS, SVG_DIFFERENT('gradienttransform', 'gradientTransform'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17712 |
ONBEFORDEACTIVATE = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('onbefordeactivate'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17713 |
ONDATASETCOMPLETE = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('ondatasetcomplete'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17714 |
OVERLINE_POSITION = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('overline-position'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17715 |
ONBEFOREEDITFOCUS = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('onbeforeeditfocus'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17716 |
LIMITINGCONEANGLE = $AttributeName(new AttributeName(), ALL_NO_NS, SVG_DIFFERENT('limitingconeangle', 'limitingConeAngle'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17717 |
VERYTHINMATHSPACE = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('verythinmathspace'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17718 |
STROKE_DASHOFFSET = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('stroke-dashoffset'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17719 |
STROKE_MITERLIMIT = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('stroke-miterlimit'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17720 |
ALIGNMENT_BASELINE = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('alignment-baseline'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17721 |
ONREADYSTATECHANGE = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('onreadystatechange'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17722 |
OVERLINE_THICKNESS = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('overline-thickness'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17723 |
UNDERLINE_POSITION = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('underline-position'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17724 |
VERYTHICKMATHSPACE = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('verythickmathspace'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17725 |
REQUIREDEXTENSIONS = $AttributeName(new AttributeName(), ALL_NO_NS, SVG_DIFFERENT('requiredextensions', 'requiredExtensions'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17726 |
COLOR_INTERPOLATION = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('color-interpolation'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17727 |
UNDERLINE_THICKNESS = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('underline-thickness'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17728 |
PRESERVEASPECTRATIO = $AttributeName(new AttributeName(), ALL_NO_NS, SVG_DIFFERENT('preserveaspectratio', 'preserveAspectRatio'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17729 |
PATTERNCONTENTUNITS = $AttributeName(new AttributeName(), ALL_NO_NS, SVG_DIFFERENT('patterncontentunits', 'patternContentUnits'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17730 |
ARIA_MULTISELECTABLE = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('aria-multiselectable'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17731 |
SCRIPTSIZEMULTIPLIER = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('scriptsizemultiplier'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17732 |
ARIA_ACTIVEDESCENDANT = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('aria-activedescendant'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17733 |
VERYVERYTHINMATHSPACE = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('veryverythinmathspace'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17734 |
VERYVERYTHICKMATHSPACE = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('veryverythickmathspace'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17735 |
STRIKETHROUGH_POSITION = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('strikethrough-position'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17736 |
STRIKETHROUGH_THICKNESS = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('strikethrough-thickness'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17737 |
EXTERNALRESOURCESREQUIRED = $AttributeName(new AttributeName(), ALL_NO_NS, SVG_DIFFERENT('externalresourcesrequired', 'externalResourcesRequired'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17738 |
GLYPH_ORIENTATION_VERTICAL = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('glyph-orientation-vertical'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17739 |
COLOR_INTERPOLATION_FILTERS = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('color-interpolation-filters'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17740 |
GLYPH_ORIENTATION_HORIZONTAL = $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL('glyph-orientation-horizontal'), ALL_NO_PREFIX, ALL_NCNAME, false);
|
jtulach@678
|
17741 |
ATTRIBUTE_NAMES = initValues(_3Lnu_validator_htmlparser_impl_AttributeName_2_classLit, 49, 9, [D, K, R, X, Y, Z, BY, CX, CY, DX, DY, G2, G1, FX, FY, K4, K2, K3, K1, ID, IN, U2, U1, RT, RX, RY, TO, Y2, Y1, X1, X2, ALT, DIR, DUR, END, FOR, IN2, MAX, MIN, LOW, REL, REV, SRC, AXIS, ABBR, BBOX, CITE, CODE, BIAS, COLS, CLIP, CHAR, BASE, EDGE, DATA, FILL, FROM, FORM, FACE, HIGH, HREF, OPEN, ICON, NAME, MODE, MASK, LINK, LANG, LIST, TYPE, WHEN, WRAP, TEXT, PATH, PING, REFX, REFY, SIZE, SEED, ROWS, SPAN, STEP, ROLE, XREF, ASYNC, ALINK, ALIGN, CLOSE, COLOR, CLASS, CLEAR, BEGIN, DEPTH, DEFER, FENCE, FRAME, ISMAP, ONEND, INDEX, ORDER, OTHER, ONCUT, NARGS, MEDIA, LABEL, LOCAL, WIDTH, TITLE, VLINK, VALUE, SLOPE, SHAPE, SCOPE, SCALE, SPEED, STYLE, RULES, STEMH, STEMV, START, XMLNS, ACCEPT, ACCENT, ASCENT, ACTIVE, ALTIMG, ACTION, BORDER, CURSOR, COORDS, FILTER, FORMAT, HIDDEN, HSPACE, HEIGHT, ONMOVE, ONLOAD, ONDRAG, ORIGIN, ONZOOM, ONHELP, ONSTOP, ONDROP, ONBLUR, OBJECT, OFFSET, ORIENT, ONCOPY, NOWRAP, NOHREF, MACROS, METHOD, LOWSRC, LSPACE, LQUOTE, USEMAP, WIDTHS, TARGET, VALUES, VALIGN, VSPACE, POSTER, POINTS, PROMPT, SCOPED, STRING, SCHEME, STROKE, RADIUS, RESULT, REPEAT, RSPACE, ROTATE, RQUOTE, ALTTEXT, ARCHIVE, AZIMUTH, CLOSURE, CHECKED, CLASSID, CHAROFF, BGCOLOR, COLSPAN, CHARSET, COMPACT, CONTENT, ENCTYPE, DATASRC, DATAFLD, DECLARE, DISPLAY, DIVISOR, DEFAULT, DESCENT, KERNING, HANGING, HEADERS, ONPASTE, ONCLICK, OPTIMUM, ONBEGIN, ONKEYUP, ONFOCUS, ONERROR, ONINPUT, ONABORT, ONSTART, ONRESET, OPACITY, NOSHADE, MINSIZE, MAXSIZE, LOOPEND, LARGEOP, UNICODE, TARGETX, TARGETY, VIEWBOX, VERSION, PATTERN, PROFILE, SPACING, RESTART, ROWSPAN, SANDBOX, SUMMARY, STANDBY, REPLACE, AUTOPLAY, ADDITIVE, CALCMODE, CODETYPE, CODEBASE, CONTROLS, BEVELLED, BASELINE, EXPONENT, EDGEMODE, ENCODING, GLYPHREF, DATETIME, DISABLED, FONTSIZE, KEYTIMES, PANOSE_1, HREFLANG, ONRESIZE, ONCHANGE, ONBOUNCE, ONUNLOAD, ONFINISH, ONSCROLL, OPERATOR, OVERFLOW, ONSUBMIT, ONREPEAT, ONSELECT, NOTATION, NORESIZE, MANIFEST, MATHSIZE, MULTIPLE, LONGDESC, LANGUAGE, TEMPLATE, TABINDEX, READONLY, SELECTED, ROWLINES, SEAMLESS, ROWALIGN, STRETCHY, REQUIRED, XML_BASE, XML_LANG, X_HEIGHT, ARIA_OWNS, AUTOFOCUS, ARIA_SORT, ACCESSKEY, ARIA_BUSY, ARIA_GRAB, AMPLITUDE, ARIA_LIVE, CLIP_RULE, CLIP_PATH, EQUALROWS, ELEVATION, DIRECTION, DRAGGABLE, FILTERRES, FILL_RULE, FONTSTYLE, FONT_SIZE, KEYPOINTS, HIDEFOCUS, ONMESSAGE, INTERCEPT, ONDRAGEND, ONMOVEEND, ONINVALID, ONKEYDOWN, ONFOCUSIN, ONMOUSEUP, INPUTMODE, ONROWEXIT, MATHCOLOR, MASKUNITS, MAXLENGTH, LINEBREAK, LOOPSTART, TRANSFORM, V_HANGING, VALUETYPE, POINTSATZ, POINTSATX, POINTSATY, PLAYCOUNT, SYMMETRIC, SCROLLING, REPEATDUR, SELECTION, SEPARATOR, XML_SPACE, AUTOSUBMIT, ALPHABETIC, ACTIONTYPE, ACCUMULATE, ARIA_LEVEL, COLUMNSPAN, CAP_HEIGHT, BACKGROUND, GLYPH_NAME, GROUPALIGN, FONTFAMILY, FONTWEIGHT, FONT_STYLE, KEYSPLINES, HTTP_EQUIV, ONACTIVATE, OCCURRENCE, IRRELEVANT, ONDBLCLICK, ONDRAGDROP, ONKEYPRESS, ONROWENTER, ONDRAGOVER, ONFOCUSOUT, ONMOUSEOUT, NUMOCTAVES, MARKER_MID, MARKER_END, TEXTLENGTH, VISIBILITY, VIEWTARGET, VERT_ADV_Y, PATHLENGTH, REPEAT_MAX, RADIOGROUP, STOP_COLOR, SEPARATORS, REPEAT_MIN, ROWSPACING, ZOOMANDPAN, XLINK_TYPE, XLINK_ROLE, XLINK_HREF, XLINK_SHOW, ACCENTUNDER, ARIA_SECRET, ARIA_ATOMIC, ARIA_HIDDEN, ARIA_FLOWTO, ARABIC_FORM, CELLPADDING, CELLSPACING, COLUMNWIDTH, COLUMNALIGN, COLUMNLINES, CONTEXTMENU, BASEPROFILE, FONT_FAMILY, FRAMEBORDER, FILTERUNITS, FLOOD_COLOR, FONT_WEIGHT, HORIZ_ADV_X, ONDRAGLEAVE, ONMOUSEMOVE, ORIENTATION, ONMOUSEDOWN, ONMOUSEOVER, ONDRAGENTER, IDEOGRAPHIC, ONBEFORECUT, ONFORMINPUT, ONDRAGSTART, ONMOVESTART, MARKERUNITS, MATHVARIANT, MARGINWIDTH, MARKERWIDTH, TEXT_ANCHOR, TABLEVALUES, SCRIPTLEVEL, REPEATCOUNT, STITCHTILES, STARTOFFSET, SCROLLDELAY, XMLNS_XLINK, XLINK_TITLE, ARIA_INVALID, ARIA_PRESSED, ARIA_CHECKED, AUTOCOMPLETE, ARIA_SETSIZE, ARIA_CHANNEL, EQUALCOLUMNS, DISPLAYSTYLE, DATAFORMATAS, FILL_OPACITY, FONT_VARIANT, FONT_STRETCH, FRAMESPACING, KERNELMATRIX, ONDEACTIVATE, ONROWSDELETE, ONMOUSELEAVE, ONFORMCHANGE, ONCELLCHANGE, ONMOUSEWHEEL, ONMOUSEENTER, ONAFTERPRINT, ONBEFORECOPY, MARGINHEIGHT, MARKERHEIGHT, MARKER_START, MATHEMATICAL, LENGTHADJUST, UNSELECTABLE, UNICODE_BIDI, UNITS_PER_EM, WORD_SPACING, WRITING_MODE, V_ALPHABETIC, PATTERNUNITS, SPREADMETHOD, SURFACESCALE, STROKE_WIDTH, REPEAT_START, STDDEVIATION, STOP_OPACITY, ARIA_CONTROLS, ARIA_HASPOPUP, ACCENT_HEIGHT, ARIA_VALUENOW, ARIA_RELEVANT, ARIA_POSINSET, ARIA_VALUEMAX, ARIA_READONLY, ARIA_SELECTED, ARIA_REQUIRED, ARIA_EXPANDED, ARIA_DISABLED, ATTRIBUTETYPE, ATTRIBUTENAME, ARIA_DATATYPE, ARIA_VALUEMIN, BASEFREQUENCY, COLUMNSPACING, COLOR_PROFILE, CLIPPATHUNITS, DEFINITIONURL, GRADIENTUNITS, FLOOD_OPACITY, ONAFTERUPDATE, ONERRORUPDATE, ONBEFOREPASTE, ONLOSECAPTURE, ONCONTEXTMENU, ONSELECTSTART, ONBEFOREPRINT, MOVABLELIMITS, LINETHICKNESS, UNICODE_RANGE, THINMATHSPACE, VERT_ORIGIN_X, VERT_ORIGIN_Y, V_IDEOGRAPHIC, PRESERVEALPHA, SCRIPTMINSIZE, SPECIFICATION, XLINK_ACTUATE, XLINK_ARCROLE, ACCEPT_CHARSET, ALIGNMENTSCOPE, ARIA_MULTILINE, BASELINE_SHIFT, HORIZ_ORIGIN_X, HORIZ_ORIGIN_Y, ONBEFOREUPDATE, ONFILTERCHANGE, ONROWSINSERTED, ONBEFOREUNLOAD, MATHBACKGROUND, LETTER_SPACING, LIGHTING_COLOR, THICKMATHSPACE, TEXT_RENDERING, V_MATHEMATICAL, POINTER_EVENTS, PRIMITIVEUNITS, SYSTEMLANGUAGE, STROKE_LINECAP, SUBSCRIPTSHIFT, STROKE_OPACITY, ARIA_DROPEFFECT, ARIA_LABELLEDBY, ARIA_TEMPLATEID, COLOR_RENDERING, CONTENTEDITABLE, DIFFUSECONSTANT, ONDATAAVAILABLE, ONCONTROLSELECT, IMAGE_RENDERING, MEDIUMMATHSPACE, TEXT_DECORATION, SHAPE_RENDERING, STROKE_LINEJOIN, REPEAT_TEMPLATE, ARIA_DESCRIBEDBY, CONTENTSTYLETYPE, FONT_SIZE_ADJUST, KERNELUNITLENGTH, ONBEFOREACTIVATE, ONPROPERTYCHANGE, ONDATASETCHANGED, MASKCONTENTUNITS, PATTERNTRANSFORM, REQUIREDFEATURES, RENDERING_INTENT, SPECULAREXPONENT, SPECULARCONSTANT, SUPERSCRIPTSHIFT, STROKE_DASHARRAY, XCHANNELSELECTOR, YCHANNELSELECTOR, ARIA_AUTOCOMPLETE, CONTENTSCRIPTTYPE, ENABLE_BACKGROUND, DOMINANT_BASELINE, GRADIENTTRANSFORM, ONBEFORDEACTIVATE, ONDATASETCOMPLETE, OVERLINE_POSITION, ONBEFOREEDITFOCUS, LIMITINGCONEANGLE, VERYTHINMATHSPACE, STROKE_DASHOFFSET, STROKE_MITERLIMIT, ALIGNMENT_BASELINE, ONREADYSTATECHANGE, OVERLINE_THICKNESS, UNDERLINE_POSITION, VERYTHICKMATHSPACE, REQUIREDEXTENSIONS, COLOR_INTERPOLATION, UNDERLINE_THICKNESS, PRESERVEASPECTRATIO, PATTERNCONTENTUNITS, ARIA_MULTISELECTABLE, SCRIPTSIZEMULTIPLIER, ARIA_ACTIVEDESCENDANT, VERYVERYTHINMATHSPACE, VERYVERYTHICKMATHSPACE, STRIKETHROUGH_POSITION, STRIKETHROUGH_THICKNESS, EXTERNALRESOURCESREQUIRED, GLYPH_ORIENTATION_VERTICAL, COLOR_INTERPOLATION_FILTERS, GLYPH_ORIENTATION_HORIZONTAL]);
|
jtulach@678
|
17742 |
ATTRIBUTE_HASHES = initValues(_3I_classLit, 0, -1, [1153, 1383, 1601, 1793, 1827, 1857, 68600, 69146, 69177, 70237, 70270, 71572, 71669, 72415, 72444, 74846, 74904, 74943, 75001, 75276, 75590, 84742, 84839, 85575, 85963, 85992, 87204, 88074, 88171, 89130, 89163, 3207892, 3283895, 3284791, 3338752, 3358197, 3369562, 3539124, 3562402, 3574260, 3670335, 3696933, 3721879, 135280021, 135346322, 136317019, 136475749, 136548517, 136652214, 136884919, 136902418, 136942992, 137292068, 139120259, 139785574, 142250603, 142314056, 142331176, 142519584, 144752417, 145106895, 146147200, 146765926, 148805544, 149655723, 149809441, 150018784, 150445028, 150923321, 152528754, 152536216, 152647366, 152962785, 155219321, 155654904, 157317483, 157350248, 157437941, 157447478, 157604838, 157685404, 157894402, 158315188, 166078431, 169409980, 169700259, 169856932, 170007032, 170409695, 170466488, 170513710, 170608367, 173028944, 173896963, 176090625, 176129212, 179390001, 179489057, 179627464, 179840468, 179849042, 180004216, 181779081, 183027151, 183645319, 183698797, 185922012, 185997252, 188312483, 188675799, 190977533, 190992569, 191006194, 191033518, 191038774, 191096249, 191166163, 191194426, 191522106, 191568039, 200104642, 202506661, 202537381, 202602917, 203070590, 203120766, 203389054, 203690071, 203971238, 203986524, 209040857, 209125756, 212055489, 212322418, 212746849, 213002877, 213055164, 213088023, 213259873, 213273386, 213435118, 213437318, 213438231, 213493071, 213532268, 213542834, 213584431, 213659891, 215285828, 215880731, 216112976, 216684637, 217369699, 217565298, 217576549, 218186795, 219743185, 220082234, 221623802, 221986406, 222283890, 223089542, 223138630, 223311265, 224547358, 224587256, 224589550, 224655650, 224785518, 224810917, 224813302, 225429618, 225432950, 225440869, 236107233, 236709921, 236838947, 237117095, 237143271, 237172455, 237209953, 237354143, 237372743, 237668065, 237703073, 237714273, 239743521, 240512803, 240522627, 240560417, 240656513, 241015715, 241062755, 241065383, 243523041, 245865199, 246261793, 246556195, 246774817, 246923491, 246928419, 246981667, 247014847, 247058369, 247112833, 247118177, 247119137, 247128739, 247316903, 249533729, 250235623, 250269543, 251083937, 251402351, 252339047, 253260911, 253293679, 254844367, 255547879, 256077281, 256345377, 258124199, 258354465, 258605063, 258744193, 258845603, 258856961, 258926689, 269869248, 270174334, 270709417, 270778994, 270781796, 271102503, 271478858, 271490090, 272870654, 273335275, 273369140, 273924313, 274108530, 274116736, 276818662, 277476156, 279156579, 279349675, 280108533, 280128712, 280132869, 280162403, 280280292, 280413430, 280506130, 280677397, 280678580, 280686710, 280689066, 282736758, 283110901, 283275116, 283823226, 283890012, 284479340, 284606461, 286700477, 286798916, 291557706, 291665349, 291804100, 292138018, 292166446, 292418738, 292451039, 300298041, 300374839, 300597935, 303073389, 303083839, 303266673, 303354997, 303430688, 303576261, 303724281, 303819694, 304242723, 304382625, 306247792, 307227811, 307468786, 307724489, 309671175, 310252031, 310358241, 310373094, 311015256, 313357609, 313683893, 313701861, 313706996, 313707317, 313710350, 314027746, 314038181, 314091299, 314205627, 314233813, 316741830, 316797986, 317486755, 317794164, 318721061, 320076137, 322657125, 322887778, 323506876, 323572412, 323605180, 323938869, 325060058, 325320188, 325398738, 325541490, 325671619, 333868843, 336806130, 337212108, 337282686, 337285434, 337585223, 338036037, 338298087, 338566051, 340943551, 341190970, 342995704, 343352124, 343912673, 344585053, 346977248, 347218098, 347262163, 347278576, 347438191, 347655959, 347684788, 347726430, 347727772, 347776035, 347776629, 349500753, 350880161, 350887073, 353384123, 355496998, 355906922, 355979793, 356545959, 358637867, 358905016, 359164318, 359247286, 359350571, 359579447, 365560330, 367399355, 367420285, 367510727, 368013212, 370234760, 370353345, 370710317, 371074566, 371122285, 371194213, 371448425, 371448430, 371545055, 371596922, 371758751, 371964792, 372151328, 376550136, 376710172, 376795771, 376826271, 376906556, 380514830, 380774774, 380775037, 381030322, 381136500, 381281631, 381282269, 381285504, 381330595, 381331422, 381335911, 381336484, 383907298, 383917408, 384595009, 384595013, 387799894, 387823201, 392581647, 392584937, 392742684, 392906485, 393003349, 400644707, 400973830, 404428547, 404432113, 404432865, 404469244, 404478897, 404694860, 406887479, 408294949, 408789955, 410022510, 410467324, 410586448, 410945965, 411845275, 414327152, 414327932, 414329781, 414346257, 414346439, 414639928, 414835998, 414894517, 414986533, 417465377, 417465381, 417492216, 418259232, 419310946, 420103495, 420242342, 420380455, 420658662, 420717432, 423183880, 424539259, 425929170, 425972964, 426050649, 426126450, 426142833, 426607922, 437289840, 437347469, 437412335, 437423943, 437455540, 437462252, 437597991, 437617485, 437986305, 437986507, 437986828, 437987072, 438015591, 438034813, 438038966, 438179623, 438347971, 438483573, 438547062, 438895551, 441592676, 442032555, 443548979, 447881379, 447881655, 447881895, 447887844, 448416189, 448445746, 448449012, 450942191, 452816744, 453668677, 454434495, 456610076, 456642844, 456738709, 457544600, 459451897, 459680944, 468058810, 468083581, 470964084, 471470955, 471567278, 472267822, 481177859, 481210627, 481435874, 481455115, 481485378, 481490218, 485105638, 486005878, 486383494, 487988916, 488103783, 490661867, 491574090, 491578272, 493041952, 493441205, 493582844, 493716979, 504577572, 504740359, 505091638, 505592418, 505656212, 509516275, 514998531, 515571132, 515594682, 518712698, 521362273, 526592419, 526807354, 527348842, 538294791, 539214049, 544689535, 545535009, 548544752, 548563346, 548595116, 551679010, 558034099, 560329411, 560356209, 560671018, 560671152, 560692590, 560845442, 569212097, 569474241, 572252718, 572768481, 575326764, 576174758, 576190819, 582099184, 582099438, 582372519, 582558889, 586552164, 591325418, 594231990, 594243961, 605711268, 615672071, 616086845, 621792370, 624879850, 627432831, 640040548, 654392808, 658675477, 659420283, 672891587, 694768102, 705890982, 725543146, 759097578, 761686526, 795383908, 843809551, 878105336, 908643300, 945213471]);
|
jtulach@678
|
17743 |
}
|
jtulach@678
|
17744 |
|
jtulach@678
|
17745 |
function $AttributeName_0(this$static, uri, local, prefix, ncname, xmlns){
|
jtulach@678
|
17746 |
$clinit_87();
|
jtulach@678
|
17747 |
this$static.uri = uri;
|
jtulach@678
|
17748 |
this$static.local = local;
|
jtulach@678
|
17749 |
COMPUTE_QNAME(local, prefix);
|
jtulach@678
|
17750 |
this$static.ncname = ncname;
|
jtulach@678
|
17751 |
this$static.xmlns = xmlns;
|
jtulach@678
|
17752 |
return this$static;
|
jtulach@678
|
17753 |
}
|
jtulach@678
|
17754 |
|
jtulach@678
|
17755 |
function $AttributeName(this$static, uri, local, prefix, ncname, xmlns){
|
jtulach@678
|
17756 |
$clinit_87();
|
jtulach@678
|
17757 |
this$static.uri = uri;
|
jtulach@678
|
17758 |
this$static.local = local;
|
jtulach@678
|
17759 |
COMPUTE_QNAME(local, prefix);
|
jtulach@678
|
17760 |
this$static.ncname = ncname;
|
jtulach@678
|
17761 |
this$static.xmlns = xmlns;
|
jtulach@678
|
17762 |
return this$static;
|
jtulach@678
|
17763 |
}
|
jtulach@678
|
17764 |
|
jtulach@678
|
17765 |
function $isBoolean(this$static){
|
jtulach@678
|
17766 |
return this$static == ACTIVE || this$static == ASYNC || this$static == AUTOFOCUS || this$static == AUTOSUBMIT || this$static == CHECKED || this$static == COMPACT || this$static == DECLARE || this$static == DEFAULT || this$static == DEFER || this$static == DISABLED || this$static == ISMAP || this$static == MULTIPLE || this$static == NOHREF || this$static == NORESIZE || this$static == NOSHADE || this$static == NOWRAP || this$static == READONLY || this$static == REQUIRED || this$static == SELECTED;
|
jtulach@678
|
17767 |
}
|
jtulach@678
|
17768 |
|
jtulach@678
|
17769 |
function $isCaseFolded(this$static){
|
jtulach@678
|
17770 |
return this$static == ACTIVE || this$static == ALIGN || this$static == ASYNC || this$static == AUTOCOMPLETE || this$static == AUTOFOCUS || this$static == AUTOSUBMIT || this$static == CHECKED || this$static == CLEAR || this$static == COMPACT || this$static == DATAFORMATAS || this$static == DECLARE || this$static == DEFAULT || this$static == DEFER || this$static == DIR || this$static == DISABLED || this$static == ENCTYPE || this$static == FRAME || this$static == ISMAP || this$static == METHOD || this$static == MULTIPLE || this$static == NOHREF || this$static == NORESIZE || this$static == NOSHADE || this$static == NOWRAP || this$static == READONLY || this$static == REPLACE || this$static == REQUIRED || this$static == RULES || this$static == SCOPE || this$static == SCROLLING || this$static == SELECTED || this$static == SHAPE || this$static == STEP || this$static == TYPE || this$static == VALIGN || this$static == VALUETYPE;
|
jtulach@678
|
17771 |
}
|
jtulach@678
|
17772 |
|
jtulach@678
|
17773 |
function COLONIFIED_LOCAL(name, suffix){
|
jtulach@678
|
17774 |
var arr;
|
jtulach@678
|
17775 |
arr = initDim(_3Ljava_lang_String_2_classLit, 48, 1, 4, 0);
|
jtulach@678
|
17776 |
arr[0] = name;
|
jtulach@678
|
17777 |
arr[1] = suffix;
|
jtulach@678
|
17778 |
arr[2] = suffix;
|
jtulach@678
|
17779 |
arr[3] = name;
|
jtulach@678
|
17780 |
return arr;
|
jtulach@678
|
17781 |
}
|
jtulach@678
|
17782 |
|
jtulach@678
|
17783 |
function COMPUTE_QNAME(local, prefix){
|
jtulach@678
|
17784 |
var arr, i;
|
jtulach@678
|
17785 |
arr = initDim(_3Ljava_lang_String_2_classLit, 48, 1, 4, 0);
|
jtulach@678
|
17786 |
for (i = 0; i < arr.length; ++i) {
|
jtulach@678
|
17787 |
if (prefix[i] == null) {
|
jtulach@678
|
17788 |
arr[i] = local[i];
|
jtulach@678
|
17789 |
}
|
jtulach@678
|
17790 |
else {
|
jtulach@678
|
17791 |
arr[i] = String(prefix[i] + ':' + local[i]);
|
jtulach@678
|
17792 |
}
|
jtulach@678
|
17793 |
}
|
jtulach@678
|
17794 |
return arr;
|
jtulach@678
|
17795 |
}
|
jtulach@678
|
17796 |
|
jtulach@678
|
17797 |
function SAME_LOCAL(name){
|
jtulach@678
|
17798 |
var arr;
|
jtulach@678
|
17799 |
arr = initDim(_3Ljava_lang_String_2_classLit, 48, 1, 4, 0);
|
jtulach@678
|
17800 |
arr[0] = name;
|
jtulach@678
|
17801 |
arr[1] = name;
|
jtulach@678
|
17802 |
arr[2] = name;
|
jtulach@678
|
17803 |
arr[3] = name;
|
jtulach@678
|
17804 |
return arr;
|
jtulach@678
|
17805 |
}
|
jtulach@678
|
17806 |
|
jtulach@678
|
17807 |
function SVG_DIFFERENT(name, camel){
|
jtulach@678
|
17808 |
var arr;
|
jtulach@678
|
17809 |
arr = initDim(_3Ljava_lang_String_2_classLit, 48, 1, 4, 0);
|
jtulach@678
|
17810 |
arr[0] = name;
|
jtulach@678
|
17811 |
arr[1] = name;
|
jtulach@678
|
17812 |
arr[2] = camel;
|
jtulach@678
|
17813 |
arr[3] = name;
|
jtulach@678
|
17814 |
return arr;
|
jtulach@678
|
17815 |
}
|
jtulach@678
|
17816 |
|
jtulach@678
|
17817 |
function bufToHash(buf, len){
|
jtulach@678
|
17818 |
var hash, hash2, i, j;
|
jtulach@678
|
17819 |
hash2 = 0;
|
jtulach@678
|
17820 |
hash = len;
|
jtulach@678
|
17821 |
hash <<= 5;
|
jtulach@678
|
17822 |
hash += buf[0] - 96;
|
jtulach@678
|
17823 |
j = len;
|
jtulach@678
|
17824 |
for (i = 0; i < 4 && j > 0; ++i) {
|
jtulach@678
|
17825 |
--j;
|
jtulach@678
|
17826 |
hash <<= 5;
|
jtulach@678
|
17827 |
hash += buf[j] - 96;
|
jtulach@678
|
17828 |
hash2 <<= 6;
|
jtulach@678
|
17829 |
hash2 += buf[i] - 95;
|
jtulach@678
|
17830 |
}
|
jtulach@678
|
17831 |
return hash ^ hash2;
|
jtulach@678
|
17832 |
}
|
jtulach@678
|
17833 |
|
jtulach@678
|
17834 |
function createAttributeName(name, checkNcName){
|
jtulach@678
|
17835 |
var ncName, xmlns;
|
jtulach@678
|
17836 |
ncName = true;
|
jtulach@678
|
17837 |
xmlns = name.indexOf('xmlns:') == 0;
|
jtulach@678
|
17838 |
if (checkNcName) {
|
jtulach@678
|
17839 |
if (xmlns) {
|
jtulach@678
|
17840 |
ncName = false;
|
jtulach@678
|
17841 |
}
|
jtulach@678
|
17842 |
else {
|
jtulach@678
|
17843 |
ncName = isNCName(name);
|
jtulach@678
|
17844 |
}
|
jtulach@678
|
17845 |
}
|
jtulach@678
|
17846 |
return $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL(name), ALL_NO_PREFIX, ncName?ALL_NCNAME:ALL_NO_NCNAME, xmlns);
|
jtulach@678
|
17847 |
}
|
jtulach@678
|
17848 |
|
jtulach@678
|
17849 |
function getClass_49(){
|
jtulach@678
|
17850 |
return Lnu_validator_htmlparser_impl_AttributeName_2_classLit;
|
jtulach@678
|
17851 |
}
|
jtulach@678
|
17852 |
|
jtulach@678
|
17853 |
function nameByBuffer(buf, offset, length, checkNcName){
|
jtulach@678
|
17854 |
var end, end_0;
|
jtulach@678
|
17855 |
$clinit_87();
|
jtulach@678
|
17856 |
var attributeName, hash, index, name;
|
jtulach@678
|
17857 |
hash = bufToHash(buf, length);
|
jtulach@678
|
17858 |
index = binarySearch(ATTRIBUTE_HASHES, hash);
|
jtulach@678
|
17859 |
if (index < 0) {
|
jtulach@678
|
17860 |
return createAttributeName(String((end = offset + length , __checkBounds(buf.length, offset, end) , __valueOf(buf, offset, end))), checkNcName);
|
jtulach@678
|
17861 |
}
|
jtulach@678
|
17862 |
else {
|
jtulach@678
|
17863 |
attributeName = ATTRIBUTE_NAMES[index];
|
jtulach@678
|
17864 |
name = attributeName.local[0];
|
jtulach@678
|
17865 |
if (!localEqualsBuffer(name, buf, offset, length)) {
|
jtulach@678
|
17866 |
return createAttributeName(String((end_0 = offset + length , __checkBounds(buf.length, offset, end_0) , __valueOf(buf, offset, end_0))), checkNcName);
|
jtulach@678
|
17867 |
}
|
jtulach@678
|
17868 |
return attributeName;
|
jtulach@678
|
17869 |
}
|
jtulach@678
|
17870 |
}
|
jtulach@678
|
17871 |
|
jtulach@678
|
17872 |
function AttributeName(){
|
jtulach@678
|
17873 |
}
|
jtulach@678
|
17874 |
|
jtulach@678
|
17875 |
_ = AttributeName.prototype = new Object_0();
|
jtulach@678
|
17876 |
_.getClass$ = getClass_49;
|
jtulach@678
|
17877 |
_.typeId$ = 36;
|
jtulach@678
|
17878 |
_.local = null;
|
jtulach@678
|
17879 |
_.ncname = null;
|
jtulach@678
|
17880 |
_.uri = null;
|
jtulach@678
|
17881 |
_.xmlns = false;
|
jtulach@678
|
17882 |
var ABBR, ACCENT, ACCENTUNDER, ACCENT_HEIGHT, ACCEPT, ACCEPT_CHARSET, ACCESSKEY, ACCUMULATE, ACTION, ACTIONTYPE, ACTIVE, ADDITIVE, ALIGN, ALIGNMENTSCOPE, ALIGNMENT_BASELINE, ALINK, ALL_NCNAME, ALL_NO_NCNAME, ALL_NO_NS, ALL_NO_PREFIX, ALPHABETIC, ALT, ALTIMG, ALTTEXT, AMPLITUDE, ARABIC_FORM, ARCHIVE, ARIA_ACTIVEDESCENDANT, ARIA_ATOMIC, ARIA_AUTOCOMPLETE, ARIA_BUSY, ARIA_CHANNEL, ARIA_CHECKED, ARIA_CONTROLS, ARIA_DATATYPE, ARIA_DESCRIBEDBY, ARIA_DISABLED, ARIA_DROPEFFECT, ARIA_EXPANDED, ARIA_FLOWTO, ARIA_GRAB, ARIA_HASPOPUP, ARIA_HIDDEN, ARIA_INVALID, ARIA_LABELLEDBY, ARIA_LEVEL, ARIA_LIVE, ARIA_MULTILINE, ARIA_MULTISELECTABLE, ARIA_OWNS, ARIA_POSINSET, ARIA_PRESSED, ARIA_READONLY, ARIA_RELEVANT, ARIA_REQUIRED, ARIA_SECRET, ARIA_SELECTED, ARIA_SETSIZE, ARIA_SORT, ARIA_TEMPLATEID, ARIA_VALUEMAX, ARIA_VALUEMIN, ARIA_VALUENOW, ASCENT, ASYNC, ATTRIBUTENAME, ATTRIBUTETYPE, ATTRIBUTE_HASHES, ATTRIBUTE_NAMES, AUTOCOMPLETE, AUTOFOCUS, AUTOPLAY, AUTOSUBMIT, AXIS, AZIMUTH, BACKGROUND, BASE, BASEFREQUENCY, BASELINE, BASELINE_SHIFT, BASEPROFILE, BBOX, BEGIN, BEVELLED, BGCOLOR, BIAS, BORDER, BY, CALCMODE, CAP_HEIGHT, CELLPADDING, CELLSPACING, CHAR, CHAROFF, CHARSET, CHECKED, CITE, CLASS, CLASSID, CLEAR, CLIP, CLIPPATHUNITS, CLIP_PATH, CLIP_RULE, CLOSE, CLOSURE, CODE, CODEBASE, CODETYPE, COLOR, COLOR_INTERPOLATION, COLOR_INTERPOLATION_FILTERS, COLOR_PROFILE, COLOR_RENDERING, COLS, COLSPAN, COLUMNALIGN, COLUMNLINES, COLUMNSPACING, COLUMNSPAN, COLUMNWIDTH, COMPACT, CONTENT, CONTENTEDITABLE, CONTENTSCRIPTTYPE, CONTENTSTYLETYPE, CONTEXTMENU, CONTROLS, COORDS, CURSOR, CX, CY, D, DATA, DATAFLD, DATAFORMATAS, DATASRC, DATETIME, DECLARE, DEFAULT, DEFER, DEFINITIONURL, DEPTH, DESCENT, DIFFUSECONSTANT, DIR, DIRECTION, DISABLED, DISPLAY, DISPLAYSTYLE, DIVISOR, DOMINANT_BASELINE, DRAGGABLE, DUR, DX, DY, EDGE, EDGEMODE, ELEVATION, ENABLE_BACKGROUND, ENCODING, ENCTYPE, END, EQUALCOLUMNS, EQUALROWS, EXPONENT, EXTERNALRESOURCESREQUIRED, FACE, FENCE, FILL, FILL_OPACITY, FILL_RULE, FILTER, FILTERRES, FILTERUNITS, FLOOD_COLOR, FLOOD_OPACITY, FONTFAMILY, FONTSIZE, FONTSTYLE, FONTWEIGHT, FONT_FAMILY, FONT_SIZE, FONT_SIZE_ADJUST, FONT_STRETCH, FONT_STYLE, FONT_VARIANT, FONT_WEIGHT, FOR, FORM, FORMAT, FRAME, FRAMEBORDER, FRAMESPACING, FROM, FX, FY, G1, G2, GLYPHREF, GLYPH_NAME, GLYPH_ORIENTATION_HORIZONTAL, GLYPH_ORIENTATION_VERTICAL, GRADIENTTRANSFORM, GRADIENTUNITS, GROUPALIGN, HANGING, HEADERS, HEIGHT, HIDDEN, HIDEFOCUS, HIGH, HORIZ_ADV_X, HORIZ_ORIGIN_X, HORIZ_ORIGIN_Y, HREF, HREFLANG, HSPACE, HTTP_EQUIV, ICON, ID, IDEOGRAPHIC, IMAGE_RENDERING, IN, IN2, INDEX, INPUTMODE, INTERCEPT, IRRELEVANT, ISMAP, K, K1, K2, K3, K4, KERNELMATRIX, KERNELUNITLENGTH, KERNING, KEYPOINTS, KEYSPLINES, KEYTIMES, LABEL, LANG, LANGUAGE, LANG_NS, LANG_PREFIX, LARGEOP, LENGTHADJUST, LETTER_SPACING, LIGHTING_COLOR, LIMITINGCONEANGLE, LINEBREAK, LINETHICKNESS, LINK, LIST, LOCAL, LONGDESC, LOOPEND, LOOPSTART, LOW, LOWSRC, LQUOTE, LSPACE, MACROS, MANIFEST, MARGINHEIGHT, MARGINWIDTH, MARKERHEIGHT, MARKERUNITS, MARKERWIDTH, MARKER_END, MARKER_MID, MARKER_START, MASK, MASKCONTENTUNITS, MASKUNITS, MATHBACKGROUND, MATHCOLOR, MATHEMATICAL, MATHSIZE, MATHVARIANT, MAX, MAXLENGTH, MAXSIZE, MEDIA, MEDIUMMATHSPACE, METHOD, MIN, MINSIZE, MODE, MOVABLELIMITS, MULTIPLE, NAME, NARGS, NOHREF, NORESIZE, NOSHADE, NOTATION, NOWRAP, NUMOCTAVES, OBJECT, OCCURRENCE, OFFSET, ONABORT, ONACTIVATE, ONAFTERPRINT, ONAFTERUPDATE, ONBEFORDEACTIVATE, ONBEFOREACTIVATE, ONBEFORECOPY, ONBEFORECUT, ONBEFOREEDITFOCUS, ONBEFOREPASTE, ONBEFOREPRINT, ONBEFOREUNLOAD, ONBEFOREUPDATE, ONBEGIN, ONBLUR, ONBOUNCE, ONCELLCHANGE, ONCHANGE, ONCLICK, ONCONTEXTMENU, ONCONTROLSELECT, ONCOPY, ONCUT, ONDATAAVAILABLE, ONDATASETCHANGED, ONDATASETCOMPLETE, ONDBLCLICK, ONDEACTIVATE, ONDRAG, ONDRAGDROP, ONDRAGEND, ONDRAGENTER, ONDRAGLEAVE, ONDRAGOVER, ONDRAGSTART, ONDROP, ONEND, ONERROR, ONERRORUPDATE, ONFILTERCHANGE, ONFINISH, ONFOCUS, ONFOCUSIN, ONFOCUSOUT, ONFORMCHANGE, ONFORMINPUT, ONHELP, ONINPUT, ONINVALID, ONKEYDOWN, ONKEYPRESS, ONKEYUP, ONLOAD, ONLOSECAPTURE, ONMESSAGE, ONMOUSEDOWN, ONMOUSEENTER, ONMOUSELEAVE, ONMOUSEMOVE, ONMOUSEOUT, ONMOUSEOVER, ONMOUSEUP, ONMOUSEWHEEL, ONMOVE, ONMOVEEND, ONMOVESTART, ONPASTE, ONPROPERTYCHANGE, ONREADYSTATECHANGE, ONREPEAT, ONRESET, ONRESIZE, ONROWENTER, ONROWEXIT, ONROWSDELETE, ONROWSINSERTED, ONSCROLL, ONSELECT, ONSELECTSTART, ONSTART, ONSTOP, ONSUBMIT, ONUNLOAD, ONZOOM, OPACITY, OPEN, OPERATOR, OPTIMUM, ORDER, ORIENT, ORIENTATION, ORIGIN, OTHER, OVERFLOW, OVERLINE_POSITION, OVERLINE_THICKNESS, PANOSE_1, PATH, PATHLENGTH, PATTERN, PATTERNCONTENTUNITS, PATTERNTRANSFORM, PATTERNUNITS, PING, PLAYCOUNT, POINTER_EVENTS, POINTS, POINTSATX, POINTSATY, POINTSATZ, POSTER, PRESERVEALPHA, PRESERVEASPECTRATIO, PRIMITIVEUNITS, PROFILE, PROMPT, R, RADIOGROUP, RADIUS, READONLY, REFX, REFY, REL, RENDERING_INTENT, REPEAT, REPEATCOUNT, REPEATDUR, REPEAT_MAX, REPEAT_MIN, REPEAT_START, REPEAT_TEMPLATE, REPLACE, REQUIRED, REQUIREDEXTENSIONS, REQUIREDFEATURES, RESTART, RESULT, REV, ROLE, ROTATE, ROWALIGN, ROWLINES, ROWS, ROWSPACING, ROWSPAN, RQUOTE, RSPACE, RT, RULES, RX, RY, SANDBOX, SCALE, SCHEME, SCOPE, SCOPED, SCRIPTLEVEL, SCRIPTMINSIZE, SCRIPTSIZEMULTIPLIER, SCROLLDELAY, SCROLLING, SEAMLESS, SEED, SELECTED, SELECTION, SEPARATOR, SEPARATORS, SHAPE, SHAPE_RENDERING, SIZE, SLOPE, SPACING, SPAN, SPECIFICATION, SPECULARCONSTANT, SPECULAREXPONENT, SPEED, SPREADMETHOD, SRC, STANDBY, START, STARTOFFSET, STDDEVIATION, STEMH, STEMV, STEP, STITCHTILES, STOP_COLOR, STOP_OPACITY, STRETCHY, STRIKETHROUGH_POSITION, STRIKETHROUGH_THICKNESS, STRING, STROKE, STROKE_DASHARRAY, STROKE_DASHOFFSET, STROKE_LINECAP, STROKE_LINEJOIN, STROKE_MITERLIMIT, STROKE_OPACITY, STROKE_WIDTH, STYLE, SUBSCRIPTSHIFT, SUMMARY, SUPERSCRIPTSHIFT, SURFACESCALE, SYMMETRIC, SYSTEMLANGUAGE, TABINDEX, TABLEVALUES, TARGET, TARGETX, TARGETY, TEMPLATE, TEXT, TEXTLENGTH, TEXT_ANCHOR, TEXT_DECORATION, TEXT_RENDERING, THICKMATHSPACE, THINMATHSPACE, TITLE, TO, TRANSFORM, TYPE, U1, U2, UNDERLINE_POSITION, UNDERLINE_THICKNESS, UNICODE, UNICODE_BIDI, UNICODE_RANGE, UNITS_PER_EM, UNSELECTABLE, USEMAP, VALIGN, VALUE, VALUES, VALUETYPE, VERSION, VERT_ADV_Y, VERT_ORIGIN_X, VERT_ORIGIN_Y, VERYTHICKMATHSPACE, VERYTHINMATHSPACE, VERYVERYTHICKMATHSPACE, VERYVERYTHINMATHSPACE, VIEWBOX, VIEWTARGET, VISIBILITY, VLINK, VSPACE, V_ALPHABETIC, V_HANGING, V_IDEOGRAPHIC, V_MATHEMATICAL, WHEN, WIDTH, WIDTHS, WORD_SPACING, WRAP, WRITING_MODE, X, X1, X2, XCHANNELSELECTOR, XLINK_ACTUATE, XLINK_ARCROLE, XLINK_HREF, XLINK_NS, XLINK_PREFIX, XLINK_ROLE, XLINK_SHOW, XLINK_TITLE, XLINK_TYPE, XMLNS, XMLNS_NS, XMLNS_PREFIX, XMLNS_XLINK, XML_BASE, XML_LANG, XML_NS, XML_PREFIX, XML_SPACE, XREF, X_HEIGHT, Y, Y1, Y2, YCHANNELSELECTOR, Z, ZOOMANDPAN;
|
jtulach@678
|
17883 |
function $clinit_89(){
|
jtulach@678
|
17884 |
$clinit_89 = nullMethod;
|
jtulach@678
|
17885 |
$ElementName(new ElementName(), null);
|
jtulach@678
|
17886 |
A = $ElementName_0(new ElementName(), 'a', 'a', 1, false, false, false);
|
jtulach@678
|
17887 |
B = $ElementName_0(new ElementName(), 'b', 'b', 45, false, false, false);
|
jtulach@678
|
17888 |
G = $ElementName_0(new ElementName(), 'g', 'g', 0, false, false, false);
|
jtulach@678
|
17889 |
I = $ElementName_0(new ElementName(), 'i', 'i', 45, false, false, false);
|
jtulach@678
|
17890 |
P = $ElementName_0(new ElementName(), 'p', 'p', 29, true, false, false);
|
jtulach@678
|
17891 |
Q = $ElementName_0(new ElementName(), 'q', 'q', 0, false, false, false);
|
jtulach@678
|
17892 |
S = $ElementName_0(new ElementName(), 's', 's', 45, false, false, false);
|
jtulach@678
|
17893 |
U = $ElementName_0(new ElementName(), 'u', 'u', 45, false, false, false);
|
jtulach@678
|
17894 |
BR = $ElementName_0(new ElementName(), 'br', 'br', 4, true, false, false);
|
jtulach@678
|
17895 |
CI = $ElementName_0(new ElementName(), 'ci', 'ci', 0, false, false, false);
|
jtulach@678
|
17896 |
CN = $ElementName_0(new ElementName(), 'cn', 'cn', 0, false, false, false);
|
jtulach@678
|
17897 |
DD = $ElementName_0(new ElementName(), 'dd', 'dd', 41, true, false, false);
|
jtulach@678
|
17898 |
DL = $ElementName_0(new ElementName(), 'dl', 'dl', 46, true, false, false);
|
jtulach@678
|
17899 |
DT = $ElementName_0(new ElementName(), 'dt', 'dt', 41, true, false, false);
|
jtulach@678
|
17900 |
EM = $ElementName_0(new ElementName(), 'em', 'em', 45, false, false, false);
|
jtulach@678
|
17901 |
EQ = $ElementName_0(new ElementName(), 'eq', 'eq', 0, false, false, false);
|
jtulach@678
|
17902 |
FN = $ElementName_0(new ElementName(), 'fn', 'fn', 0, false, false, false);
|
jtulach@678
|
17903 |
H1 = $ElementName_0(new ElementName(), 'h1', 'h1', 42, true, false, false);
|
jtulach@678
|
17904 |
H2 = $ElementName_0(new ElementName(), 'h2', 'h2', 42, true, false, false);
|
jtulach@678
|
17905 |
H3 = $ElementName_0(new ElementName(), 'h3', 'h3', 42, true, false, false);
|
jtulach@678
|
17906 |
H4 = $ElementName_0(new ElementName(), 'h4', 'h4', 42, true, false, false);
|
jtulach@678
|
17907 |
H5 = $ElementName_0(new ElementName(), 'h5', 'h5', 42, true, false, false);
|
jtulach@678
|
17908 |
H6 = $ElementName_0(new ElementName(), 'h6', 'h6', 42, true, false, false);
|
jtulach@678
|
17909 |
GT = $ElementName_0(new ElementName(), 'gt', 'gt', 0, false, false, false);
|
jtulach@678
|
17910 |
HR = $ElementName_0(new ElementName(), 'hr', 'hr', 22, true, false, false);
|
jtulach@678
|
17911 |
IN_0 = $ElementName_0(new ElementName(), 'in', 'in', 0, false, false, false);
|
jtulach@678
|
17912 |
LI = $ElementName_0(new ElementName(), 'li', 'li', 15, true, false, false);
|
jtulach@678
|
17913 |
LN = $ElementName_0(new ElementName(), 'ln', 'ln', 0, false, false, false);
|
jtulach@678
|
17914 |
LT = $ElementName_0(new ElementName(), 'lt', 'lt', 0, false, false, false);
|
jtulach@678
|
17915 |
MI = $ElementName_0(new ElementName(), 'mi', 'mi', 57, false, false, false);
|
jtulach@678
|
17916 |
MN = $ElementName_0(new ElementName(), 'mn', 'mn', 57, false, false, false);
|
jtulach@678
|
17917 |
MO = $ElementName_0(new ElementName(), 'mo', 'mo', 57, false, false, false);
|
jtulach@678
|
17918 |
MS = $ElementName_0(new ElementName(), 'ms', 'ms', 57, false, false, false);
|
jtulach@678
|
17919 |
OL = $ElementName_0(new ElementName(), 'ol', 'ol', 46, true, false, false);
|
jtulach@678
|
17920 |
OR = $ElementName_0(new ElementName(), 'or', 'or', 0, false, false, false);
|
jtulach@678
|
17921 |
PI = $ElementName_0(new ElementName(), 'pi', 'pi', 0, false, false, false);
|
jtulach@678
|
17922 |
RP = $ElementName_0(new ElementName(), 'rp', 'rp', 53, false, false, false);
|
jtulach@678
|
17923 |
RT_0 = $ElementName_0(new ElementName(), 'rt', 'rt', 53, false, false, false);
|
jtulach@678
|
17924 |
TD = $ElementName_0(new ElementName(), 'td', 'td', 40, false, true, false);
|
jtulach@678
|
17925 |
TH = $ElementName_0(new ElementName(), 'th', 'th', 40, false, true, false);
|
jtulach@678
|
17926 |
TR = $ElementName_0(new ElementName(), 'tr', 'tr', 37, true, false, true);
|
jtulach@678
|
17927 |
TT = $ElementName_0(new ElementName(), 'tt', 'tt', 45, false, false, false);
|
jtulach@678
|
17928 |
UL = $ElementName_0(new ElementName(), 'ul', 'ul', 46, true, false, false);
|
jtulach@678
|
17929 |
AND = $ElementName_0(new ElementName(), 'and', 'and', 0, false, false, false);
|
jtulach@678
|
17930 |
ARG = $ElementName_0(new ElementName(), 'arg', 'arg', 0, false, false, false);
|
jtulach@678
|
17931 |
ABS = $ElementName_0(new ElementName(), 'abs', 'abs', 0, false, false, false);
|
jtulach@678
|
17932 |
BIG = $ElementName_0(new ElementName(), 'big', 'big', 45, false, false, false);
|
jtulach@678
|
17933 |
BDO = $ElementName_0(new ElementName(), 'bdo', 'bdo', 0, false, false, false);
|
jtulach@678
|
17934 |
CSC = $ElementName_0(new ElementName(), 'csc', 'csc', 0, false, false, false);
|
jtulach@678
|
17935 |
COL = $ElementName_0(new ElementName(), 'col', 'col', 7, true, false, false);
|
jtulach@678
|
17936 |
COS = $ElementName_0(new ElementName(), 'cos', 'cos', 0, false, false, false);
|
jtulach@678
|
17937 |
COT = $ElementName_0(new ElementName(), 'cot', 'cot', 0, false, false, false);
|
jtulach@678
|
17938 |
DEL = $ElementName_0(new ElementName(), 'del', 'del', 0, false, false, false);
|
jtulach@678
|
17939 |
DFN = $ElementName_0(new ElementName(), 'dfn', 'dfn', 0, false, false, false);
|
jtulach@678
|
17940 |
DIR_0 = $ElementName_0(new ElementName(), 'dir', 'dir', 51, true, false, false);
|
jtulach@678
|
17941 |
DIV = $ElementName_0(new ElementName(), 'div', 'div', 50, true, false, false);
|
jtulach@678
|
17942 |
EXP = $ElementName_0(new ElementName(), 'exp', 'exp', 0, false, false, false);
|
jtulach@678
|
17943 |
GCD = $ElementName_0(new ElementName(), 'gcd', 'gcd', 0, false, false, false);
|
jtulach@678
|
17944 |
GEQ = $ElementName_0(new ElementName(), 'geq', 'geq', 0, false, false, false);
|
jtulach@678
|
17945 |
IMG = $ElementName_0(new ElementName(), 'img', 'img', 48, true, false, false);
|
jtulach@678
|
17946 |
INS = $ElementName_0(new ElementName(), 'ins', 'ins', 0, false, false, false);
|
jtulach@678
|
17947 |
INT = $ElementName_0(new ElementName(), 'int', 'int', 0, false, false, false);
|
jtulach@678
|
17948 |
KBD = $ElementName_0(new ElementName(), 'kbd', 'kbd', 0, false, false, false);
|
jtulach@678
|
17949 |
LOG = $ElementName_0(new ElementName(), 'log', 'log', 0, false, false, false);
|
jtulach@678
|
17950 |
LCM = $ElementName_0(new ElementName(), 'lcm', 'lcm', 0, false, false, false);
|
jtulach@678
|
17951 |
LEQ = $ElementName_0(new ElementName(), 'leq', 'leq', 0, false, false, false);
|
jtulach@678
|
17952 |
MTD = $ElementName_0(new ElementName(), 'mtd', 'mtd', 0, false, false, false);
|
jtulach@678
|
17953 |
MIN_0 = $ElementName_0(new ElementName(), 'min', 'min', 0, false, false, false);
|
jtulach@678
|
17954 |
MAP = $ElementName_0(new ElementName(), 'map', 'map', 0, false, false, false);
|
jtulach@678
|
17955 |
MTR = $ElementName_0(new ElementName(), 'mtr', 'mtr', 0, false, false, false);
|
jtulach@678
|
17956 |
MAX_0 = $ElementName_0(new ElementName(), 'max', 'max', 0, false, false, false);
|
jtulach@678
|
17957 |
NEQ = $ElementName_0(new ElementName(), 'neq', 'neq', 0, false, false, false);
|
jtulach@678
|
17958 |
NOT = $ElementName_0(new ElementName(), 'not', 'not', 0, false, false, false);
|
jtulach@678
|
17959 |
NAV = $ElementName_0(new ElementName(), 'nav', 'nav', 51, true, false, false);
|
jtulach@678
|
17960 |
PRE = $ElementName_0(new ElementName(), 'pre', 'pre', 44, true, false, false);
|
jtulach@678
|
17961 |
REM = $ElementName_0(new ElementName(), 'rem', 'rem', 0, false, false, false);
|
jtulach@678
|
17962 |
SUB = $ElementName_0(new ElementName(), 'sub', 'sub', 52, false, false, false);
|
jtulach@678
|
17963 |
SEC = $ElementName_0(new ElementName(), 'sec', 'sec', 0, false, false, false);
|
jtulach@678
|
17964 |
SVG = $ElementName_0(new ElementName(), 'svg', 'svg', 19, false, false, false);
|
jtulach@678
|
17965 |
SUM = $ElementName_0(new ElementName(), 'sum', 'sum', 0, false, false, false);
|
jtulach@678
|
17966 |
SIN = $ElementName_0(new ElementName(), 'sin', 'sin', 0, false, false, false);
|
jtulach@678
|
17967 |
SEP = $ElementName_0(new ElementName(), 'sep', 'sep', 0, false, false, false);
|
jtulach@678
|
17968 |
SUP = $ElementName_0(new ElementName(), 'sup', 'sup', 52, false, false, false);
|
jtulach@678
|
17969 |
SET = $ElementName_0(new ElementName(), 'set', 'set', 0, false, false, false);
|
jtulach@678
|
17970 |
TAN = $ElementName_0(new ElementName(), 'tan', 'tan', 0, false, false, false);
|
jtulach@678
|
17971 |
USE = $ElementName_0(new ElementName(), 'use', 'use', 0, false, false, false);
|
jtulach@678
|
17972 |
VAR = $ElementName_0(new ElementName(), 'var', 'var', 52, false, false, false);
|
jtulach@678
|
17973 |
WBR = $ElementName_0(new ElementName(), 'wbr', 'wbr', 49, true, false, false);
|
jtulach@678
|
17974 |
XMP = $ElementName_0(new ElementName(), 'xmp', 'xmp', 38, false, false, false);
|
jtulach@678
|
17975 |
XOR = $ElementName_0(new ElementName(), 'xor', 'xor', 0, false, false, false);
|
jtulach@678
|
17976 |
AREA = $ElementName_0(new ElementName(), 'area', 'area', 49, true, false, false);
|
jtulach@678
|
17977 |
ABBR_0 = $ElementName_0(new ElementName(), 'abbr', 'abbr', 0, false, false, false);
|
jtulach@678
|
17978 |
BASE_0 = $ElementName_0(new ElementName(), 'base', 'base', 2, true, false, false);
|
jtulach@678
|
17979 |
BVAR = $ElementName_0(new ElementName(), 'bvar', 'bvar', 0, false, false, false);
|
jtulach@678
|
17980 |
BODY = $ElementName_0(new ElementName(), 'body', 'body', 3, true, false, false);
|
jtulach@678
|
17981 |
CARD = $ElementName_0(new ElementName(), 'card', 'card', 0, false, false, false);
|
jtulach@678
|
17982 |
CODE_0 = $ElementName_0(new ElementName(), 'code', 'code', 45, false, false, false);
|
jtulach@678
|
17983 |
CITE_0 = $ElementName_0(new ElementName(), 'cite', 'cite', 0, false, false, false);
|
jtulach@678
|
17984 |
CSCH = $ElementName_0(new ElementName(), 'csch', 'csch', 0, false, false, false);
|
jtulach@678
|
17985 |
COSH = $ElementName_0(new ElementName(), 'cosh', 'cosh', 0, false, false, false);
|
jtulach@678
|
17986 |
COTH = $ElementName_0(new ElementName(), 'coth', 'coth', 0, false, false, false);
|
jtulach@678
|
17987 |
CURL = $ElementName_0(new ElementName(), 'curl', 'curl', 0, false, false, false);
|
jtulach@678
|
17988 |
DESC = $ElementName_0(new ElementName(), 'desc', 'desc', 59, false, false, false);
|
jtulach@678
|
17989 |
DIFF = $ElementName_0(new ElementName(), 'diff', 'diff', 0, false, false, false);
|
jtulach@678
|
17990 |
DEFS = $ElementName_0(new ElementName(), 'defs', 'defs', 0, false, false, false);
|
jtulach@678
|
17991 |
FORM_0 = $ElementName_0(new ElementName(), 'form', 'form', 9, true, false, false);
|
jtulach@678
|
17992 |
FONT = $ElementName_0(new ElementName(), 'font', 'font', 64, false, false, false);
|
jtulach@678
|
17993 |
GRAD = $ElementName_0(new ElementName(), 'grad', 'grad', 0, false, false, false);
|
jtulach@678
|
17994 |
HEAD = $ElementName_0(new ElementName(), 'head', 'head', 20, true, false, false);
|
jtulach@678
|
17995 |
HTML_0 = $ElementName_0(new ElementName(), 'html', 'html', 23, false, true, false);
|
jtulach@678
|
17996 |
LINE = $ElementName_0(new ElementName(), 'line', 'line', 0, false, false, false);
|
jtulach@678
|
17997 |
LINK_0 = $ElementName_0(new ElementName(), 'link', 'link', 16, true, false, false);
|
jtulach@678
|
17998 |
LIST_0 = $ElementName_0(new ElementName(), 'list', 'list', 0, false, false, false);
|
jtulach@678
|
17999 |
META = $ElementName_0(new ElementName(), 'meta', 'meta', 18, true, false, false);
|
jtulach@678
|
18000 |
MSUB = $ElementName_0(new ElementName(), 'msub', 'msub', 0, false, false, false);
|
jtulach@678
|
18001 |
MODE_0 = $ElementName_0(new ElementName(), 'mode', 'mode', 0, false, false, false);
|
jtulach@678
|
18002 |
MATH = $ElementName_0(new ElementName(), 'math', 'math', 17, false, false, false);
|
jtulach@678
|
18003 |
MARK = $ElementName_0(new ElementName(), 'mark', 'mark', 0, false, false, false);
|
jtulach@678
|
18004 |
MASK_0 = $ElementName_0(new ElementName(), 'mask', 'mask', 0, false, false, false);
|
jtulach@678
|
18005 |
MEAN = $ElementName_0(new ElementName(), 'mean', 'mean', 0, false, false, false);
|
jtulach@678
|
18006 |
MSUP = $ElementName_0(new ElementName(), 'msup', 'msup', 0, false, false, false);
|
jtulach@678
|
18007 |
MENU = $ElementName_0(new ElementName(), 'menu', 'menu', 50, true, false, false);
|
jtulach@678
|
18008 |
MROW = $ElementName_0(new ElementName(), 'mrow', 'mrow', 0, false, false, false);
|
jtulach@678
|
18009 |
NONE = $ElementName_0(new ElementName(), 'none', 'none', 0, false, false, false);
|
jtulach@678
|
18010 |
NOBR = $ElementName_0(new ElementName(), 'nobr', 'nobr', 24, false, false, false);
|
jtulach@678
|
18011 |
NEST = $ElementName_0(new ElementName(), 'nest', 'nest', 0, false, false, false);
|
jtulach@678
|
18012 |
PATH_0 = $ElementName_0(new ElementName(), 'path', 'path', 0, false, false, false);
|
jtulach@678
|
18013 |
PLUS = $ElementName_0(new ElementName(), 'plus', 'plus', 0, false, false, false);
|
jtulach@678
|
18014 |
RULE = $ElementName_0(new ElementName(), 'rule', 'rule', 0, false, false, false);
|
jtulach@678
|
18015 |
REAL = $ElementName_0(new ElementName(), 'real', 'real', 0, false, false, false);
|
jtulach@678
|
18016 |
RELN = $ElementName_0(new ElementName(), 'reln', 'reln', 0, false, false, false);
|
jtulach@678
|
18017 |
RECT = $ElementName_0(new ElementName(), 'rect', 'rect', 0, false, false, false);
|
jtulach@678
|
18018 |
ROOT = $ElementName_0(new ElementName(), 'root', 'root', 0, false, false, false);
|
jtulach@678
|
18019 |
RUBY = $ElementName_0(new ElementName(), 'ruby', 'ruby', 52, false, false, false);
|
jtulach@678
|
18020 |
SECH = $ElementName_0(new ElementName(), 'sech', 'sech', 0, false, false, false);
|
jtulach@678
|
18021 |
SINH = $ElementName_0(new ElementName(), 'sinh', 'sinh', 0, false, false, false);
|
jtulach@678
|
18022 |
SPAN_0 = $ElementName_0(new ElementName(), 'span', 'span', 52, false, false, false);
|
jtulach@678
|
18023 |
SAMP = $ElementName_0(new ElementName(), 'samp', 'samp', 0, false, false, false);
|
jtulach@678
|
18024 |
STOP = $ElementName_0(new ElementName(), 'stop', 'stop', 0, false, false, false);
|
jtulach@678
|
18025 |
SDEV = $ElementName_0(new ElementName(), 'sdev', 'sdev', 0, false, false, false);
|
jtulach@678
|
18026 |
TIME = $ElementName_0(new ElementName(), 'time', 'time', 0, false, false, false);
|
jtulach@678
|
18027 |
TRUE = $ElementName_0(new ElementName(), 'true', 'true', 0, false, false, false);
|
jtulach@678
|
18028 |
TREF = $ElementName_0(new ElementName(), 'tref', 'tref', 0, false, false, false);
|
jtulach@678
|
18029 |
TANH = $ElementName_0(new ElementName(), 'tanh', 'tanh', 0, false, false, false);
|
jtulach@678
|
18030 |
TEXT_0 = $ElementName_0(new ElementName(), 'text', 'text', 0, false, false, false);
|
jtulach@678
|
18031 |
VIEW = $ElementName_0(new ElementName(), 'view', 'view', 0, false, false, false);
|
jtulach@678
|
18032 |
ASIDE = $ElementName_0(new ElementName(), 'aside', 'aside', 51, true, false, false);
|
jtulach@678
|
18033 |
AUDIO = $ElementName_0(new ElementName(), 'audio', 'audio', 0, false, false, false);
|
jtulach@678
|
18034 |
APPLY = $ElementName_0(new ElementName(), 'apply', 'apply', 0, false, false, false);
|
jtulach@678
|
18035 |
EMBED = $ElementName_0(new ElementName(), 'embed', 'embed', 48, true, false, false);
|
jtulach@678
|
18036 |
FRAME_0 = $ElementName_0(new ElementName(), 'frame', 'frame', 10, true, false, false);
|
jtulach@678
|
18037 |
FALSE = $ElementName_0(new ElementName(), 'false', 'false', 0, false, false, false);
|
jtulach@678
|
18038 |
FLOOR = $ElementName_0(new ElementName(), 'floor', 'floor', 0, false, false, false);
|
jtulach@678
|
18039 |
GLYPH = $ElementName_0(new ElementName(), 'glyph', 'glyph', 0, false, false, false);
|
jtulach@678
|
18040 |
HKERN = $ElementName_0(new ElementName(), 'hkern', 'hkern', 0, false, false, false);
|
jtulach@678
|
18041 |
IMAGE = $ElementName_0(new ElementName(), 'image', 'image', 12, true, false, false);
|
jtulach@678
|
18042 |
IDENT = $ElementName_0(new ElementName(), 'ident', 'ident', 0, false, false, false);
|
jtulach@678
|
18043 |
INPUT = $ElementName_0(new ElementName(), 'input', 'input', 13, true, false, false);
|
jtulach@678
|
18044 |
LABEL_0 = $ElementName_0(new ElementName(), 'label', 'label', 62, false, false, false);
|
jtulach@678
|
18045 |
LIMIT = $ElementName_0(new ElementName(), 'limit', 'limit', 0, false, false, false);
|
jtulach@678
|
18046 |
MFRAC = $ElementName_0(new ElementName(), 'mfrac', 'mfrac', 0, false, false, false);
|
jtulach@678
|
18047 |
MPATH = $ElementName_0(new ElementName(), 'mpath', 'mpath', 0, false, false, false);
|
jtulach@678
|
18048 |
METER = $ElementName_0(new ElementName(), 'meter', 'meter', 0, false, false, false);
|
jtulach@678
|
18049 |
MOVER = $ElementName_0(new ElementName(), 'mover', 'mover', 0, false, false, false);
|
jtulach@678
|
18050 |
MINUS = $ElementName_0(new ElementName(), 'minus', 'minus', 0, false, false, false);
|
jtulach@678
|
18051 |
MROOT = $ElementName_0(new ElementName(), 'mroot', 'mroot', 0, false, false, false);
|
jtulach@678
|
18052 |
MSQRT = $ElementName_0(new ElementName(), 'msqrt', 'msqrt', 0, false, false, false);
|
jtulach@678
|
18053 |
MTEXT = $ElementName_0(new ElementName(), 'mtext', 'mtext', 57, false, false, false);
|
jtulach@678
|
18054 |
NOTIN = $ElementName_0(new ElementName(), 'notin', 'notin', 0, false, false, false);
|
jtulach@678
|
18055 |
PIECE = $ElementName_0(new ElementName(), 'piece', 'piece', 0, false, false, false);
|
jtulach@678
|
18056 |
PARAM = $ElementName_0(new ElementName(), 'param', 'param', 55, true, false, false);
|
jtulach@678
|
18057 |
POWER = $ElementName_0(new ElementName(), 'power', 'power', 0, false, false, false);
|
jtulach@678
|
18058 |
REALS = $ElementName_0(new ElementName(), 'reals', 'reals', 0, false, false, false);
|
jtulach@678
|
18059 |
STYLE_0 = $ElementName_0(new ElementName(), 'style', 'style', 33, true, false, false);
|
jtulach@678
|
18060 |
SMALL = $ElementName_0(new ElementName(), 'small', 'small', 45, false, false, false);
|
jtulach@678
|
18061 |
THEAD = $ElementName_0(new ElementName(), 'thead', 'thead', 39, true, false, true);
|
jtulach@678
|
18062 |
TABLE = $ElementName_0(new ElementName(), 'table', 'table', 34, false, true, true);
|
jtulach@678
|
18063 |
TITLE_0 = $ElementName_0(new ElementName(), 'title', 'title', 36, true, false, false);
|
jtulach@678
|
18064 |
TSPAN = $ElementName_0(new ElementName(), 'tspan', 'tspan', 0, false, false, false);
|
jtulach@678
|
18065 |
TIMES = $ElementName_0(new ElementName(), 'times', 'times', 0, false, false, false);
|
jtulach@678
|
18066 |
TFOOT = $ElementName_0(new ElementName(), 'tfoot', 'tfoot', 39, true, false, true);
|
jtulach@678
|
18067 |
TBODY = $ElementName_0(new ElementName(), 'tbody', 'tbody', 39, true, false, true);
|
jtulach@678
|
18068 |
UNION = $ElementName_0(new ElementName(), 'union', 'union', 0, false, false, false);
|
jtulach@678
|
18069 |
VKERN = $ElementName_0(new ElementName(), 'vkern', 'vkern', 0, false, false, false);
|
jtulach@678
|
18070 |
VIDEO = $ElementName_0(new ElementName(), 'video', 'video', 0, false, false, false);
|
jtulach@678
|
18071 |
ARCSEC = $ElementName_0(new ElementName(), 'arcsec', 'arcsec', 0, false, false, false);
|
jtulach@678
|
18072 |
ARCCSC = $ElementName_0(new ElementName(), 'arccsc', 'arccsc', 0, false, false, false);
|
jtulach@678
|
18073 |
ARCTAN = $ElementName_0(new ElementName(), 'arctan', 'arctan', 0, false, false, false);
|
jtulach@678
|
18074 |
ARCSIN = $ElementName_0(new ElementName(), 'arcsin', 'arcsin', 0, false, false, false);
|
jtulach@678
|
18075 |
ARCCOS = $ElementName_0(new ElementName(), 'arccos', 'arccos', 0, false, false, false);
|
jtulach@678
|
18076 |
APPLET = $ElementName_0(new ElementName(), 'applet', 'applet', 43, false, true, false);
|
jtulach@678
|
18077 |
ARCCOT = $ElementName_0(new ElementName(), 'arccot', 'arccot', 0, false, false, false);
|
jtulach@678
|
18078 |
APPROX = $ElementName_0(new ElementName(), 'approx', 'approx', 0, false, false, false);
|
jtulach@678
|
18079 |
BUTTON = $ElementName_0(new ElementName(), 'button', 'button', 5, false, true, false);
|
jtulach@678
|
18080 |
CIRCLE = $ElementName_0(new ElementName(), 'circle', 'circle', 0, false, false, false);
|
jtulach@678
|
18081 |
CENTER = $ElementName_0(new ElementName(), 'center', 'center', 50, true, false, false);
|
jtulach@678
|
18082 |
CURSOR_0 = $ElementName_0(new ElementName(), 'cursor', 'cursor', 0, false, false, false);
|
jtulach@678
|
18083 |
CANVAS = $ElementName_0(new ElementName(), 'canvas', 'canvas', 0, false, false, false);
|
jtulach@678
|
18084 |
DIVIDE = $ElementName_0(new ElementName(), 'divide', 'divide', 0, false, false, false);
|
jtulach@678
|
18085 |
DEGREE = $ElementName_0(new ElementName(), 'degree', 'degree', 0, false, false, false);
|
jtulach@678
|
18086 |
DIALOG = $ElementName_0(new ElementName(), 'dialog', 'dialog', 51, true, false, false);
|
jtulach@678
|
18087 |
DOMAIN = $ElementName_0(new ElementName(), 'domain', 'domain', 0, false, false, false);
|
jtulach@678
|
18088 |
EXISTS = $ElementName_0(new ElementName(), 'exists', 'exists', 0, false, false, false);
|
jtulach@678
|
18089 |
FETILE = $ElementName_0(new ElementName(), 'fetile', 'feTile', 0, false, false, false);
|
jtulach@678
|
18090 |
FIGURE = $ElementName_0(new ElementName(), 'figure', 'figure', 51, true, false, false);
|
jtulach@678
|
18091 |
FORALL = $ElementName_0(new ElementName(), 'forall', 'forall', 0, false, false, false);
|
jtulach@678
|
18092 |
FILTER_0 = $ElementName_0(new ElementName(), 'filter', 'filter', 0, false, false, false);
|
jtulach@678
|
18093 |
FOOTER = $ElementName_0(new ElementName(), 'footer', 'footer', 51, true, false, false);
|
jtulach@678
|
18094 |
HEADER = $ElementName_0(new ElementName(), 'header', 'header', 51, true, false, false);
|
jtulach@678
|
18095 |
IFRAME = $ElementName_0(new ElementName(), 'iframe', 'iframe', 47, true, false, false);
|
jtulach@678
|
18096 |
KEYGEN = $ElementName_0(new ElementName(), 'keygen', 'keygen', 65, true, false, false);
|
jtulach@678
|
18097 |
LAMBDA = $ElementName_0(new ElementName(), 'lambda', 'lambda', 0, false, false, false);
|
jtulach@678
|
18098 |
LEGEND = $ElementName_0(new ElementName(), 'legend', 'legend', 0, false, false, false);
|
jtulach@678
|
18099 |
MSPACE = $ElementName_0(new ElementName(), 'mspace', 'mspace', 0, false, false, false);
|
jtulach@678
|
18100 |
MTABLE = $ElementName_0(new ElementName(), 'mtable', 'mtable', 0, false, false, false);
|
jtulach@678
|
18101 |
MSTYLE = $ElementName_0(new ElementName(), 'mstyle', 'mstyle', 0, false, false, false);
|
jtulach@678
|
18102 |
MGLYPH = $ElementName_0(new ElementName(), 'mglyph', 'mglyph', 56, false, false, false);
|
jtulach@678
|
18103 |
MEDIAN = $ElementName_0(new ElementName(), 'median', 'median', 0, false, false, false);
|
jtulach@678
|
18104 |
MUNDER = $ElementName_0(new ElementName(), 'munder', 'munder', 0, false, false, false);
|
jtulach@678
|
18105 |
MARKER = $ElementName_0(new ElementName(), 'marker', 'marker', 0, false, false, false);
|
jtulach@678
|
18106 |
MERROR = $ElementName_0(new ElementName(), 'merror', 'merror', 0, false, false, false);
|
jtulach@678
|
18107 |
MOMENT = $ElementName_0(new ElementName(), 'moment', 'moment', 0, false, false, false);
|
jtulach@678
|
18108 |
MATRIX = $ElementName_0(new ElementName(), 'matrix', 'matrix', 0, false, false, false);
|
jtulach@678
|
18109 |
OPTION = $ElementName_0(new ElementName(), 'option', 'option', 28, true, false, false);
|
jtulach@678
|
18110 |
OBJECT_0 = $ElementName_0(new ElementName(), 'object', 'object', 63, false, true, false);
|
jtulach@678
|
18111 |
OUTPUT = $ElementName_0(new ElementName(), 'output', 'output', 62, false, false, false);
|
jtulach@678
|
18112 |
PRIMES = $ElementName_0(new ElementName(), 'primes', 'primes', 0, false, false, false);
|
jtulach@678
|
18113 |
SOURCE = $ElementName_0(new ElementName(), 'source', 'source', 55, false, false, false);
|
jtulach@678
|
18114 |
STRIKE = $ElementName_0(new ElementName(), 'strike', 'strike', 45, false, false, false);
|
jtulach@678
|
18115 |
STRONG = $ElementName_0(new ElementName(), 'strong', 'strong', 45, false, false, false);
|
jtulach@678
|
18116 |
SWITCH = $ElementName_0(new ElementName(), 'switch', 'switch', 0, false, false, false);
|
jtulach@678
|
18117 |
SYMBOL = $ElementName_0(new ElementName(), 'symbol', 'symbol', 0, false, false, false);
|
jtulach@678
|
18118 |
SPACER = $ElementName_0(new ElementName(), 'spacer', 'spacer', 49, true, false, false);
|
jtulach@678
|
18119 |
SELECT = $ElementName_0(new ElementName(), 'select', 'select', 32, true, false, false);
|
jtulach@678
|
18120 |
SUBSET = $ElementName_0(new ElementName(), 'subset', 'subset', 0, false, false, false);
|
jtulach@678
|
18121 |
SCRIPT = $ElementName_0(new ElementName(), 'script', 'script', 31, true, false, false);
|
jtulach@678
|
18122 |
TBREAK = $ElementName_0(new ElementName(), 'tbreak', 'tbreak', 0, false, false, false);
|
jtulach@678
|
18123 |
VECTOR = $ElementName_0(new ElementName(), 'vector', 'vector', 0, false, false, false);
|
jtulach@678
|
18124 |
ARTICLE = $ElementName_0(new ElementName(), 'article', 'article', 51, true, false, false);
|
jtulach@678
|
18125 |
ANIMATE = $ElementName_0(new ElementName(), 'animate', 'animate', 0, false, false, false);
|
jtulach@678
|
18126 |
ARCSECH = $ElementName_0(new ElementName(), 'arcsech', 'arcsech', 0, false, false, false);
|
jtulach@678
|
18127 |
ARCCSCH = $ElementName_0(new ElementName(), 'arccsch', 'arccsch', 0, false, false, false);
|
jtulach@678
|
18128 |
ARCTANH = $ElementName_0(new ElementName(), 'arctanh', 'arctanh', 0, false, false, false);
|
jtulach@678
|
18129 |
ARCSINH = $ElementName_0(new ElementName(), 'arcsinh', 'arcsinh', 0, false, false, false);
|
jtulach@678
|
18130 |
ARCCOSH = $ElementName_0(new ElementName(), 'arccosh', 'arccosh', 0, false, false, false);
|
jtulach@678
|
18131 |
ARCCOTH = $ElementName_0(new ElementName(), 'arccoth', 'arccoth', 0, false, false, false);
|
jtulach@678
|
18132 |
ACRONYM = $ElementName_0(new ElementName(), 'acronym', 'acronym', 0, false, false, false);
|
jtulach@678
|
18133 |
ADDRESS = $ElementName_0(new ElementName(), 'address', 'address', 51, true, false, false);
|
jtulach@678
|
18134 |
BGSOUND = $ElementName_0(new ElementName(), 'bgsound', 'bgsound', 49, true, false, false);
|
jtulach@678
|
18135 |
COMMAND = $ElementName_0(new ElementName(), 'command', 'command', 54, true, false, false);
|
jtulach@678
|
18136 |
COMPOSE = $ElementName_0(new ElementName(), 'compose', 'compose', 0, false, false, false);
|
jtulach@678
|
18137 |
CEILING = $ElementName_0(new ElementName(), 'ceiling', 'ceiling', 0, false, false, false);
|
jtulach@678
|
18138 |
CSYMBOL = $ElementName_0(new ElementName(), 'csymbol', 'csymbol', 0, false, false, false);
|
jtulach@678
|
18139 |
CAPTION = $ElementName_0(new ElementName(), 'caption', 'caption', 6, false, true, false);
|
jtulach@678
|
18140 |
DISCARD = $ElementName_0(new ElementName(), 'discard', 'discard', 0, false, false, false);
|
jtulach@678
|
18141 |
DECLARE_0 = $ElementName_0(new ElementName(), 'declare', 'declare', 0, false, false, false);
|
jtulach@678
|
18142 |
DETAILS = $ElementName_0(new ElementName(), 'details', 'details', 51, true, false, false);
|
jtulach@678
|
18143 |
ELLIPSE = $ElementName_0(new ElementName(), 'ellipse', 'ellipse', 0, false, false, false);
|
jtulach@678
|
18144 |
FEFUNCA = $ElementName_0(new ElementName(), 'fefunca', 'feFuncA', 0, false, false, false);
|
jtulach@678
|
18145 |
FEFUNCB = $ElementName_0(new ElementName(), 'fefuncb', 'feFuncB', 0, false, false, false);
|
jtulach@678
|
18146 |
FEBLEND = $ElementName_0(new ElementName(), 'feblend', 'feBlend', 0, false, false, false);
|
jtulach@678
|
18147 |
FEFLOOD = $ElementName_0(new ElementName(), 'feflood', 'feFlood', 0, false, false, false);
|
jtulach@678
|
18148 |
FEIMAGE = $ElementName_0(new ElementName(), 'feimage', 'feImage', 0, false, false, false);
|
jtulach@678
|
18149 |
FEMERGE = $ElementName_0(new ElementName(), 'femerge', 'feMerge', 0, false, false, false);
|
jtulach@678
|
18150 |
FEFUNCG = $ElementName_0(new ElementName(), 'fefuncg', 'feFuncG', 0, false, false, false);
|
jtulach@678
|
18151 |
FEFUNCR = $ElementName_0(new ElementName(), 'fefuncr', 'feFuncR', 0, false, false, false);
|
jtulach@678
|
18152 |
HANDLER = $ElementName_0(new ElementName(), 'handler', 'handler', 0, false, false, false);
|
jtulach@678
|
18153 |
INVERSE = $ElementName_0(new ElementName(), 'inverse', 'inverse', 0, false, false, false);
|
jtulach@678
|
18154 |
IMPLIES = $ElementName_0(new ElementName(), 'implies', 'implies', 0, false, false, false);
|
jtulach@678
|
18155 |
ISINDEX = $ElementName_0(new ElementName(), 'isindex', 'isindex', 14, true, false, false);
|
jtulach@678
|
18156 |
LOGBASE = $ElementName_0(new ElementName(), 'logbase', 'logbase', 0, false, false, false);
|
jtulach@678
|
18157 |
LISTING = $ElementName_0(new ElementName(), 'listing', 'listing', 44, true, false, false);
|
jtulach@678
|
18158 |
MFENCED = $ElementName_0(new ElementName(), 'mfenced', 'mfenced', 0, false, false, false);
|
jtulach@678
|
18159 |
MPADDED = $ElementName_0(new ElementName(), 'mpadded', 'mpadded', 0, false, false, false);
|
jtulach@678
|
18160 |
MARQUEE = $ElementName_0(new ElementName(), 'marquee', 'marquee', 43, false, true, false);
|
jtulach@678
|
18161 |
MACTION = $ElementName_0(new ElementName(), 'maction', 'maction', 0, false, false, false);
|
jtulach@678
|
18162 |
MSUBSUP = $ElementName_0(new ElementName(), 'msubsup', 'msubsup', 0, false, false, false);
|
jtulach@678
|
18163 |
NOEMBED = $ElementName_0(new ElementName(), 'noembed', 'noembed', 60, true, false, false);
|
jtulach@678
|
18164 |
POLYGON = $ElementName_0(new ElementName(), 'polygon', 'polygon', 0, false, false, false);
|
jtulach@678
|
18165 |
PATTERN_0 = $ElementName_0(new ElementName(), 'pattern', 'pattern', 0, false, false, false);
|
jtulach@678
|
18166 |
PRODUCT = $ElementName_0(new ElementName(), 'product', 'product', 0, false, false, false);
|
jtulach@678
|
18167 |
SETDIFF = $ElementName_0(new ElementName(), 'setdiff', 'setdiff', 0, false, false, false);
|
jtulach@678
|
18168 |
SECTION = $ElementName_0(new ElementName(), 'section', 'section', 51, true, false, false);
|
jtulach@678
|
18169 |
TENDSTO = $ElementName_0(new ElementName(), 'tendsto', 'tendsto', 0, false, false, false);
|
jtulach@678
|
18170 |
UPLIMIT = $ElementName_0(new ElementName(), 'uplimit', 'uplimit', 0, false, false, false);
|
jtulach@678
|
18171 |
ALTGLYPH = $ElementName_0(new ElementName(), 'altglyph', 'altGlyph', 0, false, false, false);
|
jtulach@678
|
18172 |
BASEFONT = $ElementName_0(new ElementName(), 'basefont', 'basefont', 49, true, false, false);
|
jtulach@678
|
18173 |
CLIPPATH = $ElementName_0(new ElementName(), 'clippath', 'clipPath', 0, false, false, false);
|
jtulach@678
|
18174 |
CODOMAIN = $ElementName_0(new ElementName(), 'codomain', 'codomain', 0, false, false, false);
|
jtulach@678
|
18175 |
COLGROUP = $ElementName_0(new ElementName(), 'colgroup', 'colgroup', 8, true, false, false);
|
jtulach@678
|
18176 |
DATAGRID = $ElementName_0(new ElementName(), 'datagrid', 'datagrid', 51, true, false, false);
|
jtulach@678
|
18177 |
EMPTYSET = $ElementName_0(new ElementName(), 'emptyset', 'emptyset', 0, false, false, false);
|
jtulach@678
|
18178 |
FACTOROF = $ElementName_0(new ElementName(), 'factorof', 'factorof', 0, false, false, false);
|
jtulach@678
|
18179 |
FIELDSET = $ElementName_0(new ElementName(), 'fieldset', 'fieldset', 61, true, false, false);
|
jtulach@678
|
18180 |
FRAMESET = $ElementName_0(new ElementName(), 'frameset', 'frameset', 11, true, false, false);
|
jtulach@678
|
18181 |
FEOFFSET = $ElementName_0(new ElementName(), 'feoffset', 'feOffset', 0, false, false, false);
|
jtulach@678
|
18182 |
GLYPHREF_0 = $ElementName_0(new ElementName(), 'glyphref', 'glyphRef', 0, false, false, false);
|
jtulach@678
|
18183 |
INTERVAL = $ElementName_0(new ElementName(), 'interval', 'interval', 0, false, false, false);
|
jtulach@678
|
18184 |
INTEGERS = $ElementName_0(new ElementName(), 'integers', 'integers', 0, false, false, false);
|
jtulach@678
|
18185 |
INFINITY = $ElementName_0(new ElementName(), 'infinity', 'infinity', 0, false, false, false);
|
jtulach@678
|
18186 |
LISTENER = $ElementName_0(new ElementName(), 'listener', 'listener', 0, false, false, false);
|
jtulach@678
|
18187 |
LOWLIMIT = $ElementName_0(new ElementName(), 'lowlimit', 'lowlimit', 0, false, false, false);
|
jtulach@678
|
18188 |
METADATA = $ElementName_0(new ElementName(), 'metadata', 'metadata', 0, false, false, false);
|
jtulach@678
|
18189 |
MENCLOSE = $ElementName_0(new ElementName(), 'menclose', 'menclose', 0, false, false, false);
|
jtulach@678
|
18190 |
MPHANTOM = $ElementName_0(new ElementName(), 'mphantom', 'mphantom', 0, false, false, false);
|
jtulach@678
|
18191 |
NOFRAMES = $ElementName_0(new ElementName(), 'noframes', 'noframes', 25, true, false, false);
|
jtulach@678
|
18192 |
NOSCRIPT = $ElementName_0(new ElementName(), 'noscript', 'noscript', 26, true, false, false);
|
jtulach@678
|
18193 |
OPTGROUP = $ElementName_0(new ElementName(), 'optgroup', 'optgroup', 27, true, false, false);
|
jtulach@678
|
18194 |
POLYLINE = $ElementName_0(new ElementName(), 'polyline', 'polyline', 0, false, false, false);
|
jtulach@678
|
18195 |
PREFETCH = $ElementName_0(new ElementName(), 'prefetch', 'prefetch', 0, false, false, false);
|
jtulach@678
|
18196 |
PROGRESS = $ElementName_0(new ElementName(), 'progress', 'progress', 0, false, false, false);
|
jtulach@678
|
18197 |
PRSUBSET = $ElementName_0(new ElementName(), 'prsubset', 'prsubset', 0, false, false, false);
|
jtulach@678
|
18198 |
QUOTIENT = $ElementName_0(new ElementName(), 'quotient', 'quotient', 0, false, false, false);
|
jtulach@678
|
18199 |
SELECTOR = $ElementName_0(new ElementName(), 'selector', 'selector', 0, false, false, false);
|
jtulach@678
|
18200 |
TEXTAREA = $ElementName_0(new ElementName(), 'textarea', 'textarea', 35, true, false, false);
|
jtulach@678
|
18201 |
TEXTPATH = $ElementName_0(new ElementName(), 'textpath', 'textPath', 0, false, false, false);
|
jtulach@678
|
18202 |
VARIANCE = $ElementName_0(new ElementName(), 'variance', 'variance', 0, false, false, false);
|
jtulach@678
|
18203 |
ANIMATION = $ElementName_0(new ElementName(), 'animation', 'animation', 0, false, false, false);
|
jtulach@678
|
18204 |
CONJUGATE = $ElementName_0(new ElementName(), 'conjugate', 'conjugate', 0, false, false, false);
|
jtulach@678
|
18205 |
CONDITION = $ElementName_0(new ElementName(), 'condition', 'condition', 0, false, false, false);
|
jtulach@678
|
18206 |
COMPLEXES = $ElementName_0(new ElementName(), 'complexes', 'complexes', 0, false, false, false);
|
jtulach@678
|
18207 |
FONT_FACE = $ElementName_0(new ElementName(), 'font-face', 'font-face', 0, false, false, false);
|
jtulach@678
|
18208 |
FACTORIAL = $ElementName_0(new ElementName(), 'factorial', 'factorial', 0, false, false, false);
|
jtulach@678
|
18209 |
INTERSECT = $ElementName_0(new ElementName(), 'intersect', 'intersect', 0, false, false, false);
|
jtulach@678
|
18210 |
IMAGINARY = $ElementName_0(new ElementName(), 'imaginary', 'imaginary', 0, false, false, false);
|
jtulach@678
|
18211 |
LAPLACIAN = $ElementName_0(new ElementName(), 'laplacian', 'laplacian', 0, false, false, false);
|
jtulach@678
|
18212 |
MATRIXROW = $ElementName_0(new ElementName(), 'matrixrow', 'matrixrow', 0, false, false, false);
|
jtulach@678
|
18213 |
NOTSUBSET = $ElementName_0(new ElementName(), 'notsubset', 'notsubset', 0, false, false, false);
|
jtulach@678
|
18214 |
OTHERWISE = $ElementName_0(new ElementName(), 'otherwise', 'otherwise', 0, false, false, false);
|
jtulach@678
|
18215 |
PIECEWISE = $ElementName_0(new ElementName(), 'piecewise', 'piecewise', 0, false, false, false);
|
jtulach@678
|
18216 |
PLAINTEXT = $ElementName_0(new ElementName(), 'plaintext', 'plaintext', 30, true, false, false);
|
jtulach@678
|
18217 |
RATIONALS = $ElementName_0(new ElementName(), 'rationals', 'rationals', 0, false, false, false);
|
jtulach@678
|
18218 |
SEMANTICS = $ElementName_0(new ElementName(), 'semantics', 'semantics', 0, false, false, false);
|
jtulach@678
|
18219 |
TRANSPOSE = $ElementName_0(new ElementName(), 'transpose', 'transpose', 0, false, false, false);
|
jtulach@678
|
18220 |
ANNOTATION = $ElementName_0(new ElementName(), 'annotation', 'annotation', 0, false, false, false);
|
jtulach@678
|
18221 |
BLOCKQUOTE = $ElementName_0(new ElementName(), 'blockquote', 'blockquote', 50, true, false, false);
|
jtulach@678
|
18222 |
DIVERGENCE = $ElementName_0(new ElementName(), 'divergence', 'divergence', 0, false, false, false);
|
jtulach@678
|
18223 |
EULERGAMMA = $ElementName_0(new ElementName(), 'eulergamma', 'eulergamma', 0, false, false, false);
|
jtulach@678
|
18224 |
EQUIVALENT = $ElementName_0(new ElementName(), 'equivalent', 'equivalent', 0, false, false, false);
|
jtulach@678
|
18225 |
IMAGINARYI = $ElementName_0(new ElementName(), 'imaginaryi', 'imaginaryi', 0, false, false, false);
|
jtulach@678
|
18226 |
MALIGNMARK = $ElementName_0(new ElementName(), 'malignmark', 'malignmark', 56, false, false, false);
|
jtulach@678
|
18227 |
MUNDEROVER = $ElementName_0(new ElementName(), 'munderover', 'munderover', 0, false, false, false);
|
jtulach@678
|
18228 |
MLABELEDTR = $ElementName_0(new ElementName(), 'mlabeledtr', 'mlabeledtr', 0, false, false, false);
|
jtulach@678
|
18229 |
NOTANUMBER = $ElementName_0(new ElementName(), 'notanumber', 'notanumber', 0, false, false, false);
|
jtulach@678
|
18230 |
SOLIDCOLOR = $ElementName_0(new ElementName(), 'solidcolor', 'solidcolor', 0, false, false, false);
|
jtulach@678
|
18231 |
ALTGLYPHDEF = $ElementName_0(new ElementName(), 'altglyphdef', 'altGlyphDef', 0, false, false, false);
|
jtulach@678
|
18232 |
DETERMINANT = $ElementName_0(new ElementName(), 'determinant', 'determinant', 0, false, false, false);
|
jtulach@678
|
18233 |
EVENTSOURCE = $ElementName_0(new ElementName(), 'eventsource', 'eventsource', 54, true, false, false);
|
jtulach@678
|
18234 |
FEMERGENODE = $ElementName_0(new ElementName(), 'femergenode', 'feMergeNode', 0, false, false, false);
|
jtulach@678
|
18235 |
FECOMPOSITE = $ElementName_0(new ElementName(), 'fecomposite', 'feComposite', 0, false, false, false);
|
jtulach@678
|
18236 |
FESPOTLIGHT = $ElementName_0(new ElementName(), 'fespotlight', 'feSpotLight', 0, false, false, false);
|
jtulach@678
|
18237 |
MALIGNGROUP = $ElementName_0(new ElementName(), 'maligngroup', 'maligngroup', 0, false, false, false);
|
jtulach@678
|
18238 |
MPRESCRIPTS = $ElementName_0(new ElementName(), 'mprescripts', 'mprescripts', 0, false, false, false);
|
jtulach@678
|
18239 |
MOMENTABOUT = $ElementName_0(new ElementName(), 'momentabout', 'momentabout', 0, false, false, false);
|
jtulach@678
|
18240 |
NOTPRSUBSET = $ElementName_0(new ElementName(), 'notprsubset', 'notprsubset', 0, false, false, false);
|
jtulach@678
|
18241 |
PARTIALDIFF = $ElementName_0(new ElementName(), 'partialdiff', 'partialdiff', 0, false, false, false);
|
jtulach@678
|
18242 |
ALTGLYPHITEM = $ElementName_0(new ElementName(), 'altglyphitem', 'altGlyphItem', 0, false, false, false);
|
jtulach@678
|
18243 |
ANIMATECOLOR = $ElementName_0(new ElementName(), 'animatecolor', 'animateColor', 0, false, false, false);
|
jtulach@678
|
18244 |
DATATEMPLATE = $ElementName_0(new ElementName(), 'datatemplate', 'datatemplate', 0, false, false, false);
|
jtulach@678
|
18245 |
EXPONENTIALE = $ElementName_0(new ElementName(), 'exponentiale', 'exponentiale', 0, false, false, false);
|
jtulach@678
|
18246 |
FETURBULENCE = $ElementName_0(new ElementName(), 'feturbulence', 'feTurbulence', 0, false, false, false);
|
jtulach@678
|
18247 |
FEPOINTLIGHT = $ElementName_0(new ElementName(), 'fepointlight', 'fePointLight', 0, false, false, false);
|
jtulach@678
|
18248 |
FEMORPHOLOGY = $ElementName_0(new ElementName(), 'femorphology', 'feMorphology', 0, false, false, false);
|
jtulach@678
|
18249 |
OUTERPRODUCT = $ElementName_0(new ElementName(), 'outerproduct', 'outerproduct', 0, false, false, false);
|
jtulach@678
|
18250 |
ANIMATEMOTION = $ElementName_0(new ElementName(), 'animatemotion', 'animateMotion', 0, false, false, false);
|
jtulach@678
|
18251 |
COLOR_PROFILE_0 = $ElementName_0(new ElementName(), 'color-profile', 'color-profile', 0, false, false, false);
|
jtulach@678
|
18252 |
FONT_FACE_SRC = $ElementName_0(new ElementName(), 'font-face-src', 'font-face-src', 0, false, false, false);
|
jtulach@678
|
18253 |
FONT_FACE_URI = $ElementName_0(new ElementName(), 'font-face-uri', 'font-face-uri', 0, false, false, false);
|
jtulach@678
|
18254 |
FOREIGNOBJECT = $ElementName_0(new ElementName(), 'foreignobject', 'foreignObject', 59, false, false, false);
|
jtulach@678
|
18255 |
FECOLORMATRIX = $ElementName_0(new ElementName(), 'fecolormatrix', 'feColorMatrix', 0, false, false, false);
|
jtulach@678
|
18256 |
MISSING_GLYPH = $ElementName_0(new ElementName(), 'missing-glyph', 'missing-glyph', 0, false, false, false);
|
jtulach@678
|
18257 |
MMULTISCRIPTS = $ElementName_0(new ElementName(), 'mmultiscripts', 'mmultiscripts', 0, false, false, false);
|
jtulach@678
|
18258 |
SCALARPRODUCT = $ElementName_0(new ElementName(), 'scalarproduct', 'scalarproduct', 0, false, false, false);
|
jtulach@678
|
18259 |
VECTORPRODUCT = $ElementName_0(new ElementName(), 'vectorproduct', 'vectorproduct', 0, false, false, false);
|
jtulach@678
|
18260 |
ANNOTATION_XML = $ElementName_0(new ElementName(), 'annotation-xml', 'annotation-xml', 58, false, false, false);
|
jtulach@678
|
18261 |
DEFINITION_SRC = $ElementName_0(new ElementName(), 'definition-src', 'definition-src', 0, false, false, false);
|
jtulach@678
|
18262 |
FONT_FACE_NAME = $ElementName_0(new ElementName(), 'font-face-name', 'font-face-name', 0, false, false, false);
|
jtulach@678
|
18263 |
FEGAUSSIANBLUR = $ElementName_0(new ElementName(), 'fegaussianblur', 'feGaussianBlur', 0, false, false, false);
|
jtulach@678
|
18264 |
FEDISTANTLIGHT = $ElementName_0(new ElementName(), 'fedistantlight', 'feDistantLight', 0, false, false, false);
|
jtulach@678
|
18265 |
LINEARGRADIENT = $ElementName_0(new ElementName(), 'lineargradient', 'linearGradient', 0, false, false, false);
|
jtulach@678
|
18266 |
NATURALNUMBERS = $ElementName_0(new ElementName(), 'naturalnumbers', 'naturalnumbers', 0, false, false, false);
|
jtulach@678
|
18267 |
RADIALGRADIENT = $ElementName_0(new ElementName(), 'radialgradient', 'radialGradient', 0, false, false, false);
|
jtulach@678
|
18268 |
ANIMATETRANSFORM = $ElementName_0(new ElementName(), 'animatetransform', 'animateTransform', 0, false, false, false);
|
jtulach@678
|
18269 |
CARTESIANPRODUCT = $ElementName_0(new ElementName(), 'cartesianproduct', 'cartesianproduct', 0, false, false, false);
|
jtulach@678
|
18270 |
FONT_FACE_FORMAT = $ElementName_0(new ElementName(), 'font-face-format', 'font-face-format', 0, false, false, false);
|
jtulach@678
|
18271 |
FECONVOLVEMATRIX = $ElementName_0(new ElementName(), 'feconvolvematrix', 'feConvolveMatrix', 0, false, false, false);
|
jtulach@678
|
18272 |
FEDIFFUSELIGHTING = $ElementName_0(new ElementName(), 'fediffuselighting', 'feDiffuseLighting', 0, false, false, false);
|
jtulach@678
|
18273 |
FEDISPLACEMENTMAP = $ElementName_0(new ElementName(), 'fedisplacementmap', 'feDisplacementMap', 0, false, false, false);
|
jtulach@678
|
18274 |
FESPECULARLIGHTING = $ElementName_0(new ElementName(), 'fespecularlighting', 'feSpecularLighting', 0, false, false, false);
|
jtulach@678
|
18275 |
DOMAINOFAPPLICATION = $ElementName_0(new ElementName(), 'domainofapplication', 'domainofapplication', 0, false, false, false);
|
jtulach@678
|
18276 |
FECOMPONENTTRANSFER = $ElementName_0(new ElementName(), 'fecomponenttransfer', 'feComponentTransfer', 0, false, false, false);
|
jtulach@678
|
18277 |
ELEMENT_NAMES = initValues(_3Lnu_validator_htmlparser_impl_ElementName_2_classLit, 50, 10, [A, B, G, I, P, Q, S, U, BR, CI, CN, DD, DL, DT, EM, EQ, FN, H1, H2, H3, H4, H5, H6, GT, HR, IN_0, LI, LN, LT, MI, MN, MO, MS, OL, OR, PI, RP, RT_0, TD, TH, TR, TT, UL, AND, ARG, ABS, BIG, BDO, CSC, COL, COS, COT, DEL, DFN, DIR_0, DIV, EXP, GCD, GEQ, IMG, INS, INT, KBD, LOG, LCM, LEQ, MTD, MIN_0, MAP, MTR, MAX_0, NEQ, NOT, NAV, PRE, REM, SUB, SEC, SVG, SUM, SIN, SEP, SUP, SET, TAN, USE, VAR, WBR, XMP, XOR, AREA, ABBR_0, BASE_0, BVAR, BODY, CARD, CODE_0, CITE_0, CSCH, COSH, COTH, CURL, DESC, DIFF, DEFS, FORM_0, FONT, GRAD, HEAD, HTML_0, LINE, LINK_0, LIST_0, META, MSUB, MODE_0, MATH, MARK, MASK_0, MEAN, MSUP, MENU, MROW, NONE, NOBR, NEST, PATH_0, PLUS, RULE, REAL, RELN, RECT, ROOT, RUBY, SECH, SINH, SPAN_0, SAMP, STOP, SDEV, TIME, TRUE, TREF, TANH, TEXT_0, VIEW, ASIDE, AUDIO, APPLY, EMBED, FRAME_0, FALSE, FLOOR, GLYPH, HKERN, IMAGE, IDENT, INPUT, LABEL_0, LIMIT, MFRAC, MPATH, METER, MOVER, MINUS, MROOT, MSQRT, MTEXT, NOTIN, PIECE, PARAM, POWER, REALS, STYLE_0, SMALL, THEAD, TABLE, TITLE_0, TSPAN, TIMES, TFOOT, TBODY, UNION, VKERN, VIDEO, ARCSEC, ARCCSC, ARCTAN, ARCSIN, ARCCOS, APPLET, ARCCOT, APPROX, BUTTON, CIRCLE, CENTER, CURSOR_0, CANVAS, DIVIDE, DEGREE, DIALOG, DOMAIN, EXISTS, FETILE, FIGURE, FORALL, FILTER_0, FOOTER, HEADER, IFRAME, KEYGEN, LAMBDA, LEGEND, MSPACE, MTABLE, MSTYLE, MGLYPH, MEDIAN, MUNDER, MARKER, MERROR, MOMENT, MATRIX, OPTION, OBJECT_0, OUTPUT, PRIMES, SOURCE, STRIKE, STRONG, SWITCH, SYMBOL, SPACER, SELECT, SUBSET, SCRIPT, TBREAK, VECTOR, ARTICLE, ANIMATE, ARCSECH, ARCCSCH, ARCTANH, ARCSINH, ARCCOSH, ARCCOTH, ACRONYM, ADDRESS, BGSOUND, COMMAND, COMPOSE, CEILING, CSYMBOL, CAPTION, DISCARD, DECLARE_0, DETAILS, ELLIPSE, FEFUNCA, FEFUNCB, FEBLEND, FEFLOOD, FEIMAGE, FEMERGE, FEFUNCG, FEFUNCR, HANDLER, INVERSE, IMPLIES, ISINDEX, LOGBASE, LISTING, MFENCED, MPADDED, MARQUEE, MACTION, MSUBSUP, NOEMBED, POLYGON, PATTERN_0, PRODUCT, SETDIFF, SECTION, TENDSTO, UPLIMIT, ALTGLYPH, BASEFONT, CLIPPATH, CODOMAIN, COLGROUP, DATAGRID, EMPTYSET, FACTOROF, FIELDSET, FRAMESET, FEOFFSET, GLYPHREF_0, INTERVAL, INTEGERS, INFINITY, LISTENER, LOWLIMIT, METADATA, MENCLOSE, MPHANTOM, NOFRAMES, NOSCRIPT, OPTGROUP, POLYLINE, PREFETCH, PROGRESS, PRSUBSET, QUOTIENT, SELECTOR, TEXTAREA, TEXTPATH, VARIANCE, ANIMATION, CONJUGATE, CONDITION, COMPLEXES, FONT_FACE, FACTORIAL, INTERSECT, IMAGINARY, LAPLACIAN, MATRIXROW, NOTSUBSET, OTHERWISE, PIECEWISE, PLAINTEXT, RATIONALS, SEMANTICS, TRANSPOSE, ANNOTATION, BLOCKQUOTE, DIVERGENCE, EULERGAMMA, EQUIVALENT, IMAGINARYI, MALIGNMARK, MUNDEROVER, MLABELEDTR, NOTANUMBER, SOLIDCOLOR, ALTGLYPHDEF, DETERMINANT, EVENTSOURCE, FEMERGENODE, FECOMPOSITE, FESPOTLIGHT, MALIGNGROUP, MPRESCRIPTS, MOMENTABOUT, NOTPRSUBSET, PARTIALDIFF, ALTGLYPHITEM, ANIMATECOLOR, DATATEMPLATE, EXPONENTIALE, FETURBULENCE, FEPOINTLIGHT, FEMORPHOLOGY, OUTERPRODUCT, ANIMATEMOTION, COLOR_PROFILE_0, FONT_FACE_SRC, FONT_FACE_URI, FOREIGNOBJECT, FECOLORMATRIX, MISSING_GLYPH, MMULTISCRIPTS, SCALARPRODUCT, VECTORPRODUCT, ANNOTATION_XML, DEFINITION_SRC, FONT_FACE_NAME, FEGAUSSIANBLUR, FEDISTANTLIGHT, LINEARGRADIENT, NATURALNUMBERS, RADIALGRADIENT, ANIMATETRANSFORM, CARTESIANPRODUCT, FONT_FACE_FORMAT, FECONVOLVEMATRIX, FEDIFFUSELIGHTING, FEDISPLACEMENTMAP, FESPECULARLIGHTING, DOMAINOFAPPLICATION, FECOMPONENTTRANSFER]);
|
jtulach@678
|
18278 |
ELEMENT_HASHES = initValues(_3I_classLit, 0, -1, [1057, 1090, 1255, 1321, 1552, 1585, 1651, 1717, 68162, 68899, 69059, 69764, 70020, 70276, 71077, 71205, 72134, 72232, 72264, 72296, 72328, 72360, 72392, 73351, 74312, 75209, 78124, 78284, 78476, 79149, 79309, 79341, 79469, 81295, 81487, 82224, 84498, 84626, 86164, 86292, 86612, 86676, 87445, 3183041, 3186241, 3198017, 3218722, 3226754, 3247715, 3256803, 3263971, 3264995, 3289252, 3291332, 3295524, 3299620, 3326725, 3379303, 3392679, 3448233, 3460553, 3461577, 3510347, 3546604, 3552364, 3556524, 3576461, 3586349, 3588141, 3590797, 3596333, 3622062, 3625454, 3627054, 3675728, 3749042, 3771059, 3771571, 3776211, 3782323, 3782963, 3784883, 3785395, 3788979, 3815476, 3839605, 3885110, 3917911, 3948984, 3951096, 135304769, 135858241, 136498210, 136906434, 137138658, 137512995, 137531875, 137548067, 137629283, 137645539, 137646563, 137775779, 138529956, 138615076, 139040932, 140954086, 141179366, 141690439, 142738600, 143013512, 146979116, 147175724, 147475756, 147902637, 147936877, 148017645, 148131885, 148228141, 148229165, 148309165, 148395629, 148551853, 148618829, 149076462, 149490158, 149572782, 151277616, 151639440, 153268914, 153486514, 153563314, 153750706, 153763314, 153914034, 154406067, 154417459, 154600979, 154678323, 154680979, 154866835, 155366708, 155375188, 155391572, 155465780, 155869364, 158045494, 168988979, 169321621, 169652752, 173151309, 174240818, 174247297, 174669292, 175391532, 176638123, 177380397, 177879204, 177886734, 180753473, 181020073, 181503558, 181686320, 181999237, 181999311, 182048201, 182074866, 182078003, 182083764, 182920847, 184716457, 184976961, 185145071, 187281445, 187872052, 188100653, 188875944, 188919873, 188920457, 189203987, 189371817, 189414886, 189567458, 190266670, 191318187, 191337609, 202479203, 202493027, 202835587, 202843747, 203013219, 203036048, 203045987, 203177552, 203898516, 204648562, 205067918, 205078130, 205096654, 205689142, 205690439, 205766017, 205988909, 207213161, 207794484, 207800999, 208023602, 208213644, 208213647, 210310273, 210940978, 213325049, 213946445, 214055079, 215125040, 215134273, 215135028, 215237420, 215418148, 215553166, 215553394, 215563858, 215627949, 215754324, 217529652, 217713834, 217732628, 218731945, 221417045, 221424946, 221493746, 221515401, 221658189, 221844577, 221908140, 221910626, 221921586, 222659762, 225001091, 236105833, 236113965, 236194995, 236195427, 236206132, 236206387, 236211683, 236212707, 236381647, 236571826, 237124271, 238172205, 238210544, 238270764, 238435405, 238501172, 239224867, 239257644, 239710497, 240307721, 241208789, 241241557, 241318060, 241319404, 241343533, 241344069, 241405397, 241765845, 243864964, 244502085, 244946220, 245109902, 247647266, 247707956, 248648814, 248648836, 248682161, 248986932, 249058914, 249697357, 252132601, 252135604, 252317348, 255007012, 255278388, 256365156, 257566121, 269763372, 271202790, 271863856, 272049197, 272127474, 272770631, 274339449, 274939471, 275388004, 275388005, 275388006, 275977800, 278267602, 278513831, 278712622, 281613765, 281683369, 282120228, 282250732, 282508942, 283743649, 283787570, 284710386, 285391148, 285478533, 285854898, 285873762, 286931113, 288964227, 289445441, 289689648, 291671489, 303512884, 305319975, 305610036, 305764101, 308448294, 308675890, 312085683, 312264750, 315032867, 316391000, 317331042, 317902135, 318950711, 319447220, 321499182, 322538804, 323145200, 337067316, 337826293, 339905989, 340833697, 341457068, 345302593, 349554733, 349771471, 349786245, 350819405, 356072847, 370349192, 373962798, 374509141, 375558638, 375574835, 376053993, 383276530, 383373833, 383407586, 384439906, 386079012, 404133513, 404307343, 407031852, 408072233, 409112005, 409608425, 409771500, 419040932, 437730612, 439529766, 442616365, 442813037, 443157674, 443295316, 450118444, 450482697, 456789668, 459935396, 471217869, 474073645, 476230702, 476665218, 476717289, 483014825, 485083298, 489306281, 538364390, 540675748, 543819186, 543958612, 576960820, 577242548, 610515252, 642202932, 644420819]);
|
jtulach@678
|
18279 |
}
|
jtulach@678
|
18280 |
|
jtulach@678
|
18281 |
function $ElementName_0(this$static, name, camelCaseName, group, special, scoping, fosterParenting){
|
jtulach@678
|
18282 |
$clinit_89();
|
jtulach@678
|
18283 |
this$static.name_0 = name;
|
jtulach@678
|
18284 |
this$static.camelCaseName = camelCaseName;
|
jtulach@678
|
18285 |
this$static.group = group;
|
jtulach@678
|
18286 |
this$static.special = special;
|
jtulach@678
|
18287 |
this$static.scoping = scoping;
|
jtulach@678
|
18288 |
this$static.fosterParenting = fosterParenting;
|
jtulach@678
|
18289 |
this$static.custom = false;
|
jtulach@678
|
18290 |
return this$static;
|
jtulach@678
|
18291 |
}
|
jtulach@678
|
18292 |
|
jtulach@678
|
18293 |
function $ElementName(this$static, name){
|
jtulach@678
|
18294 |
$clinit_89();
|
jtulach@678
|
18295 |
this$static.name_0 = name;
|
jtulach@678
|
18296 |
this$static.camelCaseName = name;
|
jtulach@678
|
18297 |
this$static.group = 0;
|
jtulach@678
|
18298 |
this$static.special = false;
|
jtulach@678
|
18299 |
this$static.scoping = false;
|
jtulach@678
|
18300 |
this$static.fosterParenting = false;
|
jtulach@678
|
18301 |
this$static.custom = true;
|
jtulach@678
|
18302 |
return this$static;
|
jtulach@678
|
18303 |
}
|
jtulach@678
|
18304 |
|
jtulach@678
|
18305 |
function bufToHash_0(buf, len){
|
jtulach@678
|
18306 |
var hash, i, j;
|
jtulach@678
|
18307 |
hash = len;
|
jtulach@678
|
18308 |
hash <<= 5;
|
jtulach@678
|
18309 |
hash += buf[0] - 96;
|
jtulach@678
|
18310 |
j = len;
|
jtulach@678
|
18311 |
for (i = 0; i < 4 && j > 0; ++i) {
|
jtulach@678
|
18312 |
--j;
|
jtulach@678
|
18313 |
hash <<= 5;
|
jtulach@678
|
18314 |
hash += buf[j] - 96;
|
jtulach@678
|
18315 |
}
|
jtulach@678
|
18316 |
return hash;
|
jtulach@678
|
18317 |
}
|
jtulach@678
|
18318 |
|
jtulach@678
|
18319 |
function elementNameByBuffer(buf, offset, length){
|
jtulach@678
|
18320 |
var end, end_0;
|
jtulach@678
|
18321 |
$clinit_89();
|
jtulach@678
|
18322 |
var elementName, hash, index, name;
|
jtulach@678
|
18323 |
hash = bufToHash_0(buf, length);
|
jtulach@678
|
18324 |
index = binarySearch(ELEMENT_HASHES, hash);
|
jtulach@678
|
18325 |
if (index < 0) {
|
jtulach@678
|
18326 |
return $ElementName(new ElementName(), String((end = offset + length , __checkBounds(buf.length, offset, end) , __valueOf(buf, offset, end))));
|
jtulach@678
|
18327 |
}
|
jtulach@678
|
18328 |
else {
|
jtulach@678
|
18329 |
elementName = ELEMENT_NAMES[index];
|
jtulach@678
|
18330 |
name = elementName.name_0;
|
jtulach@678
|
18331 |
if (!localEqualsBuffer(name, buf, offset, length)) {
|
jtulach@678
|
18332 |
return $ElementName(new ElementName(), String((end_0 = offset + length , __checkBounds(buf.length, offset, end_0) , __valueOf(buf, offset, end_0))));
|
jtulach@678
|
18333 |
}
|
jtulach@678
|
18334 |
return elementName;
|
jtulach@678
|
18335 |
}
|
jtulach@678
|
18336 |
}
|
jtulach@678
|
18337 |
|
jtulach@678
|
18338 |
function getClass_51(){
|
jtulach@678
|
18339 |
return Lnu_validator_htmlparser_impl_ElementName_2_classLit;
|
jtulach@678
|
18340 |
}
|
jtulach@678
|
18341 |
|
jtulach@678
|
18342 |
function ElementName(){
|
jtulach@678
|
18343 |
}
|
jtulach@678
|
18344 |
|
jtulach@678
|
18345 |
_ = ElementName.prototype = new Object_0();
|
jtulach@678
|
18346 |
_.getClass$ = getClass_51;
|
jtulach@678
|
18347 |
_.typeId$ = 37;
|
jtulach@678
|
18348 |
_.camelCaseName = null;
|
jtulach@678
|
18349 |
_.custom = false;
|
jtulach@678
|
18350 |
_.fosterParenting = false;
|
jtulach@678
|
18351 |
_.group = 0;
|
jtulach@678
|
18352 |
_.name_0 = null;
|
jtulach@678
|
18353 |
_.scoping = false;
|
jtulach@678
|
18354 |
_.special = false;
|
jtulach@678
|
18355 |
var A, ABBR_0, ABS, ACRONYM, ADDRESS, ALTGLYPH, ALTGLYPHDEF, ALTGLYPHITEM, AND, ANIMATE, ANIMATECOLOR, ANIMATEMOTION, ANIMATETRANSFORM, ANIMATION, ANNOTATION, ANNOTATION_XML, APPLET, APPLY, APPROX, ARCCOS, ARCCOSH, ARCCOT, ARCCOTH, ARCCSC, ARCCSCH, ARCSEC, ARCSECH, ARCSIN, ARCSINH, ARCTAN, ARCTANH, AREA, ARG, ARTICLE, ASIDE, AUDIO, B, BASE_0, BASEFONT, BDO, BGSOUND, BIG, BLOCKQUOTE, BODY, BR, BUTTON, BVAR, CANVAS, CAPTION, CARD, CARTESIANPRODUCT, CEILING, CENTER, CI, CIRCLE, CITE_0, CLIPPATH, CN, CODE_0, CODOMAIN, COL, COLGROUP, COLOR_PROFILE_0, COMMAND, COMPLEXES, COMPOSE, CONDITION, CONJUGATE, COS, COSH, COT, COTH, CSC, CSCH, CSYMBOL, CURL, CURSOR_0, DATAGRID, DATATEMPLATE, DD, DECLARE_0, DEFINITION_SRC, DEFS, DEGREE, DEL, DESC, DETAILS, DETERMINANT, DFN, DIALOG, DIFF, DIR_0, DISCARD, DIV, DIVERGENCE, DIVIDE, DL, DOMAIN, DOMAINOFAPPLICATION, DT, ELEMENT_HASHES, ELEMENT_NAMES, ELLIPSE, EM, EMBED, EMPTYSET, EQ, EQUIVALENT, EULERGAMMA, EVENTSOURCE, EXISTS, EXP, EXPONENTIALE, FACTORIAL, FACTOROF, FALSE, FEBLEND, FECOLORMATRIX, FECOMPONENTTRANSFER, FECOMPOSITE, FECONVOLVEMATRIX, FEDIFFUSELIGHTING, FEDISPLACEMENTMAP, FEDISTANTLIGHT, FEFLOOD, FEFUNCA, FEFUNCB, FEFUNCG, FEFUNCR, FEGAUSSIANBLUR, FEIMAGE, FEMERGE, FEMERGENODE, FEMORPHOLOGY, FEOFFSET, FEPOINTLIGHT, FESPECULARLIGHTING, FESPOTLIGHT, FETILE, FETURBULENCE, FIELDSET, FIGURE, FILTER_0, FLOOR, FN, FONT, FONT_FACE, FONT_FACE_FORMAT, FONT_FACE_NAME, FONT_FACE_SRC, FONT_FACE_URI, FOOTER, FORALL, FOREIGNOBJECT, FORM_0, FRAME_0, FRAMESET, G, GCD, GEQ, GLYPH, GLYPHREF_0, GRAD, GT, H1, H2, H3, H4, H5, H6, HANDLER, HEAD, HEADER, HKERN, HR, HTML_0, I, IDENT, IFRAME, IMAGE, IMAGINARY, IMAGINARYI, IMG, IMPLIES, IN_0, INFINITY, INPUT, INS, INT, INTEGERS, INTERSECT, INTERVAL, INVERSE, ISINDEX, KBD, KEYGEN, LABEL_0, LAMBDA, LAPLACIAN, LCM, LEGEND, LEQ, LI, LIMIT, LINE, LINEARGRADIENT, LINK_0, LIST_0, LISTENER, LISTING, LN, LOG, LOGBASE, LOWLIMIT, LT, MACTION, MALIGNGROUP, MALIGNMARK, MAP, MARK, MARKER, MARQUEE, MASK_0, MATH, MATRIX, MATRIXROW, MAX_0, MEAN, MEDIAN, MENCLOSE, MENU, MERROR, META, METADATA, METER, MFENCED, MFRAC, MGLYPH, MI, MIN_0, MINUS, MISSING_GLYPH, MLABELEDTR, MMULTISCRIPTS, MN, MO, MODE_0, MOMENT, MOMENTABOUT, MOVER, MPADDED, MPATH, MPHANTOM, MPRESCRIPTS, MROOT, MROW, MS, MSPACE, MSQRT, MSTYLE, MSUB, MSUBSUP, MSUP, MTABLE, MTD, MTEXT, MTR, MUNDER, MUNDEROVER, NATURALNUMBERS, NAV, NEQ, NEST, NOBR, NOEMBED, NOFRAMES, NONE, NOSCRIPT, NOT, NOTANUMBER, NOTIN, NOTPRSUBSET, NOTSUBSET, OBJECT_0, OL, OPTGROUP, OPTION, OR, OTHERWISE, OUTERPRODUCT, OUTPUT, P, PARAM, PARTIALDIFF, PATH_0, PATTERN_0, PI, PIECE, PIECEWISE, PLAINTEXT, PLUS, POLYGON, POLYLINE, POWER, PRE, PREFETCH, PRIMES, PRODUCT, PROGRESS, PRSUBSET, Q, QUOTIENT, RADIALGRADIENT, RATIONALS, REAL, REALS, RECT, RELN, REM, ROOT, RP, RT_0, RUBY, RULE, S, SAMP, SCALARPRODUCT, SCRIPT, SDEV, SEC, SECH, SECTION, SELECT, SELECTOR, SEMANTICS, SEP, SET, SETDIFF, SIN, SINH, SMALL, SOLIDCOLOR, SOURCE, SPACER, SPAN_0, STOP, STRIKE, STRONG, STYLE_0, SUB, SUBSET, SUM, SUP, SVG, SWITCH, SYMBOL, TABLE, TAN, TANH, TBODY, TBREAK, TD, TENDSTO, TEXT_0, TEXTAREA, TEXTPATH, TFOOT, TH, THEAD, TIME, TIMES, TITLE_0, TR, TRANSPOSE, TREF, TRUE, TSPAN, TT, U, UL, UNION, UPLIMIT, USE, VAR, VARIANCE, VECTOR, VECTORPRODUCT, VIDEO, VIEW, VKERN, WBR, XMP, XOR;
|
jtulach@678
|
18356 |
function $clinit_97(){
|
jtulach@678
|
18357 |
$clinit_97 = nullMethod;
|
jtulach@678
|
18358 |
LT_GT = initValues(_3C_classLit, 42, -1, [60, 62]);
|
jtulach@678
|
18359 |
LT_SOLIDUS = initValues(_3C_classLit, 42, -1, [60, 47]);
|
jtulach@678
|
18360 |
RSQB_RSQB = initValues(_3C_classLit, 42, -1, [93, 93]);
|
jtulach@678
|
18361 |
REPLACEMENT_CHARACTER = initValues(_3C_classLit, 42, -1, [65533]);
|
jtulach@678
|
18362 |
SPACE = initValues(_3C_classLit, 42, -1, [32]);
|
jtulach@678
|
18363 |
LF = initValues(_3C_classLit, 42, -1, [10]);
|
jtulach@678
|
18364 |
CDATA_LSQB = $toCharArray('CDATA[');
|
jtulach@678
|
18365 |
OCTYPE = $toCharArray('octype');
|
jtulach@678
|
18366 |
UBLIC = $toCharArray('ublic');
|
jtulach@678
|
18367 |
YSTEM = $toCharArray('ystem');
|
jtulach@678
|
18368 |
TITLE_ARR = initValues(_3C_classLit, 42, -1, [116, 105, 116, 108, 101]);
|
jtulach@678
|
18369 |
SCRIPT_ARR = initValues(_3C_classLit, 42, -1, [115, 99, 114, 105, 112, 116]);
|
jtulach@678
|
18370 |
STYLE_ARR = initValues(_3C_classLit, 42, -1, [115, 116, 121, 108, 101]);
|
jtulach@678
|
18371 |
PLAINTEXT_ARR = initValues(_3C_classLit, 42, -1, [112, 108, 97, 105, 110, 116, 101, 120, 116]);
|
jtulach@678
|
18372 |
XMP_ARR = initValues(_3C_classLit, 42, -1, [120, 109, 112]);
|
jtulach@678
|
18373 |
TEXTAREA_ARR = initValues(_3C_classLit, 42, -1, [116, 101, 120, 116, 97, 114, 101, 97]);
|
jtulach@678
|
18374 |
IFRAME_ARR = initValues(_3C_classLit, 42, -1, [105, 102, 114, 97, 109, 101]);
|
jtulach@678
|
18375 |
NOEMBED_ARR = initValues(_3C_classLit, 42, -1, [110, 111, 101, 109, 98, 101, 100]);
|
jtulach@678
|
18376 |
NOSCRIPT_ARR = initValues(_3C_classLit, 42, -1, [110, 111, 115, 99, 114, 105, 112, 116]);
|
jtulach@678
|
18377 |
NOFRAMES_ARR = initValues(_3C_classLit, 42, -1, [110, 111, 102, 114, 97, 109, 101, 115]);
|
jtulach@678
|
18378 |
}
|
jtulach@678
|
18379 |
|
jtulach@678
|
18380 |
function $addAttributeWithValue(this$static){
|
jtulach@678
|
18381 |
var value;
|
jtulach@678
|
18382 |
this$static.metaBoundaryPassed && ($clinit_89() , META) == this$static.tagName && ($clinit_87() , CHARSET) == this$static.attributeName;
|
jtulach@678
|
18383 |
if (this$static.attributeName) {
|
jtulach@678
|
18384 |
value = valueOf_1(this$static.longStrBuf, 0, this$static.longStrBufLen);
|
jtulach@678
|
18385 |
if (!this$static.endTag && this$static.html4 && this$static.html4ModeCompatibleWithXhtml1Schemata && $isCaseFolded(this$static.attributeName)) {
|
jtulach@678
|
18386 |
value = newAsciiLowerCaseStringFromString(value);
|
jtulach@678
|
18387 |
}
|
jtulach@678
|
18388 |
$addAttribute(this$static.attributes, this$static.attributeName, value, this$static.xmlnsPolicy);
|
jtulach@678
|
18389 |
}
|
jtulach@678
|
18390 |
}
|
jtulach@678
|
18391 |
|
jtulach@678
|
18392 |
function $addAttributeWithoutValue(this$static){
|
jtulach@678
|
18393 |
this$static.metaBoundaryPassed && ($clinit_87() , CHARSET) == this$static.attributeName && ($clinit_89() , META) == this$static.tagName;
|
jtulach@678
|
18394 |
if (this$static.attributeName) {
|
jtulach@678
|
18395 |
if (this$static.html4) {
|
jtulach@678
|
18396 |
if ($isBoolean(this$static.attributeName)) {
|
jtulach@678
|
18397 |
if (this$static.html4ModeCompatibleWithXhtml1Schemata) {
|
jtulach@678
|
18398 |
$addAttribute(this$static.attributes, this$static.attributeName, this$static.attributeName.local[0], this$static.xmlnsPolicy);
|
jtulach@678
|
18399 |
}
|
jtulach@678
|
18400 |
else {
|
jtulach@678
|
18401 |
$addAttribute(this$static.attributes, this$static.attributeName, '', this$static.xmlnsPolicy);
|
jtulach@678
|
18402 |
}
|
jtulach@678
|
18403 |
}
|
jtulach@678
|
18404 |
else {
|
jtulach@678
|
18405 |
$addAttribute(this$static.attributes, this$static.attributeName, '', this$static.xmlnsPolicy);
|
jtulach@678
|
18406 |
}
|
jtulach@678
|
18407 |
}
|
jtulach@678
|
18408 |
else {
|
jtulach@678
|
18409 |
if (($clinit_87() , SRC) == this$static.attributeName || HREF == this$static.attributeName) {
|
jtulach@678
|
18410 |
'Attribute \u201C' + this$static.attributeName.local[0] + '\u201D without an explicit value seen. The attribute may be dropped by IE7.';
|
jtulach@678
|
18411 |
}
|
jtulach@678
|
18412 |
$addAttribute(this$static.attributes, this$static.attributeName, '', this$static.xmlnsPolicy);
|
jtulach@678
|
18413 |
}
|
jtulach@678
|
18414 |
}
|
jtulach@678
|
18415 |
}
|
jtulach@678
|
18416 |
|
jtulach@678
|
18417 |
function $adjustDoubleHyphenAndAppendToLongStrBufAndErr(this$static, c){
|
jtulach@678
|
18418 |
switch (this$static.commentPolicy.ordinal) {
|
jtulach@678
|
18419 |
case 2:
|
jtulach@678
|
18420 |
--this$static.longStrBufLen;
|
jtulach@678
|
18421 |
$appendLongStrBuf(this$static, 32);
|
jtulach@678
|
18422 |
$appendLongStrBuf(this$static, 45);
|
jtulach@678
|
18423 |
case 0:
|
jtulach@678
|
18424 |
$appendLongStrBuf(this$static, c);
|
jtulach@678
|
18425 |
break;
|
jtulach@678
|
18426 |
case 1:
|
jtulach@678
|
18427 |
$fatal(this$static, 'The document is not mappable to XML 1.0 due to two consecutive hyphens in a comment.');
|
jtulach@678
|
18428 |
}
|
jtulach@678
|
18429 |
}
|
jtulach@678
|
18430 |
|
jtulach@678
|
18431 |
function $appendLongStrBuf(this$static, c){
|
jtulach@678
|
18432 |
var newBuf;
|
jtulach@678
|
18433 |
if (this$static.longStrBufLen == this$static.longStrBuf.length) {
|
jtulach@678
|
18434 |
newBuf = initDim(_3C_classLit, 42, -1, this$static.longStrBufLen + (this$static.longStrBufLen >> 1), 1);
|
jtulach@678
|
18435 |
arraycopy(this$static.longStrBuf, 0, newBuf, 0, this$static.longStrBuf.length);
|
jtulach@678
|
18436 |
this$static.longStrBuf = newBuf;
|
jtulach@678
|
18437 |
}
|
jtulach@678
|
18438 |
this$static.longStrBuf[this$static.longStrBufLen++] = c;
|
jtulach@678
|
18439 |
}
|
jtulach@678
|
18440 |
|
jtulach@678
|
18441 |
function $appendLongStrBuf_0(this$static, buffer, offset, length){
|
jtulach@678
|
18442 |
var newBuf, reqLen;
|
jtulach@678
|
18443 |
reqLen = this$static.longStrBufLen + length;
|
jtulach@678
|
18444 |
if (this$static.longStrBuf.length < reqLen) {
|
jtulach@678
|
18445 |
newBuf = initDim(_3C_classLit, 42, -1, reqLen + (reqLen >> 1), 1);
|
jtulach@678
|
18446 |
arraycopy(this$static.longStrBuf, 0, newBuf, 0, this$static.longStrBuf.length);
|
jtulach@678
|
18447 |
this$static.longStrBuf = newBuf;
|
jtulach@678
|
18448 |
}
|
jtulach@678
|
18449 |
arraycopy(buffer, offset, this$static.longStrBuf, this$static.longStrBufLen, length);
|
jtulach@678
|
18450 |
this$static.longStrBufLen = reqLen;
|
jtulach@678
|
18451 |
}
|
jtulach@678
|
18452 |
|
jtulach@678
|
18453 |
function $appendSecondHyphenToBogusComment(this$static){
|
jtulach@678
|
18454 |
switch (this$static.commentPolicy.ordinal) {
|
jtulach@678
|
18455 |
case 2:
|
jtulach@678
|
18456 |
$appendLongStrBuf(this$static, 32);
|
jtulach@678
|
18457 |
case 0:
|
jtulach@678
|
18458 |
$appendLongStrBuf(this$static, 45);
|
jtulach@678
|
18459 |
break;
|
jtulach@678
|
18460 |
case 1:
|
jtulach@678
|
18461 |
$fatal(this$static, 'The document is not mappable to XML 1.0 due to two consecutive hyphens in a comment.');
|
jtulach@678
|
18462 |
}
|
jtulach@678
|
18463 |
}
|
jtulach@678
|
18464 |
|
jtulach@678
|
18465 |
function $appendStrBuf(this$static, c){
|
jtulach@678
|
18466 |
var newBuf;
|
jtulach@678
|
18467 |
if (this$static.strBufLen == this$static.strBuf.length) {
|
jtulach@678
|
18468 |
newBuf = initDim(_3C_classLit, 42, -1, this$static.strBuf.length + 1024, 1);
|
jtulach@678
|
18469 |
arraycopy(this$static.strBuf, 0, newBuf, 0, this$static.strBuf.length);
|
jtulach@678
|
18470 |
this$static.strBuf = newBuf;
|
jtulach@678
|
18471 |
}
|
jtulach@678
|
18472 |
this$static.strBuf[this$static.strBufLen++] = c;
|
jtulach@678
|
18473 |
}
|
jtulach@678
|
18474 |
|
jtulach@678
|
18475 |
function $attributeNameComplete(this$static){
|
jtulach@678
|
18476 |
this$static.attributeName = nameByBuffer(this$static.strBuf, 0, this$static.strBufLen, this$static.namePolicy != ($clinit_80() , ALLOW));
|
jtulach@678
|
18477 |
if (!this$static.attributes) {
|
jtulach@678
|
18478 |
this$static.attributes = $HtmlAttributes(new HtmlAttributes(), this$static.mappingLangToXmlLang);
|
jtulach@678
|
18479 |
}
|
jtulach@678
|
18480 |
if ($contains(this$static.attributes, this$static.attributeName)) {
|
jtulach@678
|
18481 |
'Duplicate attribute \u201C' + this$static.attributeName.local[0] + '\u201D.';
|
jtulach@678
|
18482 |
this$static.attributeName = null;
|
jtulach@678
|
18483 |
}
|
jtulach@678
|
18484 |
}
|
jtulach@678
|
18485 |
|
jtulach@678
|
18486 |
function $contentModelElementToArray(this$static){
|
jtulach@678
|
18487 |
switch (this$static.contentModelElement.group) {
|
jtulach@678
|
18488 |
case 36:
|
jtulach@678
|
18489 |
this$static.contentModelElementNameAsArray = TITLE_ARR;
|
jtulach@678
|
18490 |
return;
|
jtulach@678
|
18491 |
case 31:
|
jtulach@678
|
18492 |
this$static.contentModelElementNameAsArray = SCRIPT_ARR;
|
jtulach@678
|
18493 |
return;
|
jtulach@678
|
18494 |
case 33:
|
jtulach@678
|
18495 |
this$static.contentModelElementNameAsArray = STYLE_ARR;
|
jtulach@678
|
18496 |
return;
|
jtulach@678
|
18497 |
case 30:
|
jtulach@678
|
18498 |
this$static.contentModelElementNameAsArray = PLAINTEXT_ARR;
|
jtulach@678
|
18499 |
return;
|
jtulach@678
|
18500 |
case 38:
|
jtulach@678
|
18501 |
this$static.contentModelElementNameAsArray = XMP_ARR;
|
jtulach@678
|
18502 |
return;
|
jtulach@678
|
18503 |
case 35:
|
jtulach@678
|
18504 |
this$static.contentModelElementNameAsArray = TEXTAREA_ARR;
|
jtulach@678
|
18505 |
return;
|
jtulach@678
|
18506 |
case 47:
|
jtulach@678
|
18507 |
this$static.contentModelElementNameAsArray = IFRAME_ARR;
|
jtulach@678
|
18508 |
return;
|
jtulach@678
|
18509 |
case 60:
|
jtulach@678
|
18510 |
this$static.contentModelElementNameAsArray = NOEMBED_ARR;
|
jtulach@678
|
18511 |
return;
|
jtulach@678
|
18512 |
case 26:
|
jtulach@678
|
18513 |
this$static.contentModelElementNameAsArray = NOSCRIPT_ARR;
|
jtulach@678
|
18514 |
return;
|
jtulach@678
|
18515 |
case 25:
|
jtulach@678
|
18516 |
this$static.contentModelElementNameAsArray = NOFRAMES_ARR;
|
jtulach@678
|
18517 |
return;
|
jtulach@678
|
18518 |
default:return;
|
jtulach@678
|
18519 |
}
|
jtulach@678
|
18520 |
}
|
jtulach@678
|
18521 |
|
jtulach@678
|
18522 |
function $emitCarriageReturn(this$static, buf, pos){
|
jtulach@678
|
18523 |
this$static.nextCharOnNewLine = true;
|
jtulach@678
|
18524 |
this$static.lastCR = true;
|
jtulach@678
|
18525 |
$flushChars(this$static, buf, pos);
|
jtulach@678
|
18526 |
$characters(this$static.tokenHandler, LF, 0, 1);
|
jtulach@678
|
18527 |
this$static.cstart = 2147483647;
|
jtulach@678
|
18528 |
}
|
jtulach@678
|
18529 |
|
jtulach@678
|
18530 |
function $emitComment(this$static, provisionalHyphens, pos){
|
jtulach@678
|
18531 |
if (this$static.wantsComments) {
|
jtulach@678
|
18532 |
$comment(this$static.tokenHandler, this$static.longStrBuf, 0, this$static.longStrBufLen - provisionalHyphens);
|
jtulach@678
|
18533 |
}
|
jtulach@678
|
18534 |
this$static.cstart = pos + 1;
|
jtulach@678
|
18535 |
}
|
jtulach@678
|
18536 |
|
jtulach@678
|
18537 |
function $emitCurrentTagToken(this$static, selfClosing, pos){
|
jtulach@678
|
18538 |
var attrs;
|
jtulach@678
|
18539 |
this$static.cstart = pos + 1;
|
jtulach@678
|
18540 |
this$static.stateSave = 0;
|
jtulach@678
|
18541 |
attrs = !this$static.attributes?($clinit_91() , EMPTY_ATTRIBUTES):this$static.attributes;
|
jtulach@678
|
18542 |
if (this$static.endTag) {
|
jtulach@678
|
18543 |
$endTag(this$static.tokenHandler, this$static.tagName);
|
jtulach@678
|
18544 |
}
|
jtulach@678
|
18545 |
else {
|
jtulach@678
|
18546 |
$startTag(this$static.tokenHandler, this$static.tagName, attrs, selfClosing);
|
jtulach@678
|
18547 |
}
|
jtulach@678
|
18548 |
$resetAttributes(this$static);
|
jtulach@678
|
18549 |
return this$static.stateSave;
|
jtulach@678
|
18550 |
}
|
jtulach@678
|
18551 |
|
jtulach@678
|
18552 |
function $emitOrAppend(this$static, val, returnState){
|
jtulach@678
|
18553 |
if ((returnState & -2) != 0) {
|
jtulach@678
|
18554 |
$appendLongStrBuf_0(this$static, val, 0, val.length);
|
jtulach@678
|
18555 |
}
|
jtulach@678
|
18556 |
else {
|
jtulach@678
|
18557 |
$characters(this$static.tokenHandler, val, 0, val.length);
|
jtulach@678
|
18558 |
}
|
jtulach@678
|
18559 |
}
|
jtulach@678
|
18560 |
|
jtulach@678
|
18561 |
function $emitOrAppendOne(this$static, val, returnState){
|
jtulach@678
|
18562 |
if ((returnState & -2) != 0) {
|
jtulach@678
|
18563 |
$appendLongStrBuf(this$static, val[0]);
|
jtulach@678
|
18564 |
}
|
jtulach@678
|
18565 |
else {
|
jtulach@678
|
18566 |
$characters(this$static.tokenHandler, val, 0, 1);
|
jtulach@678
|
18567 |
}
|
jtulach@678
|
18568 |
}
|
jtulach@678
|
18569 |
|
jtulach@678
|
18570 |
function $emitOrAppendStrBuf(this$static, returnState){
|
jtulach@678
|
18571 |
if ((returnState & -2) != 0) {
|
jtulach@678
|
18572 |
$appendLongStrBuf_0(this$static, this$static.strBuf, 0, this$static.strBufLen);
|
jtulach@678
|
18573 |
}
|
jtulach@678
|
18574 |
else {
|
jtulach@678
|
18575 |
$emitStrBuf(this$static);
|
jtulach@678
|
18576 |
}
|
jtulach@678
|
18577 |
}
|
jtulach@678
|
18578 |
|
jtulach@678
|
18579 |
function $emitReplacementCharacter(this$static, buf, pos){
|
jtulach@678
|
18580 |
this$static.nextCharOnNewLine = true;
|
jtulach@678
|
18581 |
this$static.lastCR = true;
|
jtulach@678
|
18582 |
$flushChars(this$static, buf, pos);
|
jtulach@678
|
18583 |
$characters(this$static.tokenHandler, REPLACEMENT_CHARACTER, 0, 1);
|
jtulach@678
|
18584 |
this$static.cstart = 2147483647;
|
jtulach@678
|
18585 |
}
|
jtulach@678
|
18586 |
|
jtulach@678
|
18587 |
function $emitStrBuf(this$static){
|
jtulach@678
|
18588 |
if (this$static.strBufLen > 0) {
|
jtulach@678
|
18589 |
$characters(this$static.tokenHandler, this$static.strBuf, 0, this$static.strBufLen);
|
jtulach@678
|
18590 |
}
|
jtulach@678
|
18591 |
}
|
jtulach@678
|
18592 |
|
jtulach@678
|
18593 |
function $emptyAttributes(this$static){
|
jtulach@678
|
18594 |
if (this$static.newAttributesEachTime) {
|
jtulach@678
|
18595 |
return $HtmlAttributes(new HtmlAttributes(), this$static.mappingLangToXmlLang);
|
jtulach@678
|
18596 |
}
|
jtulach@678
|
18597 |
else {
|
jtulach@678
|
18598 |
return $clinit_91() , EMPTY_ATTRIBUTES;
|
jtulach@678
|
18599 |
}
|
jtulach@678
|
18600 |
}
|
jtulach@678
|
18601 |
|
jtulach@678
|
18602 |
function $end(this$static){
|
jtulach@678
|
18603 |
this$static.strBuf = null;
|
jtulach@678
|
18604 |
this$static.longStrBuf = null;
|
jtulach@678
|
18605 |
this$static.systemIdentifier = null;
|
jtulach@678
|
18606 |
this$static.publicIdentifier = null;
|
jtulach@678
|
18607 |
this$static.doctypeName = null;
|
jtulach@678
|
18608 |
this$static.tagName = null;
|
jtulach@678
|
18609 |
this$static.attributeName = null;
|
jtulach@678
|
18610 |
$endTokenization(this$static.tokenHandler);
|
jtulach@678
|
18611 |
if (this$static.attributes) {
|
jtulach@678
|
18612 |
$clear_0(this$static.attributes, this$static.mappingLangToXmlLang);
|
jtulach@678
|
18613 |
this$static.attributes = null;
|
jtulach@678
|
18614 |
}
|
jtulach@678
|
18615 |
}
|
jtulach@678
|
18616 |
|
jtulach@678
|
18617 |
function $eof(this$static){
|
jtulach@678
|
18618 |
var candidateArr, ch, i, returnState, state, val;
|
jtulach@678
|
18619 |
state = this$static.stateSave;
|
jtulach@678
|
18620 |
returnState = this$static.returnStateSave;
|
jtulach@678
|
18621 |
eofloop: for (;;) {
|
jtulach@678
|
18622 |
switch (state) {
|
jtulach@678
|
18623 |
case 53:
|
jtulach@678
|
18624 |
$characters(this$static.tokenHandler, LT_GT, 0, 1);
|
jtulach@678
|
18625 |
break eofloop;
|
jtulach@678
|
18626 |
case 4:
|
jtulach@678
|
18627 |
$characters(this$static.tokenHandler, LT_GT, 0, 1);
|
jtulach@678
|
18628 |
break eofloop;
|
jtulach@678
|
18629 |
case 37:
|
jtulach@678
|
18630 |
if (this$static.index < this$static.contentModelElementNameAsArray.length) {
|
jtulach@678
|
18631 |
break eofloop;
|
jtulach@678
|
18632 |
}
|
jtulach@678
|
18633 |
else {
|
jtulach@678
|
18634 |
break eofloop;
|
jtulach@678
|
18635 |
}
|
jtulach@678
|
18636 |
|
jtulach@678
|
18637 |
case 5:
|
jtulach@678
|
18638 |
$characters(this$static.tokenHandler, LT_SOLIDUS, 0, 2);
|
jtulach@678
|
18639 |
break eofloop;
|
jtulach@678
|
18640 |
case 6:
|
jtulach@678
|
18641 |
break eofloop;
|
jtulach@678
|
18642 |
case 7:
|
jtulach@678
|
18643 |
case 14:
|
jtulach@678
|
18644 |
case 48:
|
jtulach@678
|
18645 |
break eofloop;
|
jtulach@678
|
18646 |
case 8:
|
jtulach@678
|
18647 |
break eofloop;
|
jtulach@678
|
18648 |
case 9:
|
jtulach@678
|
18649 |
case 10:
|
jtulach@678
|
18650 |
break eofloop;
|
jtulach@678
|
18651 |
case 11:
|
jtulach@678
|
18652 |
case 12:
|
jtulach@678
|
18653 |
case 13:
|
jtulach@678
|
18654 |
break eofloop;
|
jtulach@678
|
18655 |
case 15:
|
jtulach@678
|
18656 |
$emitComment(this$static, 0, 0);
|
jtulach@678
|
18657 |
break eofloop;
|
jtulach@678
|
18658 |
case 59:
|
jtulach@678
|
18659 |
$maybeAppendSpaceToBogusComment(this$static);
|
jtulach@678
|
18660 |
$emitComment(this$static, 0, 0);
|
jtulach@678
|
18661 |
break eofloop;
|
jtulach@678
|
18662 |
case 16:
|
jtulach@678
|
18663 |
this$static.longStrBufLen = 0;
|
jtulach@678
|
18664 |
$emitComment(this$static, 0, 0);
|
jtulach@678
|
18665 |
break eofloop;
|
jtulach@678
|
18666 |
case 38:
|
jtulach@678
|
18667 |
$emitComment(this$static, 0, 0);
|
jtulach@678
|
18668 |
break eofloop;
|
jtulach@678
|
18669 |
case 39:
|
jtulach@678
|
18670 |
if (this$static.index < 6) {
|
jtulach@678
|
18671 |
$emitComment(this$static, 0, 0);
|
jtulach@678
|
18672 |
}
|
jtulach@678
|
18673 |
else {
|
jtulach@678
|
18674 |
this$static.doctypeName = '';
|
jtulach@678
|
18675 |
this$static.publicIdentifier = null;
|
jtulach@678
|
18676 |
this$static.systemIdentifier = null;
|
jtulach@678
|
18677 |
this$static.forceQuirks = true;
|
jtulach@678
|
18678 |
this$static.cstart = 1;
|
jtulach@678
|
18679 |
$doctype(this$static.tokenHandler, this$static.doctypeName, this$static.publicIdentifier, this$static.systemIdentifier, this$static.forceQuirks);
|
jtulach@678
|
18680 |
break eofloop;
|
jtulach@678
|
18681 |
}
|
jtulach@678
|
18682 |
|
jtulach@678
|
18683 |
break eofloop;
|
jtulach@678
|
18684 |
case 30:
|
jtulach@678
|
18685 |
case 32:
|
jtulach@678
|
18686 |
case 35:
|
jtulach@678
|
18687 |
$emitComment(this$static, 0, 0);
|
jtulach@678
|
18688 |
break eofloop;
|
jtulach@678
|
18689 |
case 34:
|
jtulach@678
|
18690 |
$emitComment(this$static, 2, 0);
|
jtulach@678
|
18691 |
break eofloop;
|
jtulach@678
|
18692 |
case 33:
|
jtulach@678
|
18693 |
case 31:
|
jtulach@678
|
18694 |
$emitComment(this$static, 1, 0);
|
jtulach@678
|
18695 |
break eofloop;
|
jtulach@678
|
18696 |
case 36:
|
jtulach@678
|
18697 |
$emitComment(this$static, 3, 0);
|
jtulach@678
|
18698 |
break eofloop;
|
jtulach@678
|
18699 |
case 17:
|
jtulach@678
|
18700 |
case 18:
|
jtulach@678
|
18701 |
this$static.forceQuirks = true;
|
jtulach@678
|
18702 |
this$static.cstart = 1;
|
jtulach@678
|
18703 |
$doctype(this$static.tokenHandler, this$static.doctypeName, this$static.publicIdentifier, this$static.systemIdentifier, this$static.forceQuirks);
|
jtulach@678
|
18704 |
break eofloop;
|
jtulach@678
|
18705 |
case 19:
|
jtulach@678
|
18706 |
this$static.doctypeName = String(valueOf_1(this$static.strBuf, 0, this$static.strBufLen));
|
jtulach@678
|
18707 |
this$static.forceQuirks = true;
|
jtulach@678
|
18708 |
this$static.cstart = 1;
|
jtulach@678
|
18709 |
$doctype(this$static.tokenHandler, this$static.doctypeName, this$static.publicIdentifier, this$static.systemIdentifier, this$static.forceQuirks);
|
jtulach@678
|
18710 |
break eofloop;
|
jtulach@678
|
18711 |
case 40:
|
jtulach@678
|
18712 |
case 41:
|
jtulach@678
|
18713 |
case 20:
|
jtulach@678
|
18714 |
case 21:
|
jtulach@678
|
18715 |
this$static.forceQuirks = true;
|
jtulach@678
|
18716 |
this$static.cstart = 1;
|
jtulach@678
|
18717 |
$doctype(this$static.tokenHandler, this$static.doctypeName, this$static.publicIdentifier, this$static.systemIdentifier, this$static.forceQuirks);
|
jtulach@678
|
18718 |
break eofloop;
|
jtulach@678
|
18719 |
case 22:
|
jtulach@678
|
18720 |
case 23:
|
jtulach@678
|
18721 |
this$static.forceQuirks = true;
|
jtulach@678
|
18722 |
this$static.publicIdentifier = valueOf_1(this$static.longStrBuf, 0, this$static.longStrBufLen);
|
jtulach@678
|
18723 |
this$static.cstart = 1;
|
jtulach@678
|
18724 |
$doctype(this$static.tokenHandler, this$static.doctypeName, this$static.publicIdentifier, this$static.systemIdentifier, this$static.forceQuirks);
|
jtulach@678
|
18725 |
break eofloop;
|
jtulach@678
|
18726 |
case 24:
|
jtulach@678
|
18727 |
case 25:
|
jtulach@678
|
18728 |
this$static.forceQuirks = true;
|
jtulach@678
|
18729 |
this$static.cstart = 1;
|
jtulach@678
|
18730 |
$doctype(this$static.tokenHandler, this$static.doctypeName, this$static.publicIdentifier, this$static.systemIdentifier, this$static.forceQuirks);
|
jtulach@678
|
18731 |
break eofloop;
|
jtulach@678
|
18732 |
case 26:
|
jtulach@678
|
18733 |
case 27:
|
jtulach@678
|
18734 |
this$static.forceQuirks = true;
|
jtulach@678
|
18735 |
this$static.systemIdentifier = valueOf_1(this$static.longStrBuf, 0, this$static.longStrBufLen);
|
jtulach@678
|
18736 |
this$static.cstart = 1;
|
jtulach@678
|
18737 |
$doctype(this$static.tokenHandler, this$static.doctypeName, this$static.publicIdentifier, this$static.systemIdentifier, this$static.forceQuirks);
|
jtulach@678
|
18738 |
break eofloop;
|
jtulach@678
|
18739 |
case 28:
|
jtulach@678
|
18740 |
this$static.forceQuirks = true;
|
jtulach@678
|
18741 |
this$static.cstart = 1;
|
jtulach@678
|
18742 |
$doctype(this$static.tokenHandler, this$static.doctypeName, this$static.publicIdentifier, this$static.systemIdentifier, this$static.forceQuirks);
|
jtulach@678
|
18743 |
break eofloop;
|
jtulach@678
|
18744 |
case 29:
|
jtulach@678
|
18745 |
this$static.cstart = 1;
|
jtulach@678
|
18746 |
$doctype(this$static.tokenHandler, this$static.doctypeName, this$static.publicIdentifier, this$static.systemIdentifier, this$static.forceQuirks);
|
jtulach@678
|
18747 |
break eofloop;
|
jtulach@678
|
18748 |
case 42:
|
jtulach@678
|
18749 |
$emitOrAppendStrBuf(this$static, returnState);
|
jtulach@678
|
18750 |
state = returnState;
|
jtulach@678
|
18751 |
continue;
|
jtulach@678
|
18752 |
case 44:
|
jtulach@678
|
18753 |
outer: for (;;) {
|
jtulach@678
|
18754 |
++this$static.entCol;
|
jtulach@678
|
18755 |
hiloop: for (;;) {
|
jtulach@678
|
18756 |
if (this$static.hi == -1) {
|
jtulach@678
|
18757 |
break hiloop;
|
jtulach@678
|
18758 |
}
|
jtulach@678
|
18759 |
if (this$static.entCol == ($clinit_94() , NAMES)[this$static.hi].length) {
|
jtulach@678
|
18760 |
break hiloop;
|
jtulach@678
|
18761 |
}
|
jtulach@678
|
18762 |
if (this$static.entCol > NAMES[this$static.hi].length) {
|
jtulach@678
|
18763 |
break outer;
|
jtulach@678
|
18764 |
}
|
jtulach@678
|
18765 |
else if (0 < NAMES[this$static.hi][this$static.entCol]) {
|
jtulach@678
|
18766 |
--this$static.hi;
|
jtulach@678
|
18767 |
}
|
jtulach@678
|
18768 |
else {
|
jtulach@678
|
18769 |
break hiloop;
|
jtulach@678
|
18770 |
}
|
jtulach@678
|
18771 |
}
|
jtulach@678
|
18772 |
loloop: for (;;) {
|
jtulach@678
|
18773 |
if (this$static.hi < this$static.lo) {
|
jtulach@678
|
18774 |
break outer;
|
jtulach@678
|
18775 |
}
|
jtulach@678
|
18776 |
if (this$static.entCol == ($clinit_94() , NAMES)[this$static.lo].length) {
|
jtulach@678
|
18777 |
this$static.candidate = this$static.lo;
|
jtulach@678
|
18778 |
this$static.strBufMark = this$static.strBufLen;
|
jtulach@678
|
18779 |
++this$static.lo;
|
jtulach@678
|
18780 |
}
|
jtulach@678
|
18781 |
else if (this$static.entCol > NAMES[this$static.lo].length) {
|
jtulach@678
|
18782 |
break outer;
|
jtulach@678
|
18783 |
}
|
jtulach@678
|
18784 |
else if (0 > NAMES[this$static.lo][this$static.entCol]) {
|
jtulach@678
|
18785 |
++this$static.lo;
|
jtulach@678
|
18786 |
}
|
jtulach@678
|
18787 |
else {
|
jtulach@678
|
18788 |
break loloop;
|
jtulach@678
|
18789 |
}
|
jtulach@678
|
18790 |
}
|
jtulach@678
|
18791 |
if (this$static.hi < this$static.lo) {
|
jtulach@678
|
18792 |
break outer;
|
jtulach@678
|
18793 |
}
|
jtulach@678
|
18794 |
continue;
|
jtulach@678
|
18795 |
}
|
jtulach@678
|
18796 |
|
jtulach@678
|
18797 |
if (this$static.candidate == -1) {
|
jtulach@678
|
18798 |
$emitOrAppendStrBuf(this$static, returnState);
|
jtulach@678
|
18799 |
state = returnState;
|
jtulach@678
|
18800 |
continue eofloop;
|
jtulach@678
|
18801 |
}
|
jtulach@678
|
18802 |
else {
|
jtulach@678
|
18803 |
candidateArr = ($clinit_94() , NAMES)[this$static.candidate];
|
jtulach@678
|
18804 |
if (candidateArr[candidateArr.length - 1] != 59) {
|
jtulach@678
|
18805 |
if ((returnState & -2) != 0) {
|
jtulach@678
|
18806 |
if (this$static.strBufMark == this$static.strBufLen) {
|
jtulach@678
|
18807 |
ch = 0;
|
jtulach@678
|
18808 |
}
|
jtulach@678
|
18809 |
else {
|
jtulach@678
|
18810 |
ch = this$static.strBuf[this$static.strBufMark];
|
jtulach@678
|
18811 |
}
|
jtulach@678
|
18812 |
if (ch >= 48 && ch <= 57 || ch >= 65 && ch <= 90 || ch >= 97 && ch <= 122) {
|
jtulach@678
|
18813 |
$appendLongStrBuf_0(this$static, this$static.strBuf, 0, this$static.strBufLen);
|
jtulach@678
|
18814 |
state = returnState;
|
jtulach@678
|
18815 |
continue eofloop;
|
jtulach@678
|
18816 |
}
|
jtulach@678
|
18817 |
}
|
jtulach@678
|
18818 |
}
|
jtulach@678
|
18819 |
val = VALUES_0[this$static.candidate];
|
jtulach@678
|
18820 |
$emitOrAppend(this$static, val, returnState);
|
jtulach@678
|
18821 |
if (this$static.strBufMark < this$static.strBufLen) {
|
jtulach@678
|
18822 |
if ((returnState & -2) != 0) {
|
jtulach@678
|
18823 |
for (i = this$static.strBufMark; i < this$static.strBufLen; ++i) {
|
jtulach@678
|
18824 |
$appendLongStrBuf(this$static, this$static.strBuf[i]);
|
jtulach@678
|
18825 |
}
|
jtulach@678
|
18826 |
}
|
jtulach@678
|
18827 |
else {
|
jtulach@678
|
18828 |
$characters(this$static.tokenHandler, this$static.strBuf, this$static.strBufMark, this$static.strBufLen - this$static.strBufMark);
|
jtulach@678
|
18829 |
}
|
jtulach@678
|
18830 |
}
|
jtulach@678
|
18831 |
state = returnState;
|
jtulach@678
|
18832 |
continue eofloop;
|
jtulach@678
|
18833 |
}
|
jtulach@678
|
18834 |
|
jtulach@678
|
18835 |
case 43:
|
jtulach@678
|
18836 |
case 46:
|
jtulach@678
|
18837 |
case 45:
|
jtulach@678
|
18838 |
if (this$static.seenDigits) {
|
jtulach@678
|
18839 |
}
|
jtulach@678
|
18840 |
else {
|
jtulach@678
|
18841 |
'No digits after \u201C' + valueOf_1(this$static.strBuf, 0, this$static.strBufLen) + '\u201D.';
|
jtulach@678
|
18842 |
$emitOrAppendStrBuf(this$static, returnState);
|
jtulach@678
|
18843 |
state = returnState;
|
jtulach@678
|
18844 |
continue;
|
jtulach@678
|
18845 |
}
|
jtulach@678
|
18846 |
|
jtulach@678
|
18847 |
$handleNcrValue(this$static, returnState);
|
jtulach@678
|
18848 |
state = returnState;
|
jtulach@678
|
18849 |
continue;
|
jtulach@678
|
18850 |
case 0:
|
jtulach@678
|
18851 |
default:break eofloop;
|
jtulach@678
|
18852 |
}
|
jtulach@678
|
18853 |
}
|
jtulach@678
|
18854 |
$eof_0(this$static.tokenHandler);
|
jtulach@678
|
18855 |
return;
|
jtulach@678
|
18856 |
}
|
jtulach@678
|
18857 |
|
jtulach@678
|
18858 |
function $fatal(this$static, message){
|
jtulach@678
|
18859 |
var spe;
|
jtulach@678
|
18860 |
spe = $SAXParseException(new SAXParseException(), message, this$static);
|
jtulach@678
|
18861 |
throw spe;
|
jtulach@678
|
18862 |
}
|
jtulach@678
|
18863 |
|
jtulach@678
|
18864 |
function $handleNcrValue(this$static, returnState){
|
jtulach@678
|
18865 |
var ch, val;
|
jtulach@678
|
18866 |
if (this$static.value >= 128 && this$static.value <= 159) {
|
jtulach@678
|
18867 |
val = ($clinit_94() , WINDOWS_1252)[this$static.value - 128];
|
jtulach@678
|
18868 |
$emitOrAppendOne(this$static, val, returnState);
|
jtulach@678
|
18869 |
}
|
jtulach@678
|
18870 |
else if (this$static.value == 13) {
|
jtulach@678
|
18871 |
$emitOrAppendOne(this$static, LF, returnState);
|
jtulach@678
|
18872 |
}
|
jtulach@678
|
18873 |
else if (this$static.value == 12 && this$static.contentSpacePolicy != ($clinit_80() , ALLOW)) {
|
jtulach@678
|
18874 |
if (this$static.contentSpacePolicy == ($clinit_80() , ALTER_INFOSET)) {
|
jtulach@678
|
18875 |
$emitOrAppendOne(this$static, SPACE, returnState);
|
jtulach@678
|
18876 |
}
|
jtulach@678
|
18877 |
else if (this$static.contentSpacePolicy == FATAL) {
|
jtulach@678
|
18878 |
$fatal(this$static, 'A character reference expanded to a form feed which is not legal XML 1.0 white space.');
|
jtulach@678
|
18879 |
}
|
jtulach@678
|
18880 |
}
|
jtulach@678
|
18881 |
else if (this$static.value >= 0 && this$static.value <= 8 || this$static.value == 11 || this$static.value >= 14 && this$static.value <= 31 || this$static.value == 127) {
|
jtulach@678
|
18882 |
'Character reference expands to a control character (' + $toUPlusString(this$static.value & 65535) + ').';
|
jtulach@678
|
18883 |
$emitOrAppendOne(this$static, REPLACEMENT_CHARACTER, returnState);
|
jtulach@678
|
18884 |
}
|
jtulach@678
|
18885 |
else if ((this$static.value & 63488) == 55296) {
|
jtulach@678
|
18886 |
$emitOrAppendOne(this$static, REPLACEMENT_CHARACTER, returnState);
|
jtulach@678
|
18887 |
}
|
jtulach@678
|
18888 |
else if ((this$static.value & 65534) == 65534) {
|
jtulach@678
|
18889 |
$emitOrAppendOne(this$static, REPLACEMENT_CHARACTER, returnState);
|
jtulach@678
|
18890 |
}
|
jtulach@678
|
18891 |
else if (this$static.value >= 64976 && this$static.value <= 65007) {
|
jtulach@678
|
18892 |
$emitOrAppendOne(this$static, REPLACEMENT_CHARACTER, returnState);
|
jtulach@678
|
18893 |
}
|
jtulach@678
|
18894 |
else if (this$static.value <= 65535) {
|
jtulach@678
|
18895 |
ch = this$static.value & 65535;
|
jtulach@678
|
18896 |
this$static.bmpChar[0] = ch;
|
jtulach@678
|
18897 |
$emitOrAppendOne(this$static, this$static.bmpChar, returnState);
|
jtulach@678
|
18898 |
}
|
jtulach@678
|
18899 |
else if (this$static.value <= 1114111) {
|
jtulach@678
|
18900 |
this$static.astralChar[0] = 55232 + (this$static.value >> 10) & 65535;
|
jtulach@678
|
18901 |
this$static.astralChar[1] = 56320 + (this$static.value & 1023) & 65535;
|
jtulach@678
|
18902 |
$emitOrAppend(this$static, this$static.astralChar, returnState);
|
jtulach@678
|
18903 |
}
|
jtulach@678
|
18904 |
else {
|
jtulach@678
|
18905 |
$emitOrAppendOne(this$static, REPLACEMENT_CHARACTER, returnState);
|
jtulach@678
|
18906 |
}
|
jtulach@678
|
18907 |
}
|
jtulach@678
|
18908 |
|
jtulach@678
|
18909 |
function $maybeAppendSpaceToBogusComment(this$static){
|
jtulach@678
|
18910 |
switch (this$static.commentPolicy.ordinal) {
|
jtulach@678
|
18911 |
case 2:
|
jtulach@678
|
18912 |
$appendLongStrBuf(this$static, 32);
|
jtulach@678
|
18913 |
break;
|
jtulach@678
|
18914 |
case 1:
|
jtulach@678
|
18915 |
$fatal(this$static, 'The document is not mappable to XML 1.0 due to a trailing hyphen in a comment.');
|
jtulach@678
|
18916 |
}
|
jtulach@678
|
18917 |
}
|
jtulach@678
|
18918 |
|
jtulach@678
|
18919 |
function $resetAttributes(this$static){
|
jtulach@678
|
18920 |
if (this$static.newAttributesEachTime) {
|
jtulach@678
|
18921 |
this$static.attributes = null;
|
jtulach@678
|
18922 |
}
|
jtulach@678
|
18923 |
else {
|
jtulach@678
|
18924 |
$clear_0(this$static.attributes, this$static.mappingLangToXmlLang);
|
jtulach@678
|
18925 |
}
|
jtulach@678
|
18926 |
}
|
jtulach@678
|
18927 |
|
jtulach@678
|
18928 |
function $setContentModelFlag(this$static, contentModelFlag){
|
jtulach@678
|
18929 |
var asArray;
|
jtulach@678
|
18930 |
this$static.stateSave = contentModelFlag;
|
jtulach@678
|
18931 |
if (contentModelFlag == 0) {
|
jtulach@678
|
18932 |
return;
|
jtulach@678
|
18933 |
}
|
jtulach@678
|
18934 |
asArray = null.nullMethod();
|
jtulach@678
|
18935 |
this$static.contentModelElement = elementNameByBuffer(asArray, 0, null.nullField);
|
jtulach@678
|
18936 |
$contentModelElementToArray(this$static);
|
jtulach@678
|
18937 |
}
|
jtulach@678
|
18938 |
|
jtulach@678
|
18939 |
function $setContentModelFlag_0(this$static, contentModelFlag, contentModelElement){
|
jtulach@678
|
18940 |
this$static.stateSave = contentModelFlag;
|
jtulach@678
|
18941 |
this$static.contentModelElement = contentModelElement;
|
jtulach@678
|
18942 |
$contentModelElementToArray(this$static);
|
jtulach@678
|
18943 |
}
|
jtulach@678
|
18944 |
|
jtulach@678
|
18945 |
function $setXmlnsPolicy(this$static, xmlnsPolicy){
|
jtulach@678
|
18946 |
if (xmlnsPolicy == ($clinit_80() , FATAL)) {
|
jtulach@678
|
18947 |
throw $IllegalArgumentException(new IllegalArgumentException(), "Can't use FATAL here.");
|
jtulach@678
|
18948 |
}
|
jtulach@678
|
18949 |
this$static.xmlnsPolicy = xmlnsPolicy;
|
jtulach@678
|
18950 |
}
|
jtulach@678
|
18951 |
|
jtulach@678
|
18952 |
function $start_0(this$static){
|
jtulach@678
|
18953 |
this$static.confident = false;
|
jtulach@678
|
18954 |
this$static.strBuf = initDim(_3C_classLit, 42, -1, 64, 1);
|
jtulach@678
|
18955 |
this$static.strBufLen = 0;
|
jtulach@678
|
18956 |
this$static.longStrBuf = initDim(_3C_classLit, 42, -1, 1024, 1);
|
jtulach@678
|
18957 |
this$static.longStrBufLen = 0;
|
jtulach@678
|
18958 |
this$static.stateSave = 0;
|
jtulach@678
|
18959 |
this$static.lastCR = false;
|
jtulach@678
|
18960 |
this$static.html4 = false;
|
jtulach@678
|
18961 |
this$static.metaBoundaryPassed = false;
|
jtulach@678
|
18962 |
$startTokenization(this$static.tokenHandler, this$static);
|
jtulach@678
|
18963 |
this$static.wantsComments = this$static.tokenHandler.wantingComments;
|
jtulach@678
|
18964 |
this$static.index = 0;
|
jtulach@678
|
18965 |
this$static.forceQuirks = false;
|
jtulach@678
|
18966 |
this$static.additional = 0;
|
jtulach@678
|
18967 |
this$static.entCol = -1;
|
jtulach@678
|
18968 |
this$static.lo = 0;
|
jtulach@678
|
18969 |
this$static.hi = ($clinit_94() , NAMES).length - 1;
|
jtulach@678
|
18970 |
this$static.candidate = -1;
|
jtulach@678
|
18971 |
this$static.strBufMark = 0;
|
jtulach@678
|
18972 |
this$static.prevValue = -1;
|
jtulach@678
|
18973 |
this$static.value = 0;
|
jtulach@678
|
18974 |
this$static.seenDigits = false;
|
jtulach@678
|
18975 |
this$static.shouldSuspend = false;
|
jtulach@678
|
18976 |
if (this$static.newAttributesEachTime) {
|
jtulach@678
|
18977 |
this$static.attributes = null;
|
jtulach@678
|
18978 |
}
|
jtulach@678
|
18979 |
else {
|
jtulach@678
|
18980 |
this$static.attributes = $HtmlAttributes(new HtmlAttributes(), this$static.mappingLangToXmlLang);
|
jtulach@678
|
18981 |
}
|
jtulach@678
|
18982 |
this$static.alreadyComplainedAboutNonAscii = false;
|
jtulach@678
|
18983 |
this$static.line = this$static.linePrev = 0;
|
jtulach@678
|
18984 |
this$static.col = this$static.colPrev = 1;
|
jtulach@678
|
18985 |
this$static.nextCharOnNewLine = true;
|
jtulach@678
|
18986 |
this$static.prev = 0;
|
jtulach@678
|
18987 |
this$static.alreadyWarnedAboutPrivateUseCharacters = false;
|
jtulach@678
|
18988 |
}
|
jtulach@678
|
18989 |
|
jtulach@678
|
18990 |
function $stateLoop(this$static, state, c, pos, buf, reconsume, returnState, endPos){
|
jtulach@678
|
18991 |
var candidateArr, ch, e, folded, i, val;
|
jtulach@678
|
18992 |
stateloop: for (;;) {
|
jtulach@678
|
18993 |
switch (state) {
|
jtulach@678
|
18994 |
case 0:
|
jtulach@678
|
18995 |
dataloop: for (;;) {
|
jtulach@678
|
18996 |
if (reconsume) {
|
jtulach@678
|
18997 |
reconsume = false;
|
jtulach@678
|
18998 |
}
|
jtulach@678
|
18999 |
else {
|
jtulach@678
|
19000 |
if (++pos == endPos) {
|
jtulach@678
|
19001 |
break stateloop;
|
jtulach@678
|
19002 |
}
|
jtulach@678
|
19003 |
c = $checkChar(this$static, buf, pos);
|
jtulach@678
|
19004 |
}
|
jtulach@678
|
19005 |
switch (c) {
|
jtulach@678
|
19006 |
case 38:
|
jtulach@678
|
19007 |
$flushChars(this$static, buf, pos);
|
jtulach@678
|
19008 |
this$static.strBuf[0] = c;
|
jtulach@678
|
19009 |
this$static.strBufLen = 1;
|
jtulach@678
|
19010 |
this$static.additional = 0;
|
jtulach@678
|
19011 |
$LocatorImpl(new LocatorImpl(), this$static);
|
jtulach@678
|
19012 |
returnState = state;
|
jtulach@678
|
19013 |
state = 42;
|
jtulach@678
|
19014 |
continue stateloop;
|
jtulach@678
|
19015 |
case 60:
|
jtulach@678
|
19016 |
$flushChars(this$static, buf, pos);
|
jtulach@678
|
19017 |
state = 4;
|
jtulach@678
|
19018 |
break dataloop;
|
jtulach@678
|
19019 |
case 0:
|
jtulach@678
|
19020 |
$emitReplacementCharacter(this$static, buf, pos);
|
jtulach@678
|
19021 |
continue;
|
jtulach@678
|
19022 |
case 13:
|
jtulach@678
|
19023 |
$emitCarriageReturn(this$static, buf, pos);
|
jtulach@678
|
19024 |
break stateloop;
|
jtulach@678
|
19025 |
case 10:
|
jtulach@678
|
19026 |
this$static.nextCharOnNewLine = true;
|
jtulach@678
|
19027 |
default:continue;
|
jtulach@678
|
19028 |
}
|
jtulach@678
|
19029 |
}
|
jtulach@678
|
19030 |
|
jtulach@678
|
19031 |
case 4:
|
jtulach@678
|
19032 |
tagopenloop: for (;;) {
|
jtulach@678
|
19033 |
if (++pos == endPos) {
|
jtulach@678
|
19034 |
break stateloop;
|
jtulach@678
|
19035 |
}
|
jtulach@678
|
19036 |
c = $checkChar(this$static, buf, pos);
|
jtulach@678
|
19037 |
if (c >= 65 && c <= 90) {
|
jtulach@678
|
19038 |
this$static.endTag = false;
|
jtulach@678
|
19039 |
this$static.strBuf[0] = c + 32 & 65535;
|
jtulach@678
|
19040 |
this$static.strBufLen = 1;
|
jtulach@678
|
19041 |
state = 6;
|
jtulach@678
|
19042 |
break tagopenloop;
|
jtulach@678
|
19043 |
}
|
jtulach@678
|
19044 |
else if (c >= 97 && c <= 122) {
|
jtulach@678
|
19045 |
this$static.endTag = false;
|
jtulach@678
|
19046 |
this$static.strBuf[0] = c;
|
jtulach@678
|
19047 |
this$static.strBufLen = 1;
|
jtulach@678
|
19048 |
state = 6;
|
jtulach@678
|
19049 |
break tagopenloop;
|
jtulach@678
|
19050 |
}
|
jtulach@678
|
19051 |
switch (c) {
|
jtulach@678
|
19052 |
case 33:
|
jtulach@678
|
19053 |
state = 16;
|
jtulach@678
|
19054 |
continue stateloop;
|
jtulach@678
|
19055 |
case 47:
|
jtulach@678
|
19056 |
state = 5;
|
jtulach@678
|
19057 |
continue stateloop;
|
jtulach@678
|
19058 |
case 63:
|
jtulach@678
|
19059 |
this$static.longStrBuf[0] = c;
|
jtulach@678
|
19060 |
this$static.longStrBufLen = 1;
|
jtulach@678
|
19061 |
state = 15;
|
jtulach@678
|
19062 |
continue stateloop;
|
jtulach@678
|
19063 |
case 62:
|
jtulach@678
|
19064 |
$characters(this$static.tokenHandler, LT_GT, 0, 2);
|
jtulach@678
|
19065 |
this$static.cstart = pos + 1;
|
jtulach@678
|
19066 |
state = 0;
|
jtulach@678
|
19067 |
continue stateloop;
|
jtulach@678
|
19068 |
default:$characters(this$static.tokenHandler, LT_GT, 0, 1);
|
jtulach@678
|
19069 |
this$static.cstart = pos;
|
jtulach@678
|
19070 |
state = 0;
|
jtulach@678
|
19071 |
reconsume = true;
|
jtulach@678
|
19072 |
continue stateloop;
|
jtulach@678
|
19073 |
}
|
jtulach@678
|
19074 |
}
|
jtulach@678
|
19075 |
|
jtulach@678
|
19076 |
case 6:
|
jtulach@678
|
19077 |
tagnameloop: for (;;) {
|
jtulach@678
|
19078 |
if (++pos == endPos) {
|
jtulach@678
|
19079 |
break stateloop;
|
jtulach@678
|
19080 |
}
|
jtulach@678
|
19081 |
c = $checkChar(this$static, buf, pos);
|
jtulach@678
|
19082 |
switch (c) {
|
jtulach@678
|
19083 |
case 13:
|
jtulach@678
|
19084 |
this$static.nextCharOnNewLine = true;
|
jtulach@678
|
19085 |
this$static.lastCR = true;
|
jtulach@678
|
19086 |
this$static.tagName = elementNameByBuffer(this$static.strBuf, 0, this$static.strBufLen);
|
jtulach@678
|
19087 |
state = 7;
|
jtulach@678
|
19088 |
break stateloop;
|
jtulach@678
|
19089 |
case 10:
|
jtulach@678
|
19090 |
this$static.nextCharOnNewLine = true;
|
jtulach@678
|
19091 |
case 32:
|
jtulach@678
|
19092 |
case 9:
|
jtulach@678
|
19093 |
case 12:
|
jtulach@678
|
19094 |
this$static.tagName = elementNameByBuffer(this$static.strBuf, 0, this$static.strBufLen);
|
jtulach@678
|
19095 |
state = 7;
|
jtulach@678
|
19096 |
break tagnameloop;
|
jtulach@678
|
19097 |
case 47:
|
jtulach@678
|
19098 |
this$static.tagName = elementNameByBuffer(this$static.strBuf, 0, this$static.strBufLen);
|
jtulach@678
|
19099 |
state = 48;
|
jtulach@678
|
19100 |
continue stateloop;
|
jtulach@678
|
19101 |
case 62:
|
jtulach@678
|
19102 |
this$static.tagName = elementNameByBuffer(this$static.strBuf, 0, this$static.strBufLen);
|
jtulach@678
|
19103 |
state = $emitCurrentTagToken(this$static, false, pos);
|
jtulach@678
|
19104 |
if (this$static.shouldSuspend) {
|
jtulach@678
|
19105 |
break stateloop;
|
jtulach@678
|
19106 |
}
|
jtulach@678
|
19107 |
|
jtulach@678
|
19108 |
continue stateloop;
|
jtulach@678
|
19109 |
case 0:
|
jtulach@678
|
19110 |
c = 65533;
|
jtulach@678
|
19111 |
default:if (c >= 65 && c <= 90) {
|
jtulach@678
|
19112 |
c += 32;
|
jtulach@678
|
19113 |
}
|
jtulach@678
|
19114 |
|
jtulach@678
|
19115 |
$appendStrBuf(this$static, c);
|
jtulach@678
|
19116 |
continue;
|
jtulach@678
|
19117 |
}
|
jtulach@678
|
19118 |
}
|
jtulach@678
|
19119 |
|
jtulach@678
|
19120 |
case 7:
|
jtulach@678
|
19121 |
beforeattributenameloop: for (;;) {
|
jtulach@678
|
19122 |
if (reconsume) {
|
jtulach@678
|
19123 |
reconsume = false;
|
jtulach@678
|
19124 |
}
|
jtulach@678
|
19125 |
else {
|
jtulach@678
|
19126 |
if (++pos == endPos) {
|
jtulach@678
|
19127 |
break stateloop;
|
jtulach@678
|
19128 |
}
|
jtulach@678
|
19129 |
c = $checkChar(this$static, buf, pos);
|
jtulach@678
|
19130 |
}
|
jtulach@678
|
19131 |
switch (c) {
|
jtulach@678
|
19132 |
case 13:
|
jtulach@678
|
19133 |
this$static.nextCharOnNewLine = true;
|
jtulach@678
|
19134 |
this$static.lastCR = true;
|
jtulach@678
|
19135 |
break stateloop;
|
jtulach@678
|
19136 |
case 10:
|
jtulach@678
|
19137 |
this$static.nextCharOnNewLine = true;
|
jtulach@678
|
19138 |
case 32:
|
jtulach@678
|
19139 |
case 9:
|
jtulach@678
|
19140 |
case 12:
|
jtulach@678
|
19141 |
continue;
|
jtulach@678
|
19142 |
case 47:
|
jtulach@678
|
19143 |
state = 48;
|
jtulach@678
|
19144 |
continue stateloop;
|
jtulach@678
|
19145 |
case 62:
|
jtulach@678
|
19146 |
state = $emitCurrentTagToken(this$static, false, pos);
|
jtulach@678
|
19147 |
if (this$static.shouldSuspend) {
|
jtulach@678
|
19148 |
break stateloop;
|
jtulach@678
|
19149 |
}
|
jtulach@678
|
19150 |
|
jtulach@678
|
19151 |
continue stateloop;
|
jtulach@678
|
19152 |
case 0:
|
jtulach@678
|
19153 |
c = 65533;
|
jtulach@678
|
19154 |
case 34:
|
jtulach@678
|
19155 |
case 39:
|
jtulach@678
|
19156 |
case 60:
|
jtulach@678
|
19157 |
case 61:
|
jtulach@678
|
19158 |
default:if (c >= 65 && c <= 90) {
|
jtulach@678
|
19159 |
c += 32;
|
jtulach@678
|
19160 |
}
|
jtulach@678
|
19161 |
|
jtulach@678
|
19162 |
this$static.strBuf[0] = c;
|
jtulach@678
|
19163 |
this$static.strBufLen = 1;
|
jtulach@678
|
19164 |
state = 8;
|
jtulach@678
|
19165 |
break beforeattributenameloop;
|
jtulach@678
|
19166 |
}
|
jtulach@678
|
19167 |
}
|
jtulach@678
|
19168 |
|
jtulach@678
|
19169 |
case 8:
|
jtulach@678
|
19170 |
attributenameloop: for (;;) {
|
jtulach@678
|
19171 |
if (++pos == endPos) {
|
jtulach@678
|
19172 |
break stateloop;
|
jtulach@678
|
19173 |
}
|
jtulach@678
|
19174 |
c = $checkChar(this$static, buf, pos);
|
jtulach@678
|
19175 |
switch (c) {
|
jtulach@678
|
19176 |
case 13:
|
jtulach@678
|
19177 |
this$static.nextCharOnNewLine = true;
|
jtulach@678
|
19178 |
this$static.lastCR = true;
|
jtulach@678
|
19179 |
$attributeNameComplete(this$static);
|
jtulach@678
|
19180 |
state = 9;
|
jtulach@678
|
19181 |
break stateloop;
|
jtulach@678
|
19182 |
case 10:
|
jtulach@678
|
19183 |
this$static.nextCharOnNewLine = true;
|
jtulach@678
|
19184 |
case 32:
|
jtulach@678
|
19185 |
case 9:
|
jtulach@678
|
19186 |
case 12:
|
jtulach@678
|
19187 |
$attributeNameComplete(this$static);
|
jtulach@678
|
19188 |
state = 9;
|
jtulach@678
|
19189 |
continue stateloop;
|
jtulach@678
|
19190 |
case 47:
|
jtulach@678
|
19191 |
$attributeNameComplete(this$static);
|
jtulach@678
|
19192 |
$addAttributeWithoutValue(this$static);
|
jtulach@678
|
19193 |
state = 48;
|
jtulach@678
|
19194 |
continue stateloop;
|
jtulach@678
|
19195 |
case 61:
|
jtulach@678
|
19196 |
$attributeNameComplete(this$static);
|
jtulach@678
|
19197 |
state = 10;
|
jtulach@678
|
19198 |
break attributenameloop;
|
jtulach@678
|
19199 |
case 62:
|
jtulach@678
|
19200 |
$attributeNameComplete(this$static);
|
jtulach@678
|
19201 |
$addAttributeWithoutValue(this$static);
|
jtulach@678
|
19202 |
state = $emitCurrentTagToken(this$static, false, pos);
|
jtulach@678
|
19203 |
if (this$static.shouldSuspend) {
|
jtulach@678
|
19204 |
break stateloop;
|
jtulach@678
|
19205 |
}
|
jtulach@678
|
19206 |
|
jtulach@678
|
19207 |
continue stateloop;
|
jtulach@678
|
19208 |
case 0:
|
jtulach@678
|
19209 |
c = 65533;
|
jtulach@678
|
19210 |
case 34:
|
jtulach@678
|
19211 |
case 39:
|
jtulach@678
|
19212 |
case 60:
|
jtulach@678
|
19213 |
default:if (c >= 65 && c <= 90) {
|
jtulach@678
|
19214 |
c += 32;
|
jtulach@678
|
19215 |
}
|
jtulach@678
|
19216 |
|
jtulach@678
|
19217 |
$appendStrBuf(this$static, c);
|
jtulach@678
|
19218 |
continue;
|
jtulach@678
|
19219 |
}
|
jtulach@678
|
19220 |
}
|
jtulach@678
|
19221 |
|
jtulach@678
|
19222 |
case 10:
|
jtulach@678
|
19223 |
beforeattributevalueloop: for (;;) {
|
jtulach@678
|
19224 |
if (++pos == endPos) {
|
jtulach@678
|
19225 |
break stateloop;
|
jtulach@678
|
19226 |
}
|
jtulach@678
|
19227 |
c = $checkChar(this$static, buf, pos);
|
jtulach@678
|
19228 |
switch (c) {
|
jtulach@678
|
19229 |
case 13:
|
jtulach@678
|
19230 |
this$static.nextCharOnNewLine = true;
|
jtulach@678
|
19231 |
this$static.lastCR = true;
|
jtulach@678
|
19232 |
break stateloop;
|
jtulach@678
|
19233 |
case 10:
|
jtulach@678
|
19234 |
this$static.nextCharOnNewLine = true;
|
jtulach@678
|
19235 |
case 32:
|
jtulach@678
|
19236 |
case 9:
|
jtulach@678
|
19237 |
case 12:
|
jtulach@678
|
19238 |
continue;
|
jtulach@678
|
19239 |
case 34:
|
jtulach@678
|
19240 |
this$static.longStrBufLen = 0;
|
jtulach@678
|
19241 |
state = 11;
|
jtulach@678
|
19242 |
break beforeattributevalueloop;
|
jtulach@678
|
19243 |
case 38:
|
jtulach@678
|
19244 |
this$static.longStrBufLen = 0;
|
jtulach@678
|
19245 |
state = 13;
|
jtulach@678
|
19246 |
reconsume = true;
|
jtulach@678
|
19247 |
continue stateloop;
|
jtulach@678
|
19248 |
case 39:
|
jtulach@678
|
19249 |
this$static.longStrBufLen = 0;
|
jtulach@678
|
19250 |
state = 12;
|
jtulach@678
|
19251 |
continue stateloop;
|
jtulach@678
|
19252 |
case 62:
|
jtulach@678
|
19253 |
$addAttributeWithoutValue(this$static);
|
jtulach@678
|
19254 |
state = $emitCurrentTagToken(this$static, false, pos);
|
jtulach@678
|
19255 |
if (this$static.shouldSuspend) {
|
jtulach@678
|
19256 |
break stateloop;
|
jtulach@678
|
19257 |
}
|
jtulach@678
|
19258 |
|
jtulach@678
|
19259 |
continue stateloop;
|
jtulach@678
|
19260 |
case 0:
|
jtulach@678
|
19261 |
c = 65533;
|
jtulach@678
|
19262 |
case 60:
|
jtulach@678
|
19263 |
case 61:
|
jtulach@678
|
19264 |
$errLtOrEqualsInUnquotedAttributeOrNull(c);
|
jtulach@678
|
19265 |
default:this$static.longStrBuf[0] = c;
|
jtulach@678
|
19266 |
this$static.longStrBufLen = 1;
|
jtulach@678
|
19267 |
state = 13;
|
jtulach@678
|
19268 |
continue stateloop;
|
jtulach@678
|
19269 |
}
|
jtulach@678
|
19270 |
}
|
jtulach@678
|
19271 |
|
jtulach@678
|
19272 |
case 11:
|
jtulach@678
|
19273 |
attributevaluedoublequotedloop: for (;;) {
|
jtulach@678
|
19274 |
if (reconsume) {
|
jtulach@678
|
19275 |
reconsume = false;
|
jtulach@678
|
19276 |
}
|
jtulach@678
|
19277 |
else {
|
jtulach@678
|
19278 |
if (++pos == endPos) {
|
jtulach@678
|
19279 |
break stateloop;
|
jtulach@678
|
19280 |
}
|
jtulach@678
|
19281 |
c = $checkChar(this$static, buf, pos);
|
jtulach@678
|
19282 |
}
|
jtulach@678
|
19283 |
switch (c) {
|
jtulach@678
|
19284 |
case 34:
|
jtulach@678
|
19285 |
$addAttributeWithValue(this$static);
|
jtulach@678
|
19286 |
state = 14;
|
jtulach@678
|
19287 |
break attributevaluedoublequotedloop;
|
jtulach@678
|
19288 |
case 38:
|
jtulach@678
|
19289 |
this$static.strBuf[0] = c;
|
jtulach@678
|
19290 |
this$static.strBufLen = 1;
|
jtulach@678
|
19291 |
this$static.additional = 34;
|
jtulach@678
|
19292 |
$LocatorImpl(new LocatorImpl(), this$static);
|
jtulach@678
|
19293 |
returnState = state;
|
jtulach@678
|
19294 |
state = 42;
|
jtulach@678
|
19295 |
continue stateloop;
|
jtulach@678
|
19296 |
case 13:
|
jtulach@678
|
19297 |
this$static.nextCharOnNewLine = true;
|
jtulach@678
|
19298 |
this$static.lastCR = true;
|
jtulach@678
|
19299 |
$appendLongStrBuf(this$static, 10);
|
jtulach@678
|
19300 |
break stateloop;
|
jtulach@678
|
19301 |
case 10:
|
jtulach@678
|
19302 |
this$static.nextCharOnNewLine = true;
|
jtulach@678
|
19303 |
$appendLongStrBuf(this$static, 10);
|
jtulach@678
|
19304 |
continue;
|
jtulach@678
|
19305 |
case 0:
|
jtulach@678
|
19306 |
c = 65533;
|
jtulach@678
|
19307 |
default:$appendLongStrBuf(this$static, c);
|
jtulach@678
|
19308 |
continue;
|
jtulach@678
|
19309 |
}
|
jtulach@678
|
19310 |
}
|
jtulach@678
|
19311 |
|
jtulach@678
|
19312 |
case 14:
|
jtulach@678
|
19313 |
afterattributevaluequotedloop: for (;;) {
|
jtulach@678
|
19314 |
if (++pos == endPos) {
|
jtulach@678
|
19315 |
break stateloop;
|
jtulach@678
|
19316 |
}
|
jtulach@678
|
19317 |
c = $checkChar(this$static, buf, pos);
|
jtulach@678
|
19318 |
switch (c) {
|
jtulach@678
|
19319 |
case 13:
|
jtulach@678
|
19320 |
this$static.nextCharOnNewLine = true;
|
jtulach@678
|
19321 |
this$static.lastCR = true;
|
jtulach@678
|
19322 |
state = 7;
|
jtulach@678
|
19323 |
break stateloop;
|
jtulach@678
|
19324 |
case 10:
|
jtulach@678
|
19325 |
this$static.nextCharOnNewLine = true;
|
jtulach@678
|
19326 |
case 32:
|
jtulach@678
|
19327 |
case 9:
|
jtulach@678
|
19328 |
case 12:
|
jtulach@678
|
19329 |
state = 7;
|
jtulach@678
|
19330 |
continue stateloop;
|
jtulach@678
|
19331 |
case 47:
|
jtulach@678
|
19332 |
state = 48;
|
jtulach@678
|
19333 |
break afterattributevaluequotedloop;
|
jtulach@678
|
19334 |
case 62:
|
jtulach@678
|
19335 |
state = $emitCurrentTagToken(this$static, false, pos);
|
jtulach@678
|
19336 |
if (this$static.shouldSuspend) {
|
jtulach@678
|
19337 |
break stateloop;
|
jtulach@678
|
19338 |
}
|
jtulach@678
|
19339 |
|
jtulach@678
|
19340 |
continue stateloop;
|
jtulach@678
|
19341 |
default:state = 7;
|
jtulach@678
|
19342 |
reconsume = true;
|
jtulach@678
|
19343 |
continue stateloop;
|
jtulach@678
|
19344 |
}
|
jtulach@678
|
19345 |
}
|
jtulach@678
|
19346 |
|
jtulach@678
|
19347 |
case 48:
|
jtulach@678
|
19348 |
if (++pos == endPos) {
|
jtulach@678
|
19349 |
break stateloop;
|
jtulach@678
|
19350 |
}
|
jtulach@678
|
19351 |
|
jtulach@678
|
19352 |
c = $checkChar(this$static, buf, pos);
|
jtulach@678
|
19353 |
switch (c) {
|
jtulach@678
|
19354 |
case 62:
|
jtulach@678
|
19355 |
state = $emitCurrentTagToken(this$static, true, pos);
|
jtulach@678
|
19356 |
if (this$static.shouldSuspend) {
|
jtulach@678
|
19357 |
break stateloop;
|
jtulach@678
|
19358 |
}
|
jtulach@678
|
19359 |
|
jtulach@678
|
19360 |
continue stateloop;
|
jtulach@678
|
19361 |
default:state = 7;
|
jtulach@678
|
19362 |
reconsume = true;
|
jtulach@678
|
19363 |
continue stateloop;
|
jtulach@678
|
19364 |
}
|
jtulach@678
|
19365 |
|
jtulach@678
|
19366 |
case 13:
|
jtulach@678
|
19367 |
for (;;) {
|
jtulach@678
|
19368 |
if (reconsume) {
|
jtulach@678
|
19369 |
reconsume = false;
|
jtulach@678
|
19370 |
}
|
jtulach@678
|
19371 |
else {
|
jtulach@678
|
19372 |
if (++pos == endPos) {
|
jtulach@678
|
19373 |
break stateloop;
|
jtulach@678
|
19374 |
}
|
jtulach@678
|
19375 |
c = $checkChar(this$static, buf, pos);
|
jtulach@678
|
19376 |
}
|
jtulach@678
|
19377 |
switch (c) {
|
jtulach@678
|
19378 |
case 13:
|
jtulach@678
|
19379 |
this$static.nextCharOnNewLine = true;
|
jtulach@678
|
19380 |
this$static.lastCR = true;
|
jtulach@678
|
19381 |
$addAttributeWithValue(this$static);
|
jtulach@678
|
19382 |
state = 7;
|
jtulach@678
|
19383 |
break stateloop;
|
jtulach@678
|
19384 |
case 10:
|
jtulach@678
|
19385 |
this$static.nextCharOnNewLine = true;
|
jtulach@678
|
19386 |
case 32:
|
jtulach@678
|
19387 |
case 9:
|
jtulach@678
|
19388 |
case 12:
|
jtulach@678
|
19389 |
$addAttributeWithValue(this$static);
|
jtulach@678
|
19390 |
state = 7;
|
jtulach@678
|
19391 |
continue stateloop;
|
jtulach@678
|
19392 |
case 38:
|
jtulach@678
|
19393 |
this$static.strBuf[0] = c;
|
jtulach@678
|
19394 |
this$static.strBufLen = 1;
|
jtulach@678
|
19395 |
this$static.additional = 62;
|
jtulach@678
|
19396 |
$LocatorImpl(new LocatorImpl(), this$static);
|
jtulach@678
|
19397 |
returnState = state;
|
jtulach@678
|
19398 |
state = 42;
|
jtulach@678
|
19399 |
continue stateloop;
|
jtulach@678
|
19400 |
case 62:
|
jtulach@678
|
19401 |
$addAttributeWithValue(this$static);
|
jtulach@678
|
19402 |
state = $emitCurrentTagToken(this$static, false, pos);
|
jtulach@678
|
19403 |
if (this$static.shouldSuspend) {
|
jtulach@678
|
19404 |
break stateloop;
|
jtulach@678
|
19405 |
}
|
jtulach@678
|
19406 |
|
jtulach@678
|
19407 |
continue stateloop;
|
jtulach@678
|
19408 |
case 0:
|
jtulach@678
|
19409 |
c = 65533;
|
jtulach@678
|
19410 |
case 60:
|
jtulach@678
|
19411 |
case 34:
|
jtulach@678
|
19412 |
case 39:
|
jtulach@678
|
19413 |
case 61:
|
jtulach@678
|
19414 |
default:$appendLongStrBuf(this$static, c);
|
jtulach@678
|
19415 |
continue;
|
jtulach@678
|
19416 |
}
|
jtulach@678
|
19417 |
}
|
jtulach@678
|
19418 |
|
jtulach@678
|
19419 |
case 9:
|
jtulach@678
|
19420 |
for (;;) {
|
jtulach@678
|
19421 |
if (++pos == endPos) {
|
jtulach@678
|
19422 |
break stateloop;
|
jtulach@678
|
19423 |
}
|
jtulach@678
|
19424 |
c = $checkChar(this$static, buf, pos);
|
jtulach@678
|
19425 |
switch (c) {
|
jtulach@678
|
19426 |
case 13:
|
jtulach@678
|
19427 |
this$static.nextCharOnNewLine = true;
|
jtulach@678
|
19428 |
this$static.lastCR = true;
|
jtulach@678
|
19429 |
break stateloop;
|
jtulach@678
|
19430 |
case 10:
|
jtulach@678
|
19431 |
this$static.nextCharOnNewLine = true;
|
jtulach@678
|
19432 |
case 32:
|
jtulach@678
|
19433 |
case 9:
|
jtulach@678
|
19434 |
case 12:
|
jtulach@678
|
19435 |
continue;
|
jtulach@678
|
19436 |
case 47:
|
jtulach@678
|
19437 |
$addAttributeWithoutValue(this$static);
|
jtulach@678
|
19438 |
state = 48;
|
jtulach@678
|
19439 |
continue stateloop;
|
jtulach@678
|
19440 |
case 61:
|
jtulach@678
|
19441 |
state = 10;
|
jtulach@678
|
19442 |
continue stateloop;
|
jtulach@678
|
19443 |
case 62:
|
jtulach@678
|
19444 |
$addAttributeWithoutValue(this$static);
|
jtulach@678
|
19445 |
state = $emitCurrentTagToken(this$static, false, pos);
|
jtulach@678
|
19446 |
if (this$static.shouldSuspend) {
|
jtulach@678
|
19447 |
break stateloop;
|
jtulach@678
|
19448 |
}
|
jtulach@678
|
19449 |
|
jtulach@678
|
19450 |
continue stateloop;
|
jtulach@678
|
19451 |
case 0:
|
jtulach@678
|
19452 |
c = 65533;
|
jtulach@678
|
19453 |
case 34:
|
jtulach@678
|
19454 |
case 39:
|
jtulach@678
|
19455 |
case 60:
|
jtulach@678
|
19456 |
default:$addAttributeWithoutValue(this$static);
|
jtulach@678
|
19457 |
if (c >= 65 && c <= 90) {
|
jtulach@678
|
19458 |
c += 32;
|
jtulach@678
|
19459 |
}
|
jtulach@678
|
19460 |
|
jtulach@678
|
19461 |
this$static.strBuf[0] = c;
|
jtulach@678
|
19462 |
this$static.strBufLen = 1;
|
jtulach@678
|
19463 |
state = 8;
|
jtulach@678
|
19464 |
continue stateloop;
|
jtulach@678
|
19465 |
}
|
jtulach@678
|
19466 |
}
|
jtulach@678
|
19467 |
|
jtulach@678
|
19468 |
case 15:
|
jtulach@678
|
19469 |
boguscommentloop: for (;;) {
|
jtulach@678
|
19470 |
if (reconsume) {
|
jtulach@678
|
19471 |
reconsume = false;
|
jtulach@678
|
19472 |
}
|
jtulach@678
|
19473 |
else {
|
jtulach@678
|
19474 |
if (++pos == endPos) {
|
jtulach@678
|
19475 |
break stateloop;
|
jtulach@678
|
19476 |
}
|
jtulach@678
|
19477 |
c = $checkChar(this$static, buf, pos);
|
jtulach@678
|
19478 |
}
|
jtulach@678
|
19479 |
switch (c) {
|
jtulach@678
|
19480 |
case 62:
|
jtulach@678
|
19481 |
$emitComment(this$static, 0, pos);
|
jtulach@678
|
19482 |
state = 0;
|
jtulach@678
|
19483 |
continue stateloop;
|
jtulach@678
|
19484 |
case 45:
|
jtulach@678
|
19485 |
$appendLongStrBuf(this$static, c);
|
jtulach@678
|
19486 |
state = 59;
|
jtulach@678
|
19487 |
break boguscommentloop;
|
jtulach@678
|
19488 |
case 13:
|
jtulach@678
|
19489 |
this$static.nextCharOnNewLine = true;
|
jtulach@678
|
19490 |
this$static.lastCR = true;
|
jtulach@678
|
19491 |
$appendLongStrBuf(this$static, 10);
|
jtulach@678
|
19492 |
break stateloop;
|
jtulach@678
|
19493 |
case 10:
|
jtulach@678
|
19494 |
this$static.nextCharOnNewLine = true;
|
jtulach@678
|
19495 |
$appendLongStrBuf(this$static, 10);
|
jtulach@678
|
19496 |
continue;
|
jtulach@678
|
19497 |
case 0:
|
jtulach@678
|
19498 |
c = 65533;
|
jtulach@678
|
19499 |
default:$appendLongStrBuf(this$static, c);
|
jtulach@678
|
19500 |
continue;
|
jtulach@678
|
19501 |
}
|
jtulach@678
|
19502 |
}
|
jtulach@678
|
19503 |
|
jtulach@678
|
19504 |
case 59:
|
jtulach@678
|
19505 |
boguscommenthyphenloop: for (;;) {
|
jtulach@678
|
19506 |
if (++pos == endPos) {
|
jtulach@678
|
19507 |
break stateloop;
|
jtulach@678
|
19508 |
}
|
jtulach@678
|
19509 |
c = $checkChar(this$static, buf, pos);
|
jtulach@678
|
19510 |
switch (c) {
|
jtulach@678
|
19511 |
case 62:
|
jtulach@678
|
19512 |
$maybeAppendSpaceToBogusComment(this$static);
|
jtulach@678
|
19513 |
$emitComment(this$static, 0, pos);
|
jtulach@678
|
19514 |
state = 0;
|
jtulach@678
|
19515 |
continue stateloop;
|
jtulach@678
|
19516 |
case 45:
|
jtulach@678
|
19517 |
$appendSecondHyphenToBogusComment(this$static);
|
jtulach@678
|
19518 |
continue boguscommenthyphenloop;
|
jtulach@678
|
19519 |
case 13:
|
jtulach@678
|
19520 |
this$static.nextCharOnNewLine = true;
|
jtulach@678
|
19521 |
this$static.lastCR = true;
|
jtulach@678
|
19522 |
$appendLongStrBuf(this$static, 10);
|
jtulach@678
|
19523 |
state = 15;
|
jtulach@678
|
19524 |
break stateloop;
|
jtulach@678
|
19525 |
case 10:
|
jtulach@678
|
19526 |
this$static.nextCharOnNewLine = true;
|
jtulach@678
|
19527 |
$appendLongStrBuf(this$static, 10);
|
jtulach@678
|
19528 |
state = 15;
|
jtulach@678
|
19529 |
continue stateloop;
|
jtulach@678
|
19530 |
case 0:
|
jtulach@678
|
19531 |
c = 65533;
|
jtulach@678
|
19532 |
default:$appendLongStrBuf(this$static, c);
|
jtulach@678
|
19533 |
state = 15;
|
jtulach@678
|
19534 |
continue stateloop;
|
jtulach@678
|
19535 |
}
|
jtulach@678
|
19536 |
}
|
jtulach@678
|
19537 |
|
jtulach@678
|
19538 |
case 16:
|
jtulach@678
|
19539 |
markupdeclarationopenloop: for (;;) {
|
jtulach@678
|
19540 |
if (++pos == endPos) {
|
jtulach@678
|
19541 |
break stateloop;
|
jtulach@678
|
19542 |
}
|
jtulach@678
|
19543 |
c = $checkChar(this$static, buf, pos);
|
jtulach@678
|
19544 |
switch (c) {
|
jtulach@678
|
19545 |
case 45:
|
jtulach@678
|
19546 |
this$static.longStrBuf[0] = c;
|
jtulach@678
|
19547 |
this$static.longStrBufLen = 1;
|
jtulach@678
|
19548 |
state = 38;
|
jtulach@678
|
19549 |
break markupdeclarationopenloop;
|
jtulach@678
|
19550 |
case 100:
|
jtulach@678
|
19551 |
case 68:
|
jtulach@678
|
19552 |
this$static.longStrBuf[0] = c;
|
jtulach@678
|
19553 |
this$static.longStrBufLen = 1;
|
jtulach@678
|
19554 |
this$static.index = 0;
|
jtulach@678
|
19555 |
state = 39;
|
jtulach@678
|
19556 |
continue stateloop;
|
jtulach@678
|
19557 |
case 91:
|
jtulach@678
|
19558 |
if (this$static.tokenHandler.foreignFlag == 0) {
|
jtulach@678
|
19559 |
this$static.longStrBuf[0] = c;
|
jtulach@678
|
19560 |
this$static.longStrBufLen = 1;
|
jtulach@678
|
19561 |
this$static.index = 0;
|
jtulach@678
|
19562 |
state = 49;
|
jtulach@678
|
19563 |
continue stateloop;
|
jtulach@678
|
19564 |
}
|
jtulach@678
|
19565 |
else {
|
jtulach@678
|
19566 |
}
|
jtulach@678
|
19567 |
|
jtulach@678
|
19568 |
default:this$static.longStrBufLen = 0;
|
jtulach@678
|
19569 |
state = 15;
|
jtulach@678
|
19570 |
reconsume = true;
|
jtulach@678
|
19571 |
continue stateloop;
|
jtulach@678
|
19572 |
}
|
jtulach@678
|
19573 |
}
|
jtulach@678
|
19574 |
|
jtulach@678
|
19575 |
case 38:
|
jtulach@678
|
19576 |
markupdeclarationhyphenloop: for (;;) {
|
jtulach@678
|
19577 |
if (++pos == endPos) {
|
jtulach@678
|
19578 |
break stateloop;
|
jtulach@678
|
19579 |
}
|
jtulach@678
|
19580 |
c = $checkChar(this$static, buf, pos);
|
jtulach@678
|
19581 |
switch (c) {
|
jtulach@678
|
19582 |
case 0:
|
jtulach@678
|
19583 |
break stateloop;
|
jtulach@678
|
19584 |
case 45:
|
jtulach@678
|
19585 |
this$static.longStrBufLen = 0;
|
jtulach@678
|
19586 |
state = 30;
|
jtulach@678
|
19587 |
break markupdeclarationhyphenloop;
|
jtulach@678
|
19588 |
default:state = 15;
|
jtulach@678
|
19589 |
reconsume = true;
|
jtulach@678
|
19590 |
continue stateloop;
|
jtulach@678
|
19591 |
}
|
jtulach@678
|
19592 |
}
|
jtulach@678
|
19593 |
|
jtulach@678
|
19594 |
case 30:
|
jtulach@678
|
19595 |
commentstartloop: for (;;) {
|
jtulach@678
|
19596 |
if (++pos == endPos) {
|
jtulach@678
|
19597 |
break stateloop;
|
jtulach@678
|
19598 |
}
|
jtulach@678
|
19599 |
c = $checkChar(this$static, buf, pos);
|
jtulach@678
|
19600 |
switch (c) {
|
jtulach@678
|
19601 |
case 45:
|
jtulach@678
|
19602 |
$appendLongStrBuf(this$static, c);
|
jtulach@678
|
19603 |
state = 31;
|
jtulach@678
|
19604 |
continue stateloop;
|
jtulach@678
|
19605 |
case 62:
|
jtulach@678
|
19606 |
$emitComment(this$static, 0, pos);
|
jtulach@678
|
19607 |
state = 0;
|
jtulach@678
|
19608 |
continue stateloop;
|
jtulach@678
|
19609 |
case 13:
|
jtulach@678
|
19610 |
this$static.nextCharOnNewLine = true;
|
jtulach@678
|
19611 |
this$static.lastCR = true;
|
jtulach@678
|
19612 |
$appendLongStrBuf(this$static, 10);
|
jtulach@678
|
19613 |
state = 32;
|
jtulach@678
|
19614 |
break stateloop;
|
jtulach@678
|
19615 |
case 10:
|
jtulach@678
|
19616 |
this$static.nextCharOnNewLine = true;
|
jtulach@678
|
19617 |
$appendLongStrBuf(this$static, 10);
|
jtulach@678
|
19618 |
state = 32;
|
jtulach@678
|
19619 |
break commentstartloop;
|
jtulach@678
|
19620 |
case 0:
|
jtulach@678
|
19621 |
c = 65533;
|
jtulach@678
|
19622 |
default:$appendLongStrBuf(this$static, c);
|
jtulach@678
|
19623 |
state = 32;
|
jtulach@678
|
19624 |
break commentstartloop;
|
jtulach@678
|
19625 |
}
|
jtulach@678
|
19626 |
}
|
jtulach@678
|
19627 |
|
jtulach@678
|
19628 |
case 32:
|
jtulach@678
|
19629 |
commentloop: for (;;) {
|
jtulach@678
|
19630 |
if (++pos == endPos) {
|
jtulach@678
|
19631 |
break stateloop;
|
jtulach@678
|
19632 |
}
|
jtulach@678
|
19633 |
c = $checkChar(this$static, buf, pos);
|
jtulach@678
|
19634 |
switch (c) {
|
jtulach@678
|
19635 |
case 45:
|
jtulach@678
|
19636 |
$appendLongStrBuf(this$static, c);
|
jtulach@678
|
19637 |
state = 33;
|
jtulach@678
|
19638 |
break commentloop;
|
jtulach@678
|
19639 |
case 13:
|
jtulach@678
|
19640 |
this$static.nextCharOnNewLine = true;
|
jtulach@678
|
19641 |
this$static.lastCR = true;
|
jtulach@678
|
19642 |
$appendLongStrBuf(this$static, 10);
|
jtulach@678
|
19643 |
break stateloop;
|
jtulach@678
|
19644 |
case 10:
|
jtulach@678
|
19645 |
this$static.nextCharOnNewLine = true;
|
jtulach@678
|
19646 |
$appendLongStrBuf(this$static, 10);
|
jtulach@678
|
19647 |
continue;
|
jtulach@678
|
19648 |
case 0:
|
jtulach@678
|
19649 |
c = 65533;
|
jtulach@678
|
19650 |
default:$appendLongStrBuf(this$static, c);
|
jtulach@678
|
19651 |
continue;
|
jtulach@678
|
19652 |
}
|
jtulach@678
|
19653 |
}
|
jtulach@678
|
19654 |
|
jtulach@678
|
19655 |
case 33:
|
jtulach@678
|
19656 |
commentenddashloop: for (;;) {
|
jtulach@678
|
19657 |
if (++pos == endPos) {
|
jtulach@678
|
19658 |
break stateloop;
|
jtulach@678
|
19659 |
}
|
jtulach@678
|
19660 |
c = $checkChar(this$static, buf, pos);
|
jtulach@678
|
19661 |
switch (c) {
|
jtulach@678
|
19662 |
case 45:
|
jtulach@678
|
19663 |
$appendLongStrBuf(this$static, c);
|
jtulach@678
|
19664 |
state = 34;
|
jtulach@678
|
19665 |
break commentenddashloop;
|
jtulach@678
|
19666 |
case 13:
|
jtulach@678
|
19667 |
this$static.nextCharOnNewLine = true;
|
jtulach@678
|
19668 |
this$static.lastCR = true;
|
jtulach@678
|
19669 |
$appendLongStrBuf(this$static, 10);
|
jtulach@678
|
19670 |
state = 32;
|
jtulach@678
|
19671 |
break stateloop;
|
jtulach@678
|
19672 |
case 10:
|
jtulach@678
|
19673 |
this$static.nextCharOnNewLine = true;
|
jtulach@678
|
19674 |
$appendLongStrBuf(this$static, 10);
|
jtulach@678
|
19675 |
state = 32;
|
jtulach@678
|
19676 |
continue stateloop;
|
jtulach@678
|
19677 |
case 0:
|
jtulach@678
|
19678 |
c = 65533;
|
jtulach@678
|
19679 |
default:$appendLongStrBuf(this$static, c);
|
jtulach@678
|
19680 |
state = 32;
|
jtulach@678
|
19681 |
continue stateloop;
|
jtulach@678
|
19682 |
}
|
jtulach@678
|
19683 |
}
|
jtulach@678
|
19684 |
|
jtulach@678
|
19685 |
case 34:
|
jtulach@678
|
19686 |
commentendloop: for (;;) {
|
jtulach@678
|
19687 |
if (++pos == endPos) {
|
jtulach@678
|
19688 |
break stateloop;
|
jtulach@678
|
19689 |
}
|
jtulach@678
|
19690 |
c = $checkChar(this$static, buf, pos);
|
jtulach@678
|
19691 |
switch (c) {
|
jtulach@678
|
19692 |
case 62:
|
jtulach@678
|
19693 |
$emitComment(this$static, 2, pos);
|
jtulach@678
|
19694 |
state = 0;
|
jtulach@678
|
19695 |
continue stateloop;
|
jtulach@678
|
19696 |
case 45:
|
jtulach@678
|
19697 |
$adjustDoubleHyphenAndAppendToLongStrBufAndErr(this$static, c);
|
jtulach@678
|
19698 |
continue;
|
jtulach@678
|
19699 |
case 32:
|
jtulach@678
|
19700 |
case 9:
|
jtulach@678
|
19701 |
case 12:
|
jtulach@678
|
19702 |
$adjustDoubleHyphenAndAppendToLongStrBufAndErr(this$static, c);
|
jtulach@678
|
19703 |
state = 35;
|
jtulach@678
|
19704 |
break commentendloop;
|
jtulach@678
|
19705 |
case 13:
|
jtulach@678
|
19706 |
this$static.nextCharOnNewLine = true;
|
jtulach@678
|
19707 |
this$static.lastCR = true;
|
jtulach@678
|
19708 |
$adjustDoubleHyphenAndAppendToLongStrBufAndErr(this$static, 10);
|
jtulach@678
|
19709 |
state = 35;
|
jtulach@678
|
19710 |
break stateloop;
|
jtulach@678
|
19711 |
case 10:
|
jtulach@678
|
19712 |
this$static.nextCharOnNewLine = true;
|
jtulach@678
|
19713 |
$adjustDoubleHyphenAndAppendToLongStrBufAndErr(this$static, 10);
|
jtulach@678
|
19714 |
state = 35;
|
jtulach@678
|
19715 |
break commentendloop;
|
jtulach@678
|
19716 |
case 33:
|
jtulach@678
|
19717 |
$appendLongStrBuf(this$static, c);
|
jtulach@678
|
19718 |
state = 36;
|
jtulach@678
|
19719 |
continue stateloop;
|
jtulach@678
|
19720 |
case 0:
|
jtulach@678
|
19721 |
c = 65533;
|
jtulach@678
|
19722 |
default:$adjustDoubleHyphenAndAppendToLongStrBufAndErr(this$static, c);
|
jtulach@678
|
19723 |
state = 32;
|
jtulach@678
|
19724 |
continue stateloop;
|
jtulach@678
|
19725 |
}
|
jtulach@678
|
19726 |
}
|
jtulach@678
|
19727 |
|
jtulach@678
|
19728 |
case 35:
|
jtulach@678
|
19729 |
for (;;) {
|
jtulach@678
|
19730 |
if (++pos == endPos) {
|
jtulach@678
|
19731 |
break stateloop;
|
jtulach@678
|
19732 |
}
|
jtulach@678
|
19733 |
c = $checkChar(this$static, buf, pos);
|
jtulach@678
|
19734 |
switch (c) {
|
jtulach@678
|
19735 |
case 62:
|
jtulach@678
|
19736 |
$emitComment(this$static, 0, pos);
|
jtulach@678
|
19737 |
state = 0;
|
jtulach@678
|
19738 |
continue stateloop;
|
jtulach@678
|
19739 |
case 45:
|
jtulach@678
|
19740 |
$appendLongStrBuf(this$static, c);
|
jtulach@678
|
19741 |
state = 33;
|
jtulach@678
|
19742 |
continue stateloop;
|
jtulach@678
|
19743 |
case 32:
|
jtulach@678
|
19744 |
case 9:
|
jtulach@678
|
19745 |
case 12:
|
jtulach@678
|
19746 |
$appendLongStrBuf(this$static, c);
|
jtulach@678
|
19747 |
continue;
|
jtulach@678
|
19748 |
case 13:
|
jtulach@678
|
19749 |
this$static.nextCharOnNewLine = true;
|
jtulach@678
|
19750 |
this$static.lastCR = true;
|
jtulach@678
|
19751 |
$appendLongStrBuf(this$static, 10);
|
jtulach@678
|
19752 |
break stateloop;
|
jtulach@678
|
19753 |
case 10:
|
jtulach@678
|
19754 |
this$static.nextCharOnNewLine = true;
|
jtulach@678
|
19755 |
$appendLongStrBuf(this$static, 10);
|
jtulach@678
|
19756 |
continue;
|
jtulach@678
|
19757 |
case 0:
|
jtulach@678
|
19758 |
c = 65533;
|
jtulach@678
|
19759 |
default:$appendLongStrBuf(this$static, c);
|
jtulach@678
|
19760 |
state = 32;
|
jtulach@678
|
19761 |
continue stateloop;
|
jtulach@678
|
19762 |
}
|
jtulach@678
|
19763 |
}
|
jtulach@678
|
19764 |
|
jtulach@678
|
19765 |
case 36:
|
jtulach@678
|
19766 |
for (;;) {
|
jtulach@678
|
19767 |
if (++pos == endPos) {
|
jtulach@678
|
19768 |
break stateloop;
|
jtulach@678
|
19769 |
}
|
jtulach@678
|
19770 |
c = $checkChar(this$static, buf, pos);
|
jtulach@678
|
19771 |
switch (c) {
|
jtulach@678
|
19772 |
case 62:
|
jtulach@678
|
19773 |
$emitComment(this$static, 3, pos);
|
jtulach@678
|
19774 |
state = 0;
|
jtulach@678
|
19775 |
continue stateloop;
|
jtulach@678
|
19776 |
case 45:
|
jtulach@678
|
19777 |
$appendLongStrBuf(this$static, c);
|
jtulach@678
|
19778 |
state = 33;
|
jtulach@678
|
19779 |
continue stateloop;
|
jtulach@678
|
19780 |
case 13:
|
jtulach@678
|
19781 |
this$static.nextCharOnNewLine = true;
|
jtulach@678
|
19782 |
this$static.lastCR = true;
|
jtulach@678
|
19783 |
$appendLongStrBuf(this$static, 10);
|
jtulach@678
|
19784 |
break stateloop;
|
jtulach@678
|
19785 |
case 10:
|
jtulach@678
|
19786 |
this$static.nextCharOnNewLine = true;
|
jtulach@678
|
19787 |
$appendLongStrBuf(this$static, 10);
|
jtulach@678
|
19788 |
continue;
|
jtulach@678
|
19789 |
case 0:
|
jtulach@678
|
19790 |
c = 65533;
|
jtulach@678
|
19791 |
default:$appendLongStrBuf(this$static, c);
|
jtulach@678
|
19792 |
state = 32;
|
jtulach@678
|
19793 |
continue stateloop;
|
jtulach@678
|
19794 |
}
|
jtulach@678
|
19795 |
}
|
jtulach@678
|
19796 |
|
jtulach@678
|
19797 |
case 31:
|
jtulach@678
|
19798 |
if (++pos == endPos) {
|
jtulach@678
|
19799 |
break stateloop;
|
jtulach@678
|
19800 |
}
|
jtulach@678
|
19801 |
|
jtulach@678
|
19802 |
c = $checkChar(this$static, buf, pos);
|
jtulach@678
|
19803 |
switch (c) {
|
jtulach@678
|
19804 |
case 45:
|
jtulach@678
|
19805 |
$appendLongStrBuf(this$static, c);
|
jtulach@678
|
19806 |
state = 34;
|
jtulach@678
|
19807 |
continue stateloop;
|
jtulach@678
|
19808 |
case 62:
|
jtulach@678
|
19809 |
$emitComment(this$static, 1, pos);
|
jtulach@678
|
19810 |
state = 0;
|
jtulach@678
|
19811 |
continue stateloop;
|
jtulach@678
|
19812 |
case 13:
|
jtulach@678
|
19813 |
this$static.nextCharOnNewLine = true;
|
jtulach@678
|
19814 |
this$static.lastCR = true;
|
jtulach@678
|
19815 |
$appendLongStrBuf(this$static, 10);
|
jtulach@678
|
19816 |
state = 32;
|
jtulach@678
|
19817 |
break stateloop;
|
jtulach@678
|
19818 |
case 10:
|
jtulach@678
|
19819 |
this$static.nextCharOnNewLine = true;
|
jtulach@678
|
19820 |
$appendLongStrBuf(this$static, 10);
|
jtulach@678
|
19821 |
state = 32;
|
jtulach@678
|
19822 |
continue stateloop;
|
jtulach@678
|
19823 |
case 0:
|
jtulach@678
|
19824 |
c = 65533;
|
jtulach@678
|
19825 |
default:$appendLongStrBuf(this$static, c);
|
jtulach@678
|
19826 |
state = 32;
|
jtulach@678
|
19827 |
continue stateloop;
|
jtulach@678
|
19828 |
}
|
jtulach@678
|
19829 |
|
jtulach@678
|
19830 |
case 39:
|
jtulach@678
|
19831 |
markupdeclarationdoctypeloop: for (;;) {
|
jtulach@678
|
19832 |
if (++pos == endPos) {
|
jtulach@678
|
19833 |
break stateloop;
|
jtulach@678
|
19834 |
}
|
jtulach@678
|
19835 |
c = $checkChar(this$static, buf, pos);
|
jtulach@678
|
19836 |
if (this$static.index < 6) {
|
jtulach@678
|
19837 |
folded = c;
|
jtulach@678
|
19838 |
if (c >= 65 && c <= 90) {
|
jtulach@678
|
19839 |
folded += 32;
|
jtulach@678
|
19840 |
}
|
jtulach@678
|
19841 |
if (folded == OCTYPE[this$static.index]) {
|
jtulach@678
|
19842 |
$appendLongStrBuf(this$static, c);
|
jtulach@678
|
19843 |
}
|
jtulach@678
|
19844 |
else {
|
jtulach@678
|
19845 |
state = 15;
|
jtulach@678
|
19846 |
reconsume = true;
|
jtulach@678
|
19847 |
continue stateloop;
|
jtulach@678
|
19848 |
}
|
jtulach@678
|
19849 |
++this$static.index;
|
jtulach@678
|
19850 |
continue;
|
jtulach@678
|
19851 |
}
|
jtulach@678
|
19852 |
else {
|
jtulach@678
|
19853 |
state = 17;
|
jtulach@678
|
19854 |
reconsume = true;
|
jtulach@678
|
19855 |
break markupdeclarationdoctypeloop;
|
jtulach@678
|
19856 |
}
|
jtulach@678
|
19857 |
}
|
jtulach@678
|
19858 |
|
jtulach@678
|
19859 |
case 17:
|
jtulach@678
|
19860 |
doctypeloop: for (;;) {
|
jtulach@678
|
19861 |
if (reconsume) {
|
jtulach@678
|
19862 |
reconsume = false;
|
jtulach@678
|
19863 |
}
|
jtulach@678
|
19864 |
else {
|
jtulach@678
|
19865 |
if (++pos == endPos) {
|
jtulach@678
|
19866 |
break stateloop;
|
jtulach@678
|
19867 |
}
|
jtulach@678
|
19868 |
c = $checkChar(this$static, buf, pos);
|
jtulach@678
|
19869 |
}
|
jtulach@678
|
19870 |
this$static.doctypeName = '';
|
jtulach@678
|
19871 |
this$static.systemIdentifier = null;
|
jtulach@678
|
19872 |
this$static.publicIdentifier = null;
|
jtulach@678
|
19873 |
this$static.forceQuirks = false;
|
jtulach@678
|
19874 |
switch (c) {
|
jtulach@678
|
19875 |
case 13:
|
jtulach@678
|
19876 |
this$static.nextCharOnNewLine = true;
|
jtulach@678
|
19877 |
this$static.lastCR = true;
|
jtulach@678
|
19878 |
state = 18;
|
jtulach@678
|
19879 |
break stateloop;
|
jtulach@678
|
19880 |
case 10:
|
jtulach@678
|
19881 |
this$static.nextCharOnNewLine = true;
|
jtulach@678
|
19882 |
case 32:
|
jtulach@678
|
19883 |
case 9:
|
jtulach@678
|
19884 |
case 12:
|
jtulach@678
|
19885 |
state = 18;
|
jtulach@678
|
19886 |
break doctypeloop;
|
jtulach@678
|
19887 |
default:state = 18;
|
jtulach@678
|
19888 |
reconsume = true;
|
jtulach@678
|
19889 |
break doctypeloop;
|
jtulach@678
|
19890 |
}
|
jtulach@678
|
19891 |
}
|
jtulach@678
|
19892 |
|
jtulach@678
|
19893 |
case 18:
|
jtulach@678
|
19894 |
beforedoctypenameloop: for (;;) {
|
jtulach@678
|
19895 |
if (reconsume) {
|
jtulach@678
|
19896 |
reconsume = false;
|
jtulach@678
|
19897 |
}
|
jtulach@678
|
19898 |
else {
|
jtulach@678
|
19899 |
if (++pos == endPos) {
|
jtulach@678
|
19900 |
break stateloop;
|
jtulach@678
|
19901 |
}
|
jtulach@678
|
19902 |
c = $checkChar(this$static, buf, pos);
|
jtulach@678
|
19903 |
}
|
jtulach@678
|
19904 |
switch (c) {
|
jtulach@678
|
19905 |
case 13:
|
jtulach@678
|
19906 |
this$static.nextCharOnNewLine = true;
|
jtulach@678
|
19907 |
this$static.lastCR = true;
|
jtulach@678
|
19908 |
break stateloop;
|
jtulach@678
|
19909 |
case 10:
|
jtulach@678
|
19910 |
this$static.nextCharOnNewLine = true;
|
jtulach@678
|
19911 |
case 32:
|
jtulach@678
|
19912 |
case 9:
|
jtulach@678
|
19913 |
case 12:
|
jtulach@678
|
19914 |
continue;
|
jtulach@678
|
19915 |
case 62:
|
jtulach@678
|
19916 |
this$static.forceQuirks = true;
|
jtulach@678
|
19917 |
this$static.cstart = pos + 1;
|
jtulach@678
|
19918 |
$doctype(this$static.tokenHandler, this$static.doctypeName, this$static.publicIdentifier, this$static.systemIdentifier, this$static.forceQuirks);
|
jtulach@678
|
19919 |
state = 0;
|
jtulach@678
|
19920 |
continue stateloop;
|
jtulach@678
|
19921 |
case 0:
|
jtulach@678
|
19922 |
c = 65533;
|
jtulach@678
|
19923 |
default:if (c >= 65 && c <= 90) {
|
jtulach@678
|
19924 |
c += 32;
|
jtulach@678
|
19925 |
}
|
jtulach@678
|
19926 |
|
jtulach@678
|
19927 |
this$static.strBuf[0] = c;
|
jtulach@678
|
19928 |
this$static.strBufLen = 1;
|
jtulach@678
|
19929 |
state = 19;
|
jtulach@678
|
19930 |
break beforedoctypenameloop;
|
jtulach@678
|
19931 |
}
|
jtulach@678
|
19932 |
}
|
jtulach@678
|
19933 |
|
jtulach@678
|
19934 |
case 19:
|
jtulach@678
|
19935 |
doctypenameloop: for (;;) {
|
jtulach@678
|
19936 |
if (++pos == endPos) {
|
jtulach@678
|
19937 |
break stateloop;
|
jtulach@678
|
19938 |
}
|
jtulach@678
|
19939 |
c = $checkChar(this$static, buf, pos);
|
jtulach@678
|
19940 |
switch (c) {
|
jtulach@678
|
19941 |
case 13:
|
jtulach@678
|
19942 |
this$static.nextCharOnNewLine = true;
|
jtulach@678
|
19943 |
this$static.lastCR = true;
|
jtulach@678
|
19944 |
this$static.doctypeName = String(valueOf_1(this$static.strBuf, 0, this$static.strBufLen));
|
jtulach@678
|
19945 |
state = 20;
|
jtulach@678
|
19946 |
break stateloop;
|
jtulach@678
|
19947 |
case 10:
|
jtulach@678
|
19948 |
this$static.nextCharOnNewLine = true;
|
jtulach@678
|
19949 |
case 32:
|
jtulach@678
|
19950 |
case 9:
|
jtulach@678
|
19951 |
case 12:
|
jtulach@678
|
19952 |
this$static.doctypeName = String(valueOf_1(this$static.strBuf, 0, this$static.strBufLen));
|
jtulach@678
|
19953 |
state = 20;
|
jtulach@678
|
19954 |
break doctypenameloop;
|
jtulach@678
|
19955 |
case 62:
|
jtulach@678
|
19956 |
this$static.doctypeName = String(valueOf_1(this$static.strBuf, 0, this$static.strBufLen));
|
jtulach@678
|
19957 |
this$static.cstart = pos + 1;
|
jtulach@678
|
19958 |
$doctype(this$static.tokenHandler, this$static.doctypeName, this$static.publicIdentifier, this$static.systemIdentifier, this$static.forceQuirks);
|
jtulach@678
|
19959 |
state = 0;
|
jtulach@678
|
19960 |
continue stateloop;
|
jtulach@678
|
19961 |
case 0:
|
jtulach@678
|
19962 |
c = 65533;
|
jtulach@678
|
19963 |
default:if (c >= 65 && c <= 90) {
|
jtulach@678
|
19964 |
c += 32;
|
jtulach@678
|
19965 |
}
|
jtulach@678
|
19966 |
|
jtulach@678
|
19967 |
$appendStrBuf(this$static, c);
|
jtulach@678
|
19968 |
continue;
|
jtulach@678
|
19969 |
}
|
jtulach@678
|
19970 |
}
|
jtulach@678
|
19971 |
|
jtulach@678
|
19972 |
case 20:
|
jtulach@678
|
19973 |
afterdoctypenameloop: for (;;) {
|
jtulach@678
|
19974 |
if (++pos == endPos) {
|
jtulach@678
|
19975 |
break stateloop;
|
jtulach@678
|
19976 |
}
|
jtulach@678
|
19977 |
c = $checkChar(this$static, buf, pos);
|
jtulach@678
|
19978 |
switch (c) {
|
jtulach@678
|
19979 |
case 13:
|
jtulach@678
|
19980 |
this$static.nextCharOnNewLine = true;
|
jtulach@678
|
19981 |
this$static.lastCR = true;
|
jtulach@678
|
19982 |
break stateloop;
|
jtulach@678
|
19983 |
case 10:
|
jtulach@678
|
19984 |
this$static.nextCharOnNewLine = true;
|
jtulach@678
|
19985 |
case 32:
|
jtulach@678
|
19986 |
case 9:
|
jtulach@678
|
19987 |
case 12:
|
jtulach@678
|
19988 |
continue;
|
jtulach@678
|
19989 |
case 62:
|
jtulach@678
|
19990 |
this$static.cstart = pos + 1;
|
jtulach@678
|
19991 |
$doctype(this$static.tokenHandler, this$static.doctypeName, this$static.publicIdentifier, this$static.systemIdentifier, this$static.forceQuirks);
|
jtulach@678
|
19992 |
state = 0;
|
jtulach@678
|
19993 |
continue stateloop;
|
jtulach@678
|
19994 |
case 112:
|
jtulach@678
|
19995 |
case 80:
|
jtulach@678
|
19996 |
this$static.index = 0;
|
jtulach@678
|
19997 |
state = 40;
|
jtulach@678
|
19998 |
break afterdoctypenameloop;
|
jtulach@678
|
19999 |
case 115:
|
jtulach@678
|
20000 |
case 83:
|
jtulach@678
|
20001 |
this$static.index = 0;
|
jtulach@678
|
20002 |
state = 41;
|
jtulach@678
|
20003 |
continue stateloop;
|
jtulach@678
|
20004 |
default:this$static.forceQuirks = true;
|
jtulach@678
|
20005 |
state = 29;
|
jtulach@678
|
20006 |
continue stateloop;
|
jtulach@678
|
20007 |
}
|
jtulach@678
|
20008 |
}
|
jtulach@678
|
20009 |
|
jtulach@678
|
20010 |
case 40:
|
jtulach@678
|
20011 |
doctypeublicloop: for (;;) {
|
jtulach@678
|
20012 |
if (++pos == endPos) {
|
jtulach@678
|
20013 |
break stateloop;
|
jtulach@678
|
20014 |
}
|
jtulach@678
|
20015 |
c = $checkChar(this$static, buf, pos);
|
jtulach@678
|
20016 |
if (this$static.index < 5) {
|
jtulach@678
|
20017 |
folded = c;
|
jtulach@678
|
20018 |
if (c >= 65 && c <= 90) {
|
jtulach@678
|
20019 |
folded += 32;
|
jtulach@678
|
20020 |
}
|
jtulach@678
|
20021 |
if (folded != UBLIC[this$static.index]) {
|
jtulach@678
|
20022 |
this$static.forceQuirks = true;
|
jtulach@678
|
20023 |
state = 29;
|
jtulach@678
|
20024 |
reconsume = true;
|
jtulach@678
|
20025 |
continue stateloop;
|
jtulach@678
|
20026 |
}
|
jtulach@678
|
20027 |
++this$static.index;
|
jtulach@678
|
20028 |
continue;
|
jtulach@678
|
20029 |
}
|
jtulach@678
|
20030 |
else {
|
jtulach@678
|
20031 |
state = 21;
|
jtulach@678
|
20032 |
reconsume = true;
|
jtulach@678
|
20033 |
break doctypeublicloop;
|
jtulach@678
|
20034 |
}
|
jtulach@678
|
20035 |
}
|
jtulach@678
|
20036 |
|
jtulach@678
|
20037 |
case 21:
|
jtulach@678
|
20038 |
beforedoctypepublicidentifierloop: for (;;) {
|
jtulach@678
|
20039 |
if (reconsume) {
|
jtulach@678
|
20040 |
reconsume = false;
|
jtulach@678
|
20041 |
}
|
jtulach@678
|
20042 |
else {
|
jtulach@678
|
20043 |
if (++pos == endPos) {
|
jtulach@678
|
20044 |
break stateloop;
|
jtulach@678
|
20045 |
}
|
jtulach@678
|
20046 |
c = $checkChar(this$static, buf, pos);
|
jtulach@678
|
20047 |
}
|
jtulach@678
|
20048 |
switch (c) {
|
jtulach@678
|
20049 |
case 13:
|
jtulach@678
|
20050 |
this$static.nextCharOnNewLine = true;
|
jtulach@678
|
20051 |
this$static.lastCR = true;
|
jtulach@678
|
20052 |
break stateloop;
|
jtulach@678
|
20053 |
case 10:
|
jtulach@678
|
20054 |
this$static.nextCharOnNewLine = true;
|
jtulach@678
|
20055 |
case 32:
|
jtulach@678
|
20056 |
case 9:
|
jtulach@678
|
20057 |
case 12:
|
jtulach@678
|
20058 |
continue;
|
jtulach@678
|
20059 |
case 34:
|
jtulach@678
|
20060 |
this$static.longStrBufLen = 0;
|
jtulach@678
|
20061 |
state = 22;
|
jtulach@678
|
20062 |
break beforedoctypepublicidentifierloop;
|
jtulach@678
|
20063 |
case 39:
|
jtulach@678
|
20064 |
this$static.longStrBufLen = 0;
|
jtulach@678
|
20065 |
state = 23;
|
jtulach@678
|
20066 |
continue stateloop;
|
jtulach@678
|
20067 |
case 62:
|
jtulach@678
|
20068 |
this$static.forceQuirks = true;
|
jtulach@678
|
20069 |
this$static.cstart = pos + 1;
|
jtulach@678
|
20070 |
$doctype(this$static.tokenHandler, this$static.doctypeName, this$static.publicIdentifier, this$static.systemIdentifier, this$static.forceQuirks);
|
jtulach@678
|
20071 |
state = 0;
|
jtulach@678
|
20072 |
continue stateloop;
|
jtulach@678
|
20073 |
default:this$static.forceQuirks = true;
|
jtulach@678
|
20074 |
state = 29;
|
jtulach@678
|
20075 |
continue stateloop;
|
jtulach@678
|
20076 |
}
|
jtulach@678
|
20077 |
}
|
jtulach@678
|
20078 |
|
jtulach@678
|
20079 |
case 22:
|
jtulach@678
|
20080 |
doctypepublicidentifierdoublequotedloop: for (;;) {
|
jtulach@678
|
20081 |
if (++pos == endPos) {
|
jtulach@678
|
20082 |
break stateloop;
|
jtulach@678
|
20083 |
}
|
jtulach@678
|
20084 |
c = $checkChar(this$static, buf, pos);
|
jtulach@678
|
20085 |
switch (c) {
|
jtulach@678
|
20086 |
case 34:
|
jtulach@678
|
20087 |
this$static.publicIdentifier = valueOf_1(this$static.longStrBuf, 0, this$static.longStrBufLen);
|
jtulach@678
|
20088 |
state = 24;
|
jtulach@678
|
20089 |
break doctypepublicidentifierdoublequotedloop;
|
jtulach@678
|
20090 |
case 62:
|
jtulach@678
|
20091 |
this$static.forceQuirks = true;
|
jtulach@678
|
20092 |
this$static.publicIdentifier = valueOf_1(this$static.longStrBuf, 0, this$static.longStrBufLen);
|
jtulach@678
|
20093 |
this$static.cstart = pos + 1;
|
jtulach@678
|
20094 |
$doctype(this$static.tokenHandler, this$static.doctypeName, this$static.publicIdentifier, this$static.systemIdentifier, this$static.forceQuirks);
|
jtulach@678
|
20095 |
state = 0;
|
jtulach@678
|
20096 |
continue stateloop;
|
jtulach@678
|
20097 |
case 13:
|
jtulach@678
|
20098 |
this$static.nextCharOnNewLine = true;
|
jtulach@678
|
20099 |
this$static.lastCR = true;
|
jtulach@678
|
20100 |
$appendLongStrBuf(this$static, 10);
|
jtulach@678
|
20101 |
break stateloop;
|
jtulach@678
|
20102 |
case 10:
|
jtulach@678
|
20103 |
this$static.nextCharOnNewLine = true;
|
jtulach@678
|
20104 |
$appendLongStrBuf(this$static, 10);
|
jtulach@678
|
20105 |
continue;
|
jtulach@678
|
20106 |
case 0:
|
jtulach@678
|
20107 |
c = 65533;
|
jtulach@678
|
20108 |
default:$appendLongStrBuf(this$static, c);
|
jtulach@678
|
20109 |
continue;
|
jtulach@678
|
20110 |
}
|
jtulach@678
|
20111 |
}
|
jtulach@678
|
20112 |
|
jtulach@678
|
20113 |
case 24:
|
jtulach@678
|
20114 |
afterdoctypepublicidentifierloop: for (;;) {
|
jtulach@678
|
20115 |
if (++pos == endPos) {
|
jtulach@678
|
20116 |
break stateloop;
|
jtulach@678
|
20117 |
}
|
jtulach@678
|
20118 |
c = $checkChar(this$static, buf, pos);
|
jtulach@678
|
20119 |
switch (c) {
|
jtulach@678
|
20120 |
case 13:
|
jtulach@678
|
20121 |
this$static.nextCharOnNewLine = true;
|
jtulach@678
|
20122 |
this$static.lastCR = true;
|
jtulach@678
|
20123 |
break stateloop;
|
jtulach@678
|
20124 |
case 10:
|
jtulach@678
|
20125 |
this$static.nextCharOnNewLine = true;
|
jtulach@678
|
20126 |
case 32:
|
jtulach@678
|
20127 |
case 9:
|
jtulach@678
|
20128 |
case 12:
|
jtulach@678
|
20129 |
continue;
|
jtulach@678
|
20130 |
case 34:
|
jtulach@678
|
20131 |
this$static.longStrBufLen = 0;
|
jtulach@678
|
20132 |
state = 26;
|
jtulach@678
|
20133 |
break afterdoctypepublicidentifierloop;
|
jtulach@678
|
20134 |
case 39:
|
jtulach@678
|
20135 |
this$static.longStrBufLen = 0;
|
jtulach@678
|
20136 |
state = 27;
|
jtulach@678
|
20137 |
continue stateloop;
|
jtulach@678
|
20138 |
case 62:
|
jtulach@678
|
20139 |
this$static.cstart = pos + 1;
|
jtulach@678
|
20140 |
$doctype(this$static.tokenHandler, this$static.doctypeName, this$static.publicIdentifier, this$static.systemIdentifier, this$static.forceQuirks);
|
jtulach@678
|
20141 |
state = 0;
|
jtulach@678
|
20142 |
continue stateloop;
|
jtulach@678
|
20143 |
default:this$static.forceQuirks = true;
|
jtulach@678
|
20144 |
state = 29;
|
jtulach@678
|
20145 |
continue stateloop;
|
jtulach@678
|
20146 |
}
|
jtulach@678
|
20147 |
}
|
jtulach@678
|
20148 |
|
jtulach@678
|
20149 |
case 26:
|
jtulach@678
|
20150 |
doctypesystemidentifierdoublequotedloop: for (;;) {
|
jtulach@678
|
20151 |
if (++pos == endPos) {
|
jtulach@678
|
20152 |
break stateloop;
|
jtulach@678
|
20153 |
}
|
jtulach@678
|
20154 |
c = $checkChar(this$static, buf, pos);
|
jtulach@678
|
20155 |
switch (c) {
|
jtulach@678
|
20156 |
case 34:
|
jtulach@678
|
20157 |
this$static.systemIdentifier = valueOf_1(this$static.longStrBuf, 0, this$static.longStrBufLen);
|
jtulach@678
|
20158 |
state = 28;
|
jtulach@678
|
20159 |
continue stateloop;
|
jtulach@678
|
20160 |
case 62:
|
jtulach@678
|
20161 |
this$static.forceQuirks = true;
|
jtulach@678
|
20162 |
this$static.systemIdentifier = valueOf_1(this$static.longStrBuf, 0, this$static.longStrBufLen);
|
jtulach@678
|
20163 |
this$static.cstart = pos + 1;
|
jtulach@678
|
20164 |
$doctype(this$static.tokenHandler, this$static.doctypeName, this$static.publicIdentifier, this$static.systemIdentifier, this$static.forceQuirks);
|
jtulach@678
|
20165 |
state = 0;
|
jtulach@678
|
20166 |
continue stateloop;
|
jtulach@678
|
20167 |
case 13:
|
jtulach@678
|
20168 |
this$static.nextCharOnNewLine = true;
|
jtulach@678
|
20169 |
this$static.lastCR = true;
|
jtulach@678
|
20170 |
$appendLongStrBuf(this$static, 10);
|
jtulach@678
|
20171 |
break stateloop;
|
jtulach@678
|
20172 |
case 10:
|
jtulach@678
|
20173 |
this$static.nextCharOnNewLine = true;
|
jtulach@678
|
20174 |
$appendLongStrBuf(this$static, 10);
|
jtulach@678
|
20175 |
continue;
|
jtulach@678
|
20176 |
case 0:
|
jtulach@678
|
20177 |
c = 65533;
|
jtulach@678
|
20178 |
default:$appendLongStrBuf(this$static, c);
|
jtulach@678
|
20179 |
continue;
|
jtulach@678
|
20180 |
}
|
jtulach@678
|
20181 |
}
|
jtulach@678
|
20182 |
|
jtulach@678
|
20183 |
case 28:
|
jtulach@678
|
20184 |
afterdoctypesystemidentifierloop: for (;;) {
|
jtulach@678
|
20185 |
if (++pos == endPos) {
|
jtulach@678
|
20186 |
break stateloop;
|
jtulach@678
|
20187 |
}
|
jtulach@678
|
20188 |
c = $checkChar(this$static, buf, pos);
|
jtulach@678
|
20189 |
switch (c) {
|
jtulach@678
|
20190 |
case 13:
|
jtulach@678
|
20191 |
this$static.nextCharOnNewLine = true;
|
jtulach@678
|
20192 |
this$static.lastCR = true;
|
jtulach@678
|
20193 |
break stateloop;
|
jtulach@678
|
20194 |
case 10:
|
jtulach@678
|
20195 |
this$static.nextCharOnNewLine = true;
|
jtulach@678
|
20196 |
case 32:
|
jtulach@678
|
20197 |
case 9:
|
jtulach@678
|
20198 |
case 12:
|
jtulach@678
|
20199 |
continue;
|
jtulach@678
|
20200 |
case 62:
|
jtulach@678
|
20201 |
this$static.cstart = pos + 1;
|
jtulach@678
|
20202 |
$doctype(this$static.tokenHandler, this$static.doctypeName, this$static.publicIdentifier, this$static.systemIdentifier, this$static.forceQuirks);
|
jtulach@678
|
20203 |
state = 0;
|
jtulach@678
|
20204 |
continue stateloop;
|
jtulach@678
|
20205 |
default:this$static.forceQuirks = false;
|
jtulach@678
|
20206 |
state = 29;
|
jtulach@678
|
20207 |
break afterdoctypesystemidentifierloop;
|
jtulach@678
|
20208 |
}
|
jtulach@678
|
20209 |
}
|
jtulach@678
|
20210 |
|
jtulach@678
|
20211 |
case 29:
|
jtulach@678
|
20212 |
for (;;) {
|
jtulach@678
|
20213 |
if (reconsume) {
|
jtulach@678
|
20214 |
reconsume = false;
|
jtulach@678
|
20215 |
}
|
jtulach@678
|
20216 |
else {
|
jtulach@678
|
20217 |
if (++pos == endPos) {
|
jtulach@678
|
20218 |
break stateloop;
|
jtulach@678
|
20219 |
}
|
jtulach@678
|
20220 |
c = $checkChar(this$static, buf, pos);
|
jtulach@678
|
20221 |
}
|
jtulach@678
|
20222 |
switch (c) {
|
jtulach@678
|
20223 |
case 62:
|
jtulach@678
|
20224 |
this$static.cstart = pos + 1;
|
jtulach@678
|
20225 |
$doctype(this$static.tokenHandler, this$static.doctypeName, this$static.publicIdentifier, this$static.systemIdentifier, this$static.forceQuirks);
|
jtulach@678
|
20226 |
state = 0;
|
jtulach@678
|
20227 |
continue stateloop;
|
jtulach@678
|
20228 |
case 13:
|
jtulach@678
|
20229 |
this$static.nextCharOnNewLine = true;
|
jtulach@678
|
20230 |
this$static.lastCR = true;
|
jtulach@678
|
20231 |
break stateloop;
|
jtulach@678
|
20232 |
case 10:
|
jtulach@678
|
20233 |
this$static.nextCharOnNewLine = true;
|
jtulach@678
|
20234 |
default:continue;
|
jtulach@678
|
20235 |
}
|
jtulach@678
|
20236 |
}
|
jtulach@678
|
20237 |
|
jtulach@678
|
20238 |
case 41:
|
jtulach@678
|
20239 |
doctypeystemloop: for (;;) {
|
jtulach@678
|
20240 |
if (++pos == endPos) {
|
jtulach@678
|
20241 |
break stateloop;
|
jtulach@678
|
20242 |
}
|
jtulach@678
|
20243 |
c = $checkChar(this$static, buf, pos);
|
jtulach@678
|
20244 |
if (this$static.index < 5) {
|
jtulach@678
|
20245 |
folded = c;
|
jtulach@678
|
20246 |
if (c >= 65 && c <= 90) {
|
jtulach@678
|
20247 |
folded += 32;
|
jtulach@678
|
20248 |
}
|
jtulach@678
|
20249 |
if (folded != YSTEM[this$static.index]) {
|
jtulach@678
|
20250 |
this$static.forceQuirks = true;
|
jtulach@678
|
20251 |
state = 29;
|
jtulach@678
|
20252 |
reconsume = true;
|
jtulach@678
|
20253 |
continue stateloop;
|
jtulach@678
|
20254 |
}
|
jtulach@678
|
20255 |
++this$static.index;
|
jtulach@678
|
20256 |
continue stateloop;
|
jtulach@678
|
20257 |
}
|
jtulach@678
|
20258 |
else {
|
jtulach@678
|
20259 |
state = 25;
|
jtulach@678
|
20260 |
reconsume = true;
|
jtulach@678
|
20261 |
break doctypeystemloop;
|
jtulach@678
|
20262 |
}
|
jtulach@678
|
20263 |
}
|
jtulach@678
|
20264 |
|
jtulach@678
|
20265 |
case 25:
|
jtulach@678
|
20266 |
beforedoctypesystemidentifierloop: for (;;) {
|
jtulach@678
|
20267 |
if (reconsume) {
|
jtulach@678
|
20268 |
reconsume = false;
|
jtulach@678
|
20269 |
}
|
jtulach@678
|
20270 |
else {
|
jtulach@678
|
20271 |
if (++pos == endPos) {
|
jtulach@678
|
20272 |
break stateloop;
|
jtulach@678
|
20273 |
}
|
jtulach@678
|
20274 |
c = $checkChar(this$static, buf, pos);
|
jtulach@678
|
20275 |
}
|
jtulach@678
|
20276 |
switch (c) {
|
jtulach@678
|
20277 |
case 13:
|
jtulach@678
|
20278 |
this$static.nextCharOnNewLine = true;
|
jtulach@678
|
20279 |
this$static.lastCR = true;
|
jtulach@678
|
20280 |
break stateloop;
|
jtulach@678
|
20281 |
case 10:
|
jtulach@678
|
20282 |
this$static.nextCharOnNewLine = true;
|
jtulach@678
|
20283 |
case 32:
|
jtulach@678
|
20284 |
case 9:
|
jtulach@678
|
20285 |
case 12:
|
jtulach@678
|
20286 |
continue;
|
jtulach@678
|
20287 |
case 34:
|
jtulach@678
|
20288 |
this$static.longStrBufLen = 0;
|
jtulach@678
|
20289 |
state = 26;
|
jtulach@678
|
20290 |
continue stateloop;
|
jtulach@678
|
20291 |
case 39:
|
jtulach@678
|
20292 |
this$static.longStrBufLen = 0;
|
jtulach@678
|
20293 |
state = 27;
|
jtulach@678
|
20294 |
break beforedoctypesystemidentifierloop;
|
jtulach@678
|
20295 |
case 62:
|
jtulach@678
|
20296 |
this$static.forceQuirks = true;
|
jtulach@678
|
20297 |
this$static.cstart = pos + 1;
|
jtulach@678
|
20298 |
$doctype(this$static.tokenHandler, this$static.doctypeName, this$static.publicIdentifier, this$static.systemIdentifier, this$static.forceQuirks);
|
jtulach@678
|
20299 |
state = 0;
|
jtulach@678
|
20300 |
continue stateloop;
|
jtulach@678
|
20301 |
default:this$static.forceQuirks = true;
|
jtulach@678
|
20302 |
state = 29;
|
jtulach@678
|
20303 |
continue stateloop;
|
jtulach@678
|
20304 |
}
|
jtulach@678
|
20305 |
}
|
jtulach@678
|
20306 |
|
jtulach@678
|
20307 |
case 27:
|
jtulach@678
|
20308 |
for (;;) {
|
jtulach@678
|
20309 |
if (++pos == endPos) {
|
jtulach@678
|
20310 |
break stateloop;
|
jtulach@678
|
20311 |
}
|
jtulach@678
|
20312 |
c = $checkChar(this$static, buf, pos);
|
jtulach@678
|
20313 |
switch (c) {
|
jtulach@678
|
20314 |
case 39:
|
jtulach@678
|
20315 |
this$static.systemIdentifier = valueOf_1(this$static.longStrBuf, 0, this$static.longStrBufLen);
|
jtulach@678
|
20316 |
state = 28;
|
jtulach@678
|
20317 |
continue stateloop;
|
jtulach@678
|
20318 |
case 62:
|
jtulach@678
|
20319 |
this$static.forceQuirks = true;
|
jtulach@678
|
20320 |
this$static.systemIdentifier = valueOf_1(this$static.longStrBuf, 0, this$static.longStrBufLen);
|
jtulach@678
|
20321 |
this$static.cstart = pos + 1;
|
jtulach@678
|
20322 |
$doctype(this$static.tokenHandler, this$static.doctypeName, this$static.publicIdentifier, this$static.systemIdentifier, this$static.forceQuirks);
|
jtulach@678
|
20323 |
state = 0;
|
jtulach@678
|
20324 |
continue stateloop;
|
jtulach@678
|
20325 |
case 13:
|
jtulach@678
|
20326 |
this$static.nextCharOnNewLine = true;
|
jtulach@678
|
20327 |
this$static.lastCR = true;
|
jtulach@678
|
20328 |
$appendLongStrBuf(this$static, 10);
|
jtulach@678
|
20329 |
break stateloop;
|
jtulach@678
|
20330 |
case 10:
|
jtulach@678
|
20331 |
this$static.nextCharOnNewLine = true;
|
jtulach@678
|
20332 |
$appendLongStrBuf(this$static, 10);
|
jtulach@678
|
20333 |
continue;
|
jtulach@678
|
20334 |
case 0:
|
jtulach@678
|
20335 |
c = 65533;
|
jtulach@678
|
20336 |
default:$appendLongStrBuf(this$static, c);
|
jtulach@678
|
20337 |
continue;
|
jtulach@678
|
20338 |
}
|
jtulach@678
|
20339 |
}
|
jtulach@678
|
20340 |
|
jtulach@678
|
20341 |
case 23:
|
jtulach@678
|
20342 |
for (;;) {
|
jtulach@678
|
20343 |
if (++pos == endPos) {
|
jtulach@678
|
20344 |
break stateloop;
|
jtulach@678
|
20345 |
}
|
jtulach@678
|
20346 |
c = $checkChar(this$static, buf, pos);
|
jtulach@678
|
20347 |
switch (c) {
|
jtulach@678
|
20348 |
case 39:
|
jtulach@678
|
20349 |
this$static.publicIdentifier = valueOf_1(this$static.longStrBuf, 0, this$static.longStrBufLen);
|
jtulach@678
|
20350 |
state = 24;
|
jtulach@678
|
20351 |
continue stateloop;
|
jtulach@678
|
20352 |
case 62:
|
jtulach@678
|
20353 |
this$static.forceQuirks = true;
|
jtulach@678
|
20354 |
this$static.publicIdentifier = valueOf_1(this$static.longStrBuf, 0, this$static.longStrBufLen);
|
jtulach@678
|
20355 |
this$static.cstart = pos + 1;
|
jtulach@678
|
20356 |
$doctype(this$static.tokenHandler, this$static.doctypeName, this$static.publicIdentifier, this$static.systemIdentifier, this$static.forceQuirks);
|
jtulach@678
|
20357 |
state = 0;
|
jtulach@678
|
20358 |
continue stateloop;
|
jtulach@678
|
20359 |
case 13:
|
jtulach@678
|
20360 |
this$static.nextCharOnNewLine = true;
|
jtulach@678
|
20361 |
this$static.lastCR = true;
|
jtulach@678
|
20362 |
$appendLongStrBuf(this$static, 10);
|
jtulach@678
|
20363 |
break stateloop;
|
jtulach@678
|
20364 |
case 10:
|
jtulach@678
|
20365 |
this$static.nextCharOnNewLine = true;
|
jtulach@678
|
20366 |
$appendLongStrBuf(this$static, 10);
|
jtulach@678
|
20367 |
continue;
|
jtulach@678
|
20368 |
case 0:
|
jtulach@678
|
20369 |
c = 65533;
|
jtulach@678
|
20370 |
default:$appendLongStrBuf(this$static, c);
|
jtulach@678
|
20371 |
continue;
|
jtulach@678
|
20372 |
}
|
jtulach@678
|
20373 |
}
|
jtulach@678
|
20374 |
|
jtulach@678
|
20375 |
case 49:
|
jtulach@678
|
20376 |
for (;;) {
|
jtulach@678
|
20377 |
if (++pos == endPos) {
|
jtulach@678
|
20378 |
break stateloop;
|
jtulach@678
|
20379 |
}
|
jtulach@678
|
20380 |
c = $checkChar(this$static, buf, pos);
|
jtulach@678
|
20381 |
if (this$static.index < 6) {
|
jtulach@678
|
20382 |
if (c == CDATA_LSQB[this$static.index]) {
|
jtulach@678
|
20383 |
$appendLongStrBuf(this$static, c);
|
jtulach@678
|
20384 |
}
|
jtulach@678
|
20385 |
else {
|
jtulach@678
|
20386 |
state = 15;
|
jtulach@678
|
20387 |
reconsume = true;
|
jtulach@678
|
20388 |
continue stateloop;
|
jtulach@678
|
20389 |
}
|
jtulach@678
|
20390 |
++this$static.index;
|
jtulach@678
|
20391 |
continue;
|
jtulach@678
|
20392 |
}
|
jtulach@678
|
20393 |
else {
|
jtulach@678
|
20394 |
this$static.cstart = pos;
|
jtulach@678
|
20395 |
state = 50;
|
jtulach@678
|
20396 |
reconsume = true;
|
jtulach@678
|
20397 |
break;
|
jtulach@678
|
20398 |
}
|
jtulach@678
|
20399 |
}
|
jtulach@678
|
20400 |
|
jtulach@678
|
20401 |
case 50:
|
jtulach@678
|
20402 |
cdatasectionloop: for (;;) {
|
jtulach@678
|
20403 |
if (reconsume) {
|
jtulach@678
|
20404 |
reconsume = false;
|
jtulach@678
|
20405 |
}
|
jtulach@678
|
20406 |
else {
|
jtulach@678
|
20407 |
if (++pos == endPos) {
|
jtulach@678
|
20408 |
break stateloop;
|
jtulach@678
|
20409 |
}
|
jtulach@678
|
20410 |
c = $checkChar(this$static, buf, pos);
|
jtulach@678
|
20411 |
}
|
jtulach@678
|
20412 |
switch (c) {
|
jtulach@678
|
20413 |
case 93:
|
jtulach@678
|
20414 |
$flushChars(this$static, buf, pos);
|
jtulach@678
|
20415 |
state = 51;
|
jtulach@678
|
20416 |
break cdatasectionloop;
|
jtulach@678
|
20417 |
case 0:
|
jtulach@678
|
20418 |
$emitReplacementCharacter(this$static, buf, pos);
|
jtulach@678
|
20419 |
continue;
|
jtulach@678
|
20420 |
case 13:
|
jtulach@678
|
20421 |
$emitCarriageReturn(this$static, buf, pos);
|
jtulach@678
|
20422 |
break stateloop;
|
jtulach@678
|
20423 |
case 10:
|
jtulach@678
|
20424 |
this$static.nextCharOnNewLine = true;
|
jtulach@678
|
20425 |
default:continue;
|
jtulach@678
|
20426 |
}
|
jtulach@678
|
20427 |
}
|
jtulach@678
|
20428 |
|
jtulach@678
|
20429 |
case 51:
|
jtulach@678
|
20430 |
cdatarsqb: for (;;) {
|
jtulach@678
|
20431 |
if (++pos == endPos) {
|
jtulach@678
|
20432 |
break stateloop;
|
jtulach@678
|
20433 |
}
|
jtulach@678
|
20434 |
c = $checkChar(this$static, buf, pos);
|
jtulach@678
|
20435 |
switch (c) {
|
jtulach@678
|
20436 |
case 93:
|
jtulach@678
|
20437 |
state = 52;
|
jtulach@678
|
20438 |
break cdatarsqb;
|
jtulach@678
|
20439 |
default:$characters(this$static.tokenHandler, RSQB_RSQB, 0, 1);
|
jtulach@678
|
20440 |
this$static.cstart = pos;
|
jtulach@678
|
20441 |
state = 50;
|
jtulach@678
|
20442 |
reconsume = true;
|
jtulach@678
|
20443 |
continue stateloop;
|
jtulach@678
|
20444 |
}
|
jtulach@678
|
20445 |
}
|
jtulach@678
|
20446 |
|
jtulach@678
|
20447 |
case 52:
|
jtulach@678
|
20448 |
if (++pos == endPos) {
|
jtulach@678
|
20449 |
break stateloop;
|
jtulach@678
|
20450 |
}
|
jtulach@678
|
20451 |
|
jtulach@678
|
20452 |
c = $checkChar(this$static, buf, pos);
|
jtulach@678
|
20453 |
switch (c) {
|
jtulach@678
|
20454 |
case 62:
|
jtulach@678
|
20455 |
this$static.cstart = pos + 1;
|
jtulach@678
|
20456 |
state = 0;
|
jtulach@678
|
20457 |
continue stateloop;
|
jtulach@678
|
20458 |
default:$characters(this$static.tokenHandler, RSQB_RSQB, 0, 2);
|
jtulach@678
|
20459 |
this$static.cstart = pos;
|
jtulach@678
|
20460 |
state = 50;
|
jtulach@678
|
20461 |
reconsume = true;
|
jtulach@678
|
20462 |
continue stateloop;
|
jtulach@678
|
20463 |
}
|
jtulach@678
|
20464 |
|
jtulach@678
|
20465 |
case 12:
|
jtulach@678
|
20466 |
attributevaluesinglequotedloop: for (;;) {
|
jtulach@678
|
20467 |
if (reconsume) {
|
jtulach@678
|
20468 |
reconsume = false;
|
jtulach@678
|
20469 |
}
|
jtulach@678
|
20470 |
else {
|
jtulach@678
|
20471 |
if (++pos == endPos) {
|
jtulach@678
|
20472 |
break stateloop;
|
jtulach@678
|
20473 |
}
|
jtulach@678
|
20474 |
c = $checkChar(this$static, buf, pos);
|
jtulach@678
|
20475 |
}
|
jtulach@678
|
20476 |
switch (c) {
|
jtulach@678
|
20477 |
case 39:
|
jtulach@678
|
20478 |
$addAttributeWithValue(this$static);
|
jtulach@678
|
20479 |
state = 14;
|
jtulach@678
|
20480 |
continue stateloop;
|
jtulach@678
|
20481 |
case 38:
|
jtulach@678
|
20482 |
this$static.strBuf[0] = c;
|
jtulach@678
|
20483 |
this$static.strBufLen = 1;
|
jtulach@678
|
20484 |
this$static.additional = 39;
|
jtulach@678
|
20485 |
$LocatorImpl(new LocatorImpl(), this$static);
|
jtulach@678
|
20486 |
returnState = state;
|
jtulach@678
|
20487 |
state = 42;
|
jtulach@678
|
20488 |
break attributevaluesinglequotedloop;
|
jtulach@678
|
20489 |
case 13:
|
jtulach@678
|
20490 |
this$static.nextCharOnNewLine = true;
|
jtulach@678
|
20491 |
this$static.lastCR = true;
|
jtulach@678
|
20492 |
$appendLongStrBuf(this$static, 10);
|
jtulach@678
|
20493 |
break stateloop;
|
jtulach@678
|
20494 |
case 10:
|
jtulach@678
|
20495 |
this$static.nextCharOnNewLine = true;
|
jtulach@678
|
20496 |
$appendLongStrBuf(this$static, 10);
|
jtulach@678
|
20497 |
continue;
|
jtulach@678
|
20498 |
case 0:
|
jtulach@678
|
20499 |
c = 65533;
|
jtulach@678
|
20500 |
default:$appendLongStrBuf(this$static, c);
|
jtulach@678
|
20501 |
continue;
|
jtulach@678
|
20502 |
}
|
jtulach@678
|
20503 |
}
|
jtulach@678
|
20504 |
|
jtulach@678
|
20505 |
case 42:
|
jtulach@678
|
20506 |
if (++pos == endPos) {
|
jtulach@678
|
20507 |
break stateloop;
|
jtulach@678
|
20508 |
}
|
jtulach@678
|
20509 |
|
jtulach@678
|
20510 |
c = $checkChar(this$static, buf, pos);
|
jtulach@678
|
20511 |
if (c == 0) {
|
jtulach@678
|
20512 |
break stateloop;
|
jtulach@678
|
20513 |
}
|
jtulach@678
|
20514 |
|
jtulach@678
|
20515 |
switch (c) {
|
jtulach@678
|
20516 |
case 32:
|
jtulach@678
|
20517 |
case 9:
|
jtulach@678
|
20518 |
case 10:
|
jtulach@678
|
20519 |
case 13:
|
jtulach@678
|
20520 |
case 12:
|
jtulach@678
|
20521 |
case 60:
|
jtulach@678
|
20522 |
case 38:
|
jtulach@678
|
20523 |
$emitOrAppendStrBuf(this$static, returnState);
|
jtulach@678
|
20524 |
if ((returnState & -2) == 0) {
|
jtulach@678
|
20525 |
this$static.cstart = pos;
|
jtulach@678
|
20526 |
}
|
jtulach@678
|
20527 |
|
jtulach@678
|
20528 |
state = returnState;
|
jtulach@678
|
20529 |
reconsume = true;
|
jtulach@678
|
20530 |
continue stateloop;
|
jtulach@678
|
20531 |
case 35:
|
jtulach@678
|
20532 |
$appendStrBuf(this$static, 35);
|
jtulach@678
|
20533 |
state = 43;
|
jtulach@678
|
20534 |
continue stateloop;
|
jtulach@678
|
20535 |
default:if (c == this$static.additional) {
|
jtulach@678
|
20536 |
$emitOrAppendStrBuf(this$static, returnState);
|
jtulach@678
|
20537 |
state = returnState;
|
jtulach@678
|
20538 |
reconsume = true;
|
jtulach@678
|
20539 |
continue stateloop;
|
jtulach@678
|
20540 |
}
|
jtulach@678
|
20541 |
|
jtulach@678
|
20542 |
this$static.entCol = -1;
|
jtulach@678
|
20543 |
this$static.lo = 0;
|
jtulach@678
|
20544 |
this$static.hi = ($clinit_94() , NAMES).length - 1;
|
jtulach@678
|
20545 |
this$static.candidate = -1;
|
jtulach@678
|
20546 |
this$static.strBufMark = 0;
|
jtulach@678
|
20547 |
state = 44;
|
jtulach@678
|
20548 |
reconsume = true;
|
jtulach@678
|
20549 |
}
|
jtulach@678
|
20550 |
|
jtulach@678
|
20551 |
case 44:
|
jtulach@678
|
20552 |
outer: for (;;) {
|
jtulach@678
|
20553 |
if (reconsume) {
|
jtulach@678
|
20554 |
reconsume = false;
|
jtulach@678
|
20555 |
}
|
jtulach@678
|
20556 |
else {
|
jtulach@678
|
20557 |
if (++pos == endPos) {
|
jtulach@678
|
20558 |
break stateloop;
|
jtulach@678
|
20559 |
}
|
jtulach@678
|
20560 |
c = $checkChar(this$static, buf, pos);
|
jtulach@678
|
20561 |
}
|
jtulach@678
|
20562 |
if (c == 0) {
|
jtulach@678
|
20563 |
break stateloop;
|
jtulach@678
|
20564 |
}
|
jtulach@678
|
20565 |
++this$static.entCol;
|
jtulach@678
|
20566 |
hiloop: for (;;) {
|
jtulach@678
|
20567 |
if (this$static.hi == -1) {
|
jtulach@678
|
20568 |
break hiloop;
|
jtulach@678
|
20569 |
}
|
jtulach@678
|
20570 |
if (this$static.entCol == ($clinit_94() , NAMES)[this$static.hi].length) {
|
jtulach@678
|
20571 |
break hiloop;
|
jtulach@678
|
20572 |
}
|
jtulach@678
|
20573 |
if (this$static.entCol > NAMES[this$static.hi].length) {
|
jtulach@678
|
20574 |
break outer;
|
jtulach@678
|
20575 |
}
|
jtulach@678
|
20576 |
else if (c < NAMES[this$static.hi][this$static.entCol]) {
|
jtulach@678
|
20577 |
--this$static.hi;
|
jtulach@678
|
20578 |
}
|
jtulach@678
|
20579 |
else {
|
jtulach@678
|
20580 |
break hiloop;
|
jtulach@678
|
20581 |
}
|
jtulach@678
|
20582 |
}
|
jtulach@678
|
20583 |
loloop: for (;;) {
|
jtulach@678
|
20584 |
if (this$static.hi < this$static.lo) {
|
jtulach@678
|
20585 |
break outer;
|
jtulach@678
|
20586 |
}
|
jtulach@678
|
20587 |
if (this$static.entCol == ($clinit_94() , NAMES)[this$static.lo].length) {
|
jtulach@678
|
20588 |
this$static.candidate = this$static.lo;
|
jtulach@678
|
20589 |
this$static.strBufMark = this$static.strBufLen;
|
jtulach@678
|
20590 |
++this$static.lo;
|
jtulach@678
|
20591 |
}
|
jtulach@678
|
20592 |
else if (this$static.entCol > NAMES[this$static.lo].length) {
|
jtulach@678
|
20593 |
break outer;
|
jtulach@678
|
20594 |
}
|
jtulach@678
|
20595 |
else if (c > NAMES[this$static.lo][this$static.entCol]) {
|
jtulach@678
|
20596 |
++this$static.lo;
|
jtulach@678
|
20597 |
}
|
jtulach@678
|
20598 |
else {
|
jtulach@678
|
20599 |
break loloop;
|
jtulach@678
|
20600 |
}
|
jtulach@678
|
20601 |
}
|
jtulach@678
|
20602 |
if (this$static.hi < this$static.lo) {
|
jtulach@678
|
20603 |
break outer;
|
jtulach@678
|
20604 |
}
|
jtulach@678
|
20605 |
$appendStrBuf(this$static, c);
|
jtulach@678
|
20606 |
continue;
|
jtulach@678
|
20607 |
}
|
jtulach@678
|
20608 |
|
jtulach@678
|
20609 |
if (this$static.candidate == -1) {
|
jtulach@678
|
20610 |
$emitOrAppendStrBuf(this$static, returnState);
|
jtulach@678
|
20611 |
if ((returnState & -2) == 0) {
|
jtulach@678
|
20612 |
this$static.cstart = pos;
|
jtulach@678
|
20613 |
}
|
jtulach@678
|
20614 |
state = returnState;
|
jtulach@678
|
20615 |
reconsume = true;
|
jtulach@678
|
20616 |
continue stateloop;
|
jtulach@678
|
20617 |
}
|
jtulach@678
|
20618 |
else {
|
jtulach@678
|
20619 |
candidateArr = ($clinit_94() , NAMES)[this$static.candidate];
|
jtulach@678
|
20620 |
if (candidateArr[candidateArr.length - 1] != 59) {
|
jtulach@678
|
20621 |
if ((returnState & -2) != 0) {
|
jtulach@678
|
20622 |
if (this$static.strBufMark == this$static.strBufLen) {
|
jtulach@678
|
20623 |
ch = c;
|
jtulach@678
|
20624 |
}
|
jtulach@678
|
20625 |
else {
|
jtulach@678
|
20626 |
ch = this$static.strBuf[this$static.strBufMark];
|
jtulach@678
|
20627 |
}
|
jtulach@678
|
20628 |
if (ch >= 48 && ch <= 57 || ch >= 65 && ch <= 90 || ch >= 97 && ch <= 122) {
|
jtulach@678
|
20629 |
$appendLongStrBuf_0(this$static, this$static.strBuf, 0, this$static.strBufLen);
|
jtulach@678
|
20630 |
state = returnState;
|
jtulach@678
|
20631 |
reconsume = true;
|
jtulach@678
|
20632 |
continue stateloop;
|
jtulach@678
|
20633 |
}
|
jtulach@678
|
20634 |
}
|
jtulach@678
|
20635 |
}
|
jtulach@678
|
20636 |
val = VALUES_0[this$static.candidate];
|
jtulach@678
|
20637 |
$emitOrAppend(this$static, val, returnState);
|
jtulach@678
|
20638 |
if (this$static.strBufMark < this$static.strBufLen) {
|
jtulach@678
|
20639 |
if ((returnState & -2) != 0) {
|
jtulach@678
|
20640 |
for (i = this$static.strBufMark; i < this$static.strBufLen; ++i) {
|
jtulach@678
|
20641 |
$appendLongStrBuf(this$static, this$static.strBuf[i]);
|
jtulach@678
|
20642 |
}
|
jtulach@678
|
20643 |
}
|
jtulach@678
|
20644 |
else {
|
jtulach@678
|
20645 |
$characters(this$static.tokenHandler, this$static.strBuf, this$static.strBufMark, this$static.strBufLen - this$static.strBufMark);
|
jtulach@678
|
20646 |
}
|
jtulach@678
|
20647 |
}
|
jtulach@678
|
20648 |
if ((returnState & -2) == 0) {
|
jtulach@678
|
20649 |
this$static.cstart = pos;
|
jtulach@678
|
20650 |
}
|
jtulach@678
|
20651 |
state = returnState;
|
jtulach@678
|
20652 |
reconsume = true;
|
jtulach@678
|
20653 |
continue stateloop;
|
jtulach@678
|
20654 |
}
|
jtulach@678
|
20655 |
|
jtulach@678
|
20656 |
case 43:
|
jtulach@678
|
20657 |
if (++pos == endPos) {
|
jtulach@678
|
20658 |
break stateloop;
|
jtulach@678
|
20659 |
}
|
jtulach@678
|
20660 |
|
jtulach@678
|
20661 |
c = $checkChar(this$static, buf, pos);
|
jtulach@678
|
20662 |
this$static.prevValue = -1;
|
jtulach@678
|
20663 |
this$static.value = 0;
|
jtulach@678
|
20664 |
this$static.seenDigits = false;
|
jtulach@678
|
20665 |
switch (c) {
|
jtulach@678
|
20666 |
case 120:
|
jtulach@678
|
20667 |
case 88:
|
jtulach@678
|
20668 |
$appendStrBuf(this$static, c);
|
jtulach@678
|
20669 |
state = 45;
|
jtulach@678
|
20670 |
continue stateloop;
|
jtulach@678
|
20671 |
default:state = 46;
|
jtulach@678
|
20672 |
reconsume = true;
|
jtulach@678
|
20673 |
}
|
jtulach@678
|
20674 |
|
jtulach@678
|
20675 |
case 46:
|
jtulach@678
|
20676 |
decimalloop: for (;;) {
|
jtulach@678
|
20677 |
if (reconsume) {
|
jtulach@678
|
20678 |
reconsume = false;
|
jtulach@678
|
20679 |
}
|
jtulach@678
|
20680 |
else {
|
jtulach@678
|
20681 |
if (++pos == endPos) {
|
jtulach@678
|
20682 |
break stateloop;
|
jtulach@678
|
20683 |
}
|
jtulach@678
|
20684 |
c = $checkChar(this$static, buf, pos);
|
jtulach@678
|
20685 |
}
|
jtulach@678
|
20686 |
if (this$static.value < this$static.prevValue) {
|
jtulach@678
|
20687 |
this$static.value = 1114112;
|
jtulach@678
|
20688 |
}
|
jtulach@678
|
20689 |
this$static.prevValue = this$static.value;
|
jtulach@678
|
20690 |
if (c >= 48 && c <= 57) {
|
jtulach@678
|
20691 |
this$static.seenDigits = true;
|
jtulach@678
|
20692 |
this$static.value *= 10;
|
jtulach@678
|
20693 |
this$static.value += c - 48;
|
jtulach@678
|
20694 |
continue;
|
jtulach@678
|
20695 |
}
|
jtulach@678
|
20696 |
else if (c == 59) {
|
jtulach@678
|
20697 |
if (this$static.seenDigits) {
|
jtulach@678
|
20698 |
if ((returnState & -2) == 0) {
|
jtulach@678
|
20699 |
this$static.cstart = pos + 1;
|
jtulach@678
|
20700 |
}
|
jtulach@678
|
20701 |
state = 47;
|
jtulach@678
|
20702 |
break decimalloop;
|
jtulach@678
|
20703 |
}
|
jtulach@678
|
20704 |
else {
|
jtulach@678
|
20705 |
'No digits after \u201C' + valueOf_1(this$static.strBuf, 0, this$static.strBufLen) + '\u201D.';
|
jtulach@678
|
20706 |
$appendStrBuf(this$static, 59);
|
jtulach@678
|
20707 |
$emitOrAppendStrBuf(this$static, returnState);
|
jtulach@678
|
20708 |
if ((returnState & -2) == 0) {
|
jtulach@678
|
20709 |
this$static.cstart = pos + 1;
|
jtulach@678
|
20710 |
}
|
jtulach@678
|
20711 |
state = returnState;
|
jtulach@678
|
20712 |
continue stateloop;
|
jtulach@678
|
20713 |
}
|
jtulach@678
|
20714 |
}
|
jtulach@678
|
20715 |
else {
|
jtulach@678
|
20716 |
if (this$static.seenDigits) {
|
jtulach@678
|
20717 |
if ((returnState & -2) == 0) {
|
jtulach@678
|
20718 |
this$static.cstart = pos;
|
jtulach@678
|
20719 |
}
|
jtulach@678
|
20720 |
state = 47;
|
jtulach@678
|
20721 |
reconsume = true;
|
jtulach@678
|
20722 |
break decimalloop;
|
jtulach@678
|
20723 |
}
|
jtulach@678
|
20724 |
else {
|
jtulach@678
|
20725 |
'No digits after \u201C' + valueOf_1(this$static.strBuf, 0, this$static.strBufLen) + '\u201D.';
|
jtulach@678
|
20726 |
$emitOrAppendStrBuf(this$static, returnState);
|
jtulach@678
|
20727 |
if ((returnState & -2) == 0) {
|
jtulach@678
|
20728 |
this$static.cstart = pos;
|
jtulach@678
|
20729 |
}
|
jtulach@678
|
20730 |
state = returnState;
|
jtulach@678
|
20731 |
reconsume = true;
|
jtulach@678
|
20732 |
continue stateloop;
|
jtulach@678
|
20733 |
}
|
jtulach@678
|
20734 |
}
|
jtulach@678
|
20735 |
}
|
jtulach@678
|
20736 |
|
jtulach@678
|
20737 |
case 47:
|
jtulach@678
|
20738 |
$handleNcrValue(this$static, returnState);
|
jtulach@678
|
20739 |
state = returnState;
|
jtulach@678
|
20740 |
continue stateloop;
|
jtulach@678
|
20741 |
case 45:
|
jtulach@678
|
20742 |
for (;;) {
|
jtulach@678
|
20743 |
if (++pos == endPos) {
|
jtulach@678
|
20744 |
break stateloop;
|
jtulach@678
|
20745 |
}
|
jtulach@678
|
20746 |
c = $checkChar(this$static, buf, pos);
|
jtulach@678
|
20747 |
if (this$static.value < this$static.prevValue) {
|
jtulach@678
|
20748 |
this$static.value = 1114112;
|
jtulach@678
|
20749 |
}
|
jtulach@678
|
20750 |
this$static.prevValue = this$static.value;
|
jtulach@678
|
20751 |
if (c >= 48 && c <= 57) {
|
jtulach@678
|
20752 |
this$static.seenDigits = true;
|
jtulach@678
|
20753 |
this$static.value *= 16;
|
jtulach@678
|
20754 |
this$static.value += c - 48;
|
jtulach@678
|
20755 |
continue;
|
jtulach@678
|
20756 |
}
|
jtulach@678
|
20757 |
else if (c >= 65 && c <= 70) {
|
jtulach@678
|
20758 |
this$static.seenDigits = true;
|
jtulach@678
|
20759 |
this$static.value *= 16;
|
jtulach@678
|
20760 |
this$static.value += c - 65 + 10;
|
jtulach@678
|
20761 |
continue;
|
jtulach@678
|
20762 |
}
|
jtulach@678
|
20763 |
else if (c >= 97 && c <= 102) {
|
jtulach@678
|
20764 |
this$static.seenDigits = true;
|
jtulach@678
|
20765 |
this$static.value *= 16;
|
jtulach@678
|
20766 |
this$static.value += c - 97 + 10;
|
jtulach@678
|
20767 |
continue;
|
jtulach@678
|
20768 |
}
|
jtulach@678
|
20769 |
else if (c == 59) {
|
jtulach@678
|
20770 |
if (this$static.seenDigits) {
|
jtulach@678
|
20771 |
if ((returnState & -2) == 0) {
|
jtulach@678
|
20772 |
this$static.cstart = pos + 1;
|
jtulach@678
|
20773 |
}
|
jtulach@678
|
20774 |
state = 47;
|
jtulach@678
|
20775 |
continue stateloop;
|
jtulach@678
|
20776 |
}
|
jtulach@678
|
20777 |
else {
|
jtulach@678
|
20778 |
'No digits after \u201C' + valueOf_1(this$static.strBuf, 0, this$static.strBufLen) + '\u201D.';
|
jtulach@678
|
20779 |
$appendStrBuf(this$static, 59);
|
jtulach@678
|
20780 |
$emitOrAppendStrBuf(this$static, returnState);
|
jtulach@678
|
20781 |
if ((returnState & -2) == 0) {
|
jtulach@678
|
20782 |
this$static.cstart = pos + 1;
|
jtulach@678
|
20783 |
}
|
jtulach@678
|
20784 |
state = returnState;
|
jtulach@678
|
20785 |
continue stateloop;
|
jtulach@678
|
20786 |
}
|
jtulach@678
|
20787 |
}
|
jtulach@678
|
20788 |
else {
|
jtulach@678
|
20789 |
if (this$static.seenDigits) {
|
jtulach@678
|
20790 |
if ((returnState & -2) == 0) {
|
jtulach@678
|
20791 |
this$static.cstart = pos;
|
jtulach@678
|
20792 |
}
|
jtulach@678
|
20793 |
state = 47;
|
jtulach@678
|
20794 |
reconsume = true;
|
jtulach@678
|
20795 |
continue stateloop;
|
jtulach@678
|
20796 |
}
|
jtulach@678
|
20797 |
else {
|
jtulach@678
|
20798 |
'No digits after \u201C' + valueOf_1(this$static.strBuf, 0, this$static.strBufLen) + '\u201D.';
|
jtulach@678
|
20799 |
$emitOrAppendStrBuf(this$static, returnState);
|
jtulach@678
|
20800 |
if ((returnState & -2) == 0) {
|
jtulach@678
|
20801 |
this$static.cstart = pos;
|
jtulach@678
|
20802 |
}
|
jtulach@678
|
20803 |
state = returnState;
|
jtulach@678
|
20804 |
reconsume = true;
|
jtulach@678
|
20805 |
continue stateloop;
|
jtulach@678
|
20806 |
}
|
jtulach@678
|
20807 |
}
|
jtulach@678
|
20808 |
}
|
jtulach@678
|
20809 |
|
jtulach@678
|
20810 |
case 3:
|
jtulach@678
|
20811 |
plaintextloop: for (;;) {
|
jtulach@678
|
20812 |
if (reconsume) {
|
jtulach@678
|
20813 |
reconsume = false;
|
jtulach@678
|
20814 |
}
|
jtulach@678
|
20815 |
else {
|
jtulach@678
|
20816 |
if (++pos == endPos) {
|
jtulach@678
|
20817 |
break stateloop;
|
jtulach@678
|
20818 |
}
|
jtulach@678
|
20819 |
c = $checkChar(this$static, buf, pos);
|
jtulach@678
|
20820 |
}
|
jtulach@678
|
20821 |
switch (c) {
|
jtulach@678
|
20822 |
case 0:
|
jtulach@678
|
20823 |
$emitReplacementCharacter(this$static, buf, pos);
|
jtulach@678
|
20824 |
continue;
|
jtulach@678
|
20825 |
case 13:
|
jtulach@678
|
20826 |
$emitCarriageReturn(this$static, buf, pos);
|
jtulach@678
|
20827 |
break stateloop;
|
jtulach@678
|
20828 |
case 10:
|
jtulach@678
|
20829 |
this$static.nextCharOnNewLine = true;
|
jtulach@678
|
20830 |
default:continue;
|
jtulach@678
|
20831 |
}
|
jtulach@678
|
20832 |
}
|
jtulach@678
|
20833 |
|
jtulach@678
|
20834 |
case 2:
|
jtulach@678
|
20835 |
cdataloop: for (;;) {
|
jtulach@678
|
20836 |
if (reconsume) {
|
jtulach@678
|
20837 |
reconsume = false;
|
jtulach@678
|
20838 |
}
|
jtulach@678
|
20839 |
else {
|
jtulach@678
|
20840 |
if (++pos == endPos) {
|
jtulach@678
|
20841 |
break stateloop;
|
jtulach@678
|
20842 |
}
|
jtulach@678
|
20843 |
c = $checkChar(this$static, buf, pos);
|
jtulach@678
|
20844 |
}
|
jtulach@678
|
20845 |
switch (c) {
|
jtulach@678
|
20846 |
case 60:
|
jtulach@678
|
20847 |
$flushChars(this$static, buf, pos);
|
jtulach@678
|
20848 |
returnState = state;
|
jtulach@678
|
20849 |
state = 53;
|
jtulach@678
|
20850 |
break cdataloop;
|
jtulach@678
|
20851 |
case 0:
|
jtulach@678
|
20852 |
$emitReplacementCharacter(this$static, buf, pos);
|
jtulach@678
|
20853 |
continue;
|
jtulach@678
|
20854 |
case 13:
|
jtulach@678
|
20855 |
$emitCarriageReturn(this$static, buf, pos);
|
jtulach@678
|
20856 |
break stateloop;
|
jtulach@678
|
20857 |
case 10:
|
jtulach@678
|
20858 |
this$static.nextCharOnNewLine = true;
|
jtulach@678
|
20859 |
default:continue;
|
jtulach@678
|
20860 |
}
|
jtulach@678
|
20861 |
}
|
jtulach@678
|
20862 |
|
jtulach@678
|
20863 |
case 53:
|
jtulach@678
|
20864 |
tagopennonpcdataloop: for (;;) {
|
jtulach@678
|
20865 |
if (++pos == endPos) {
|
jtulach@678
|
20866 |
break stateloop;
|
jtulach@678
|
20867 |
}
|
jtulach@678
|
20868 |
c = $checkChar(this$static, buf, pos);
|
jtulach@678
|
20869 |
switch (c) {
|
jtulach@678
|
20870 |
case 33:
|
jtulach@678
|
20871 |
$characters(this$static.tokenHandler, LT_GT, 0, 1);
|
jtulach@678
|
20872 |
this$static.cstart = pos;
|
jtulach@678
|
20873 |
state = 54;
|
jtulach@678
|
20874 |
break tagopennonpcdataloop;
|
jtulach@678
|
20875 |
case 47:
|
jtulach@678
|
20876 |
if (this$static.contentModelElement) {
|
jtulach@678
|
20877 |
this$static.index = 0;
|
jtulach@678
|
20878 |
this$static.strBufLen = 0;
|
jtulach@678
|
20879 |
state = 37;
|
jtulach@678
|
20880 |
continue stateloop;
|
jtulach@678
|
20881 |
}
|
jtulach@678
|
20882 |
|
jtulach@678
|
20883 |
default:$characters(this$static.tokenHandler, LT_GT, 0, 1);
|
jtulach@678
|
20884 |
this$static.cstart = pos;
|
jtulach@678
|
20885 |
state = returnState;
|
jtulach@678
|
20886 |
reconsume = true;
|
jtulach@678
|
20887 |
continue stateloop;
|
jtulach@678
|
20888 |
}
|
jtulach@678
|
20889 |
}
|
jtulach@678
|
20890 |
|
jtulach@678
|
20891 |
case 54:
|
jtulach@678
|
20892 |
escapeexclamationloop: for (;;) {
|
jtulach@678
|
20893 |
if (++pos == endPos) {
|
jtulach@678
|
20894 |
break stateloop;
|
jtulach@678
|
20895 |
}
|
jtulach@678
|
20896 |
c = $checkChar(this$static, buf, pos);
|
jtulach@678
|
20897 |
switch (c) {
|
jtulach@678
|
20898 |
case 45:
|
jtulach@678
|
20899 |
state = 55;
|
jtulach@678
|
20900 |
break escapeexclamationloop;
|
jtulach@678
|
20901 |
default:state = returnState;
|
jtulach@678
|
20902 |
reconsume = true;
|
jtulach@678
|
20903 |
continue stateloop;
|
jtulach@678
|
20904 |
}
|
jtulach@678
|
20905 |
}
|
jtulach@678
|
20906 |
|
jtulach@678
|
20907 |
case 55:
|
jtulach@678
|
20908 |
escapeexclamationhyphenloop: for (;;) {
|
jtulach@678
|
20909 |
if (++pos == endPos) {
|
jtulach@678
|
20910 |
break stateloop;
|
jtulach@678
|
20911 |
}
|
jtulach@678
|
20912 |
c = $checkChar(this$static, buf, pos);
|
jtulach@678
|
20913 |
switch (c) {
|
jtulach@678
|
20914 |
case 45:
|
jtulach@678
|
20915 |
state = 58;
|
jtulach@678
|
20916 |
break escapeexclamationhyphenloop;
|
jtulach@678
|
20917 |
default:state = returnState;
|
jtulach@678
|
20918 |
reconsume = true;
|
jtulach@678
|
20919 |
continue stateloop;
|
jtulach@678
|
20920 |
}
|
jtulach@678
|
20921 |
}
|
jtulach@678
|
20922 |
|
jtulach@678
|
20923 |
case 58:
|
jtulach@678
|
20924 |
escapehyphenhyphenloop: for (;;) {
|
jtulach@678
|
20925 |
if (++pos == endPos) {
|
jtulach@678
|
20926 |
break stateloop;
|
jtulach@678
|
20927 |
}
|
jtulach@678
|
20928 |
c = $checkChar(this$static, buf, pos);
|
jtulach@678
|
20929 |
switch (c) {
|
jtulach@678
|
20930 |
case 45:
|
jtulach@678
|
20931 |
continue;
|
jtulach@678
|
20932 |
case 62:
|
jtulach@678
|
20933 |
state = returnState;
|
jtulach@678
|
20934 |
continue stateloop;
|
jtulach@678
|
20935 |
case 0:
|
jtulach@678
|
20936 |
$emitReplacementCharacter(this$static, buf, pos);
|
jtulach@678
|
20937 |
state = 56;
|
jtulach@678
|
20938 |
break escapehyphenhyphenloop;
|
jtulach@678
|
20939 |
case 13:
|
jtulach@678
|
20940 |
$emitCarriageReturn(this$static, buf, pos);
|
jtulach@678
|
20941 |
state = 56;
|
jtulach@678
|
20942 |
break stateloop;
|
jtulach@678
|
20943 |
case 10:
|
jtulach@678
|
20944 |
this$static.nextCharOnNewLine = true;
|
jtulach@678
|
20945 |
default:state = 56;
|
jtulach@678
|
20946 |
break escapehyphenhyphenloop;
|
jtulach@678
|
20947 |
}
|
jtulach@678
|
20948 |
}
|
jtulach@678
|
20949 |
|
jtulach@678
|
20950 |
case 56:
|
jtulach@678
|
20951 |
escapeloop: for (;;) {
|
jtulach@678
|
20952 |
if (++pos == endPos) {
|
jtulach@678
|
20953 |
break stateloop;
|
jtulach@678
|
20954 |
}
|
jtulach@678
|
20955 |
c = $checkChar(this$static, buf, pos);
|
jtulach@678
|
20956 |
switch (c) {
|
jtulach@678
|
20957 |
case 45:
|
jtulach@678
|
20958 |
state = 57;
|
jtulach@678
|
20959 |
break escapeloop;
|
jtulach@678
|
20960 |
case 0:
|
jtulach@678
|
20961 |
$emitReplacementCharacter(this$static, buf, pos);
|
jtulach@678
|
20962 |
continue;
|
jtulach@678
|
20963 |
case 13:
|
jtulach@678
|
20964 |
$emitCarriageReturn(this$static, buf, pos);
|
jtulach@678
|
20965 |
break stateloop;
|
jtulach@678
|
20966 |
case 10:
|
jtulach@678
|
20967 |
this$static.nextCharOnNewLine = true;
|
jtulach@678
|
20968 |
default:continue;
|
jtulach@678
|
20969 |
}
|
jtulach@678
|
20970 |
}
|
jtulach@678
|
20971 |
|
jtulach@678
|
20972 |
case 57:
|
jtulach@678
|
20973 |
escapehyphenloop: for (;;) {
|
jtulach@678
|
20974 |
if (++pos == endPos) {
|
jtulach@678
|
20975 |
break stateloop;
|
jtulach@678
|
20976 |
}
|
jtulach@678
|
20977 |
c = $checkChar(this$static, buf, pos);
|
jtulach@678
|
20978 |
switch (c) {
|
jtulach@678
|
20979 |
case 45:
|
jtulach@678
|
20980 |
state = 58;
|
jtulach@678
|
20981 |
continue stateloop;
|
jtulach@678
|
20982 |
case 0:
|
jtulach@678
|
20983 |
$emitReplacementCharacter(this$static, buf, pos);
|
jtulach@678
|
20984 |
state = 56;
|
jtulach@678
|
20985 |
continue stateloop;
|
jtulach@678
|
20986 |
case 13:
|
jtulach@678
|
20987 |
$emitCarriageReturn(this$static, buf, pos);
|
jtulach@678
|
20988 |
state = 56;
|
jtulach@678
|
20989 |
continue stateloop;
|
jtulach@678
|
20990 |
case 10:
|
jtulach@678
|
20991 |
this$static.nextCharOnNewLine = true;
|
jtulach@678
|
20992 |
default:state = 56;
|
jtulach@678
|
20993 |
continue stateloop;
|
jtulach@678
|
20994 |
}
|
jtulach@678
|
20995 |
}
|
jtulach@678
|
20996 |
|
jtulach@678
|
20997 |
case 37:
|
jtulach@678
|
20998 |
for (;;) {
|
jtulach@678
|
20999 |
if (++pos == endPos) {
|
jtulach@678
|
21000 |
break stateloop;
|
jtulach@678
|
21001 |
}
|
jtulach@678
|
21002 |
c = $checkChar(this$static, buf, pos);
|
jtulach@678
|
21003 |
if (this$static.index < this$static.contentModelElementNameAsArray.length) {
|
jtulach@678
|
21004 |
e = this$static.contentModelElementNameAsArray[this$static.index];
|
jtulach@678
|
21005 |
folded = c;
|
jtulach@678
|
21006 |
if (c >= 65 && c <= 90) {
|
jtulach@678
|
21007 |
folded += 32;
|
jtulach@678
|
21008 |
}
|
jtulach@678
|
21009 |
if (folded != e) {
|
jtulach@678
|
21010 |
this$static.html4 && (this$static.index > 0 || folded >= 97 && folded <= 122) && ($clinit_89() , IFRAME) != this$static.contentModelElement;
|
jtulach@678
|
21011 |
$characters(this$static.tokenHandler, LT_SOLIDUS, 0, 2);
|
jtulach@678
|
21012 |
$emitStrBuf(this$static);
|
jtulach@678
|
21013 |
this$static.cstart = pos;
|
jtulach@678
|
21014 |
state = returnState;
|
jtulach@678
|
21015 |
reconsume = true;
|
jtulach@678
|
21016 |
continue stateloop;
|
jtulach@678
|
21017 |
}
|
jtulach@678
|
21018 |
$appendStrBuf(this$static, c);
|
jtulach@678
|
21019 |
++this$static.index;
|
jtulach@678
|
21020 |
continue;
|
jtulach@678
|
21021 |
}
|
jtulach@678
|
21022 |
else {
|
jtulach@678
|
21023 |
this$static.endTag = true;
|
jtulach@678
|
21024 |
this$static.tagName = this$static.contentModelElement;
|
jtulach@678
|
21025 |
switch (c) {
|
jtulach@678
|
21026 |
case 13:
|
jtulach@678
|
21027 |
this$static.nextCharOnNewLine = true;
|
jtulach@678
|
21028 |
this$static.lastCR = true;
|
jtulach@678
|
21029 |
state = 7;
|
jtulach@678
|
21030 |
break stateloop;
|
jtulach@678
|
21031 |
case 10:
|
jtulach@678
|
21032 |
this$static.nextCharOnNewLine = true;
|
jtulach@678
|
21033 |
case 32:
|
jtulach@678
|
21034 |
case 9:
|
jtulach@678
|
21035 |
case 12:
|
jtulach@678
|
21036 |
state = 7;
|
jtulach@678
|
21037 |
continue stateloop;
|
jtulach@678
|
21038 |
case 62:
|
jtulach@678
|
21039 |
state = $emitCurrentTagToken(this$static, false, pos);
|
jtulach@678
|
21040 |
if (this$static.shouldSuspend) {
|
jtulach@678
|
21041 |
break stateloop;
|
jtulach@678
|
21042 |
}
|
jtulach@678
|
21043 |
|
jtulach@678
|
21044 |
continue stateloop;
|
jtulach@678
|
21045 |
case 47:
|
jtulach@678
|
21046 |
state = 48;
|
jtulach@678
|
21047 |
continue stateloop;
|
jtulach@678
|
21048 |
default:$characters(this$static.tokenHandler, LT_SOLIDUS, 0, 2);
|
jtulach@678
|
21049 |
$emitStrBuf(this$static);
|
jtulach@678
|
21050 |
if (c == 0) {
|
jtulach@678
|
21051 |
$emitReplacementCharacter(this$static, buf, pos);
|
jtulach@678
|
21052 |
}
|
jtulach@678
|
21053 |
else {
|
jtulach@678
|
21054 |
this$static.cstart = pos;
|
jtulach@678
|
21055 |
}
|
jtulach@678
|
21056 |
|
jtulach@678
|
21057 |
state = returnState;
|
jtulach@678
|
21058 |
continue stateloop;
|
jtulach@678
|
21059 |
}
|
jtulach@678
|
21060 |
}
|
jtulach@678
|
21061 |
}
|
jtulach@678
|
21062 |
|
jtulach@678
|
21063 |
case 5:
|
jtulach@678
|
21064 |
if (++pos == endPos) {
|
jtulach@678
|
21065 |
break stateloop;
|
jtulach@678
|
21066 |
}
|
jtulach@678
|
21067 |
|
jtulach@678
|
21068 |
c = $checkChar(this$static, buf, pos);
|
jtulach@678
|
21069 |
switch (c) {
|
jtulach@678
|
21070 |
case 62:
|
jtulach@678
|
21071 |
this$static.cstart = pos + 1;
|
jtulach@678
|
21072 |
state = 0;
|
jtulach@678
|
21073 |
continue stateloop;
|
jtulach@678
|
21074 |
case 13:
|
jtulach@678
|
21075 |
this$static.nextCharOnNewLine = true;
|
jtulach@678
|
21076 |
this$static.lastCR = true;
|
jtulach@678
|
21077 |
this$static.longStrBuf[0] = 10;
|
jtulach@678
|
21078 |
this$static.longStrBufLen = 1;
|
jtulach@678
|
21079 |
state = 15;
|
jtulach@678
|
21080 |
break stateloop;
|
jtulach@678
|
21081 |
case 10:
|
jtulach@678
|
21082 |
this$static.nextCharOnNewLine = true;
|
jtulach@678
|
21083 |
this$static.longStrBuf[0] = 10;
|
jtulach@678
|
21084 |
this$static.longStrBufLen = 1;
|
jtulach@678
|
21085 |
state = 15;
|
jtulach@678
|
21086 |
continue stateloop;
|
jtulach@678
|
21087 |
case 0:
|
jtulach@678
|
21088 |
c = 65533;
|
jtulach@678
|
21089 |
default:if (c >= 65 && c <= 90) {
|
jtulach@678
|
21090 |
c += 32;
|
jtulach@678
|
21091 |
}
|
jtulach@678
|
21092 |
|
jtulach@678
|
21093 |
if (c >= 97 && c <= 122) {
|
jtulach@678
|
21094 |
this$static.endTag = true;
|
jtulach@678
|
21095 |
this$static.strBuf[0] = c;
|
jtulach@678
|
21096 |
this$static.strBufLen = 1;
|
jtulach@678
|
21097 |
state = 6;
|
jtulach@678
|
21098 |
continue stateloop;
|
jtulach@678
|
21099 |
}
|
jtulach@678
|
21100 |
else {
|
jtulach@678
|
21101 |
this$static.longStrBuf[0] = c;
|
jtulach@678
|
21102 |
this$static.longStrBufLen = 1;
|
jtulach@678
|
21103 |
state = 15;
|
jtulach@678
|
21104 |
continue stateloop;
|
jtulach@678
|
21105 |
}
|
jtulach@678
|
21106 |
|
jtulach@678
|
21107 |
}
|
jtulach@678
|
21108 |
|
jtulach@678
|
21109 |
case 1:
|
jtulach@678
|
21110 |
rcdataloop: for (;;) {
|
jtulach@678
|
21111 |
if (reconsume) {
|
jtulach@678
|
21112 |
reconsume = false;
|
jtulach@678
|
21113 |
}
|
jtulach@678
|
21114 |
else {
|
jtulach@678
|
21115 |
if (++pos == endPos) {
|
jtulach@678
|
21116 |
break stateloop;
|
jtulach@678
|
21117 |
}
|
jtulach@678
|
21118 |
c = $checkChar(this$static, buf, pos);
|
jtulach@678
|
21119 |
}
|
jtulach@678
|
21120 |
switch (c) {
|
jtulach@678
|
21121 |
case 38:
|
jtulach@678
|
21122 |
$flushChars(this$static, buf, pos);
|
jtulach@678
|
21123 |
this$static.strBuf[0] = c;
|
jtulach@678
|
21124 |
this$static.strBufLen = 1;
|
jtulach@678
|
21125 |
this$static.additional = 0;
|
jtulach@678
|
21126 |
returnState = state;
|
jtulach@678
|
21127 |
state = 42;
|
jtulach@678
|
21128 |
continue stateloop;
|
jtulach@678
|
21129 |
case 60:
|
jtulach@678
|
21130 |
$flushChars(this$static, buf, pos);
|
jtulach@678
|
21131 |
returnState = state;
|
jtulach@678
|
21132 |
state = 53;
|
jtulach@678
|
21133 |
continue stateloop;
|
jtulach@678
|
21134 |
case 0:
|
jtulach@678
|
21135 |
$emitReplacementCharacter(this$static, buf, pos);
|
jtulach@678
|
21136 |
continue;
|
jtulach@678
|
21137 |
case 13:
|
jtulach@678
|
21138 |
$emitCarriageReturn(this$static, buf, pos);
|
jtulach@678
|
21139 |
break stateloop;
|
jtulach@678
|
21140 |
case 10:
|
jtulach@678
|
21141 |
this$static.nextCharOnNewLine = true;
|
jtulach@678
|
21142 |
default:continue;
|
jtulach@678
|
21143 |
}
|
jtulach@678
|
21144 |
}
|
jtulach@678
|
21145 |
|
jtulach@678
|
21146 |
}
|
jtulach@678
|
21147 |
}
|
jtulach@678
|
21148 |
$flushChars(this$static, buf, pos);
|
jtulach@678
|
21149 |
this$static.stateSave = state;
|
jtulach@678
|
21150 |
this$static.returnStateSave = returnState;
|
jtulach@678
|
21151 |
return pos;
|
jtulach@678
|
21152 |
}
|
jtulach@678
|
21153 |
|
jtulach@678
|
21154 |
function $tokenizeBuffer(this$static, buffer){
|
jtulach@678
|
21155 |
var pos, returnState, start, state;
|
jtulach@678
|
21156 |
state = this$static.stateSave;
|
jtulach@678
|
21157 |
returnState = this$static.returnStateSave;
|
jtulach@678
|
21158 |
this$static.shouldSuspend = false;
|
jtulach@678
|
21159 |
this$static.lastCR = false;
|
jtulach@678
|
21160 |
start = buffer.start;
|
jtulach@678
|
21161 |
pos = start - 1;
|
jtulach@678
|
21162 |
switch (state) {
|
jtulach@678
|
21163 |
case 0:
|
jtulach@678
|
21164 |
case 1:
|
jtulach@678
|
21165 |
case 2:
|
jtulach@678
|
21166 |
case 3:
|
jtulach@678
|
21167 |
case 50:
|
jtulach@678
|
21168 |
case 56:
|
jtulach@678
|
21169 |
case 54:
|
jtulach@678
|
21170 |
case 55:
|
jtulach@678
|
21171 |
case 57:
|
jtulach@678
|
21172 |
case 58:
|
jtulach@678
|
21173 |
this$static.cstart = start;
|
jtulach@678
|
21174 |
break;
|
jtulach@678
|
21175 |
default:this$static.cstart = 2147483647;
|
jtulach@678
|
21176 |
}
|
jtulach@678
|
21177 |
pos = $stateLoop(this$static, state, 0, pos, buffer.buffer, false, returnState, buffer.end);
|
jtulach@678
|
21178 |
if (pos == buffer.end) {
|
jtulach@678
|
21179 |
buffer.start = pos;
|
jtulach@678
|
21180 |
}
|
jtulach@678
|
21181 |
else {
|
jtulach@678
|
21182 |
buffer.start = pos + 1;
|
jtulach@678
|
21183 |
}
|
jtulach@678
|
21184 |
return this$static.lastCR;
|
jtulach@678
|
21185 |
}
|
jtulach@678
|
21186 |
|
jtulach@678
|
21187 |
function getClass_56(){
|
jtulach@678
|
21188 |
return Lnu_validator_htmlparser_impl_Tokenizer_2_classLit;
|
jtulach@678
|
21189 |
}
|
jtulach@678
|
21190 |
|
jtulach@678
|
21191 |
function newAsciiLowerCaseStringFromString(str){
|
jtulach@678
|
21192 |
var buf, c, i;
|
jtulach@678
|
21193 |
if (str == null) {
|
jtulach@678
|
21194 |
return null;
|
jtulach@678
|
21195 |
}
|
jtulach@678
|
21196 |
buf = initDim(_3C_classLit, 42, -1, str.length, 1);
|
jtulach@678
|
21197 |
for (i = 0; i < str.length; ++i) {
|
jtulach@678
|
21198 |
c = str.charCodeAt(i);
|
jtulach@678
|
21199 |
if (c >= 65 && c <= 90) {
|
jtulach@678
|
21200 |
c += 32;
|
jtulach@678
|
21201 |
}
|
jtulach@678
|
21202 |
buf[i] = c;
|
jtulach@678
|
21203 |
}
|
jtulach@678
|
21204 |
return String.fromCharCode.apply(null, buf);
|
jtulach@678
|
21205 |
}
|
jtulach@678
|
21206 |
|
jtulach@678
|
21207 |
function Tokenizer(){
|
jtulach@678
|
21208 |
}
|
jtulach@678
|
21209 |
|
jtulach@678
|
21210 |
_ = Tokenizer.prototype = new Object_0();
|
jtulach@678
|
21211 |
_.getClass$ = getClass_56;
|
jtulach@678
|
21212 |
_.typeId$ = 0;
|
jtulach@678
|
21213 |
_.additional = 0;
|
jtulach@678
|
21214 |
_.astralChar = null;
|
jtulach@678
|
21215 |
_.attributeName = null;
|
jtulach@678
|
21216 |
_.attributes = null;
|
jtulach@678
|
21217 |
_.bmpChar = null;
|
jtulach@678
|
21218 |
_.candidate = 0;
|
jtulach@678
|
21219 |
_.confident = false;
|
jtulach@678
|
21220 |
_.contentModelElement = null;
|
jtulach@678
|
21221 |
_.contentModelElementNameAsArray = null;
|
jtulach@678
|
21222 |
_.cstart = 0;
|
jtulach@678
|
21223 |
_.doctypeName = null;
|
jtulach@678
|
21224 |
_.endTag = false;
|
jtulach@678
|
21225 |
_.entCol = 0;
|
jtulach@678
|
21226 |
_.forceQuirks = false;
|
jtulach@678
|
21227 |
_.hi = 0;
|
jtulach@678
|
21228 |
_.html4 = false;
|
jtulach@678
|
21229 |
_.html4ModeCompatibleWithXhtml1Schemata = false;
|
jtulach@678
|
21230 |
_.index = 0;
|
jtulach@678
|
21231 |
_.lastCR = false;
|
jtulach@678
|
21232 |
_.lo = 0;
|
jtulach@678
|
21233 |
_.longStrBuf = null;
|
jtulach@678
|
21234 |
_.longStrBufLen = 0;
|
jtulach@678
|
21235 |
_.mappingLangToXmlLang = 0;
|
jtulach@678
|
21236 |
_.metaBoundaryPassed = false;
|
jtulach@678
|
21237 |
_.newAttributesEachTime = false;
|
jtulach@678
|
21238 |
_.prevValue = 0;
|
jtulach@678
|
21239 |
_.publicIdentifier = null;
|
jtulach@678
|
21240 |
_.returnStateSave = 0;
|
jtulach@678
|
21241 |
_.seenDigits = false;
|
jtulach@678
|
21242 |
_.shouldSuspend = false;
|
jtulach@678
|
21243 |
_.stateSave = 0;
|
jtulach@678
|
21244 |
_.strBuf = null;
|
jtulach@678
|
21245 |
_.strBufLen = 0;
|
jtulach@678
|
21246 |
_.strBufMark = 0;
|
jtulach@678
|
21247 |
_.systemIdentifier = null;
|
jtulach@678
|
21248 |
_.tagName = null;
|
jtulach@678
|
21249 |
_.tokenHandler = null;
|
jtulach@678
|
21250 |
_.value = 0;
|
jtulach@678
|
21251 |
_.wantsComments = false;
|
jtulach@678
|
21252 |
var CDATA_LSQB, IFRAME_ARR, LF, LT_GT, LT_SOLIDUS, NOEMBED_ARR, NOFRAMES_ARR, NOSCRIPT_ARR, OCTYPE, PLAINTEXT_ARR, REPLACEMENT_CHARACTER, RSQB_RSQB, SCRIPT_ARR, SPACE, STYLE_ARR, TEXTAREA_ARR, TITLE_ARR, UBLIC, XMP_ARR, YSTEM;
|
jtulach@678
|
21253 |
function $clinit_90(){
|
jtulach@678
|
21254 |
$clinit_90 = nullMethod;
|
jtulach@678
|
21255 |
$clinit_97();
|
jtulach@678
|
21256 |
}
|
jtulach@678
|
21257 |
|
jtulach@678
|
21258 |
function $ErrorReportingTokenizer(this$static, tokenHandler){
|
jtulach@678
|
21259 |
$clinit_90();
|
jtulach@678
|
21260 |
this$static.contentSpacePolicy = ($clinit_80() , ALTER_INFOSET);
|
jtulach@678
|
21261 |
this$static.commentPolicy = ALTER_INFOSET;
|
jtulach@678
|
21262 |
this$static.xmlnsPolicy = ALTER_INFOSET;
|
jtulach@678
|
21263 |
this$static.namePolicy = ALTER_INFOSET;
|
jtulach@678
|
21264 |
this$static.tokenHandler = tokenHandler;
|
jtulach@678
|
21265 |
this$static.newAttributesEachTime = false;
|
jtulach@678
|
21266 |
this$static.bmpChar = initDim(_3C_classLit, 42, -1, 1, 1);
|
jtulach@678
|
21267 |
this$static.astralChar = initDim(_3C_classLit, 42, -1, 2, 1);
|
jtulach@678
|
21268 |
this$static.contentNonXmlCharPolicy = ALTER_INFOSET;
|
jtulach@678
|
21269 |
return this$static;
|
jtulach@678
|
21270 |
}
|
jtulach@678
|
21271 |
|
jtulach@678
|
21272 |
function $checkChar(this$static, buf, pos){
|
jtulach@678
|
21273 |
var c, intVal;
|
jtulach@678
|
21274 |
this$static.linePrev = this$static.line;
|
jtulach@678
|
21275 |
this$static.colPrev = this$static.col;
|
jtulach@678
|
21276 |
if (this$static.nextCharOnNewLine) {
|
jtulach@678
|
21277 |
++this$static.line;
|
jtulach@678
|
21278 |
this$static.col = 1;
|
jtulach@678
|
21279 |
this$static.nextCharOnNewLine = false;
|
jtulach@678
|
21280 |
}
|
jtulach@678
|
21281 |
else {
|
jtulach@678
|
21282 |
++this$static.col;
|
jtulach@678
|
21283 |
}
|
jtulach@678
|
21284 |
c = buf[pos];
|
jtulach@678
|
21285 |
if (!this$static.confident && !this$static.alreadyComplainedAboutNonAscii && c > 127) {
|
jtulach@678
|
21286 |
this$static.alreadyComplainedAboutNonAscii = true;
|
jtulach@678
|
21287 |
}
|
jtulach@678
|
21288 |
switch (c) {
|
jtulach@678
|
21289 |
case 0:
|
jtulach@678
|
21290 |
case 9:
|
jtulach@678
|
21291 |
case 13:
|
jtulach@678
|
21292 |
case 10:
|
jtulach@678
|
21293 |
break;
|
jtulach@678
|
21294 |
case 12:
|
jtulach@678
|
21295 |
if (this$static.contentNonXmlCharPolicy == ($clinit_80() , FATAL)) {
|
jtulach@678
|
21296 |
$fatal(this$static, 'This document is not mappable to XML 1.0 without data loss due to ' + $toUPlusString(c) + ' which is not a legal XML 1.0 character.');
|
jtulach@678
|
21297 |
}
|
jtulach@678
|
21298 |
else {
|
jtulach@678
|
21299 |
if (this$static.contentNonXmlCharPolicy == ALTER_INFOSET) {
|
jtulach@678
|
21300 |
c = buf[pos] = 32;
|
jtulach@678
|
21301 |
}
|
jtulach@678
|
21302 |
'This document is not mappable to XML 1.0 without data loss due to ' + $toUPlusString(c) + ' which is not a legal XML 1.0 character.';
|
jtulach@678
|
21303 |
}
|
jtulach@678
|
21304 |
|
jtulach@678
|
21305 |
break;
|
jtulach@678
|
21306 |
default:if ((c & 64512) == 56320) {
|
jtulach@678
|
21307 |
if ((this$static.prev & 64512) == 55296) {
|
jtulach@678
|
21308 |
intVal = (this$static.prev << 10) + c + -56613888;
|
jtulach@678
|
21309 |
if (intVal >= 983040 && intVal <= 1048573 || intVal >= 1048576 && intVal <= 1114109) {
|
jtulach@678
|
21310 |
$warnAboutPrivateUseChar(this$static);
|
jtulach@678
|
21311 |
}
|
jtulach@678
|
21312 |
}
|
jtulach@678
|
21313 |
}
|
jtulach@678
|
21314 |
else if (c < 32 || (c & 65534) == 65534) {
|
jtulach@678
|
21315 |
switch (this$static.contentNonXmlCharPolicy.ordinal) {
|
jtulach@678
|
21316 |
case 1:
|
jtulach@678
|
21317 |
$fatal(this$static, 'Forbidden code point ' + $toUPlusString(c) + '.');
|
jtulach@678
|
21318 |
break;
|
jtulach@678
|
21319 |
case 2:
|
jtulach@678
|
21320 |
c = buf[pos] = 65533;
|
jtulach@678
|
21321 |
case 0:
|
jtulach@678
|
21322 |
'Forbidden code point ' + $toUPlusString(c) + '.';
|
jtulach@678
|
21323 |
}
|
jtulach@678
|
21324 |
}
|
jtulach@678
|
21325 |
else if (c >= 127 && c <= 159 || c >= 64976 && c <= 64991) {
|
jtulach@678
|
21326 |
'Forbidden code point ' + $toUPlusString(c) + '.';
|
jtulach@678
|
21327 |
}
|
jtulach@678
|
21328 |
else if (c >= 57344 && c <= 63743) {
|
jtulach@678
|
21329 |
$warnAboutPrivateUseChar(this$static);
|
jtulach@678
|
21330 |
}
|
jtulach@678
|
21331 |
|
jtulach@678
|
21332 |
}
|
jtulach@678
|
21333 |
this$static.prev = c;
|
jtulach@678
|
21334 |
return c;
|
jtulach@678
|
21335 |
}
|
jtulach@678
|
21336 |
|
jtulach@678
|
21337 |
function $errLtOrEqualsInUnquotedAttributeOrNull(c){
|
jtulach@678
|
21338 |
switch (c) {
|
jtulach@678
|
21339 |
case 61:
|
jtulach@678
|
21340 |
return;
|
jtulach@678
|
21341 |
case 60:
|
jtulach@678
|
21342 |
return;
|
jtulach@678
|
21343 |
}
|
jtulach@678
|
21344 |
}
|
jtulach@678
|
21345 |
|
jtulach@678
|
21346 |
function $flushChars(this$static, buf, pos){
|
jtulach@678
|
21347 |
var currCol, currLine;
|
jtulach@678
|
21348 |
if (pos > this$static.cstart) {
|
jtulach@678
|
21349 |
currLine = this$static.line;
|
jtulach@678
|
21350 |
currCol = this$static.col;
|
jtulach@678
|
21351 |
this$static.line = this$static.linePrev;
|
jtulach@678
|
21352 |
this$static.col = this$static.colPrev;
|
jtulach@678
|
21353 |
$characters(this$static.tokenHandler, buf, this$static.cstart, pos - this$static.cstart);
|
jtulach@678
|
21354 |
this$static.line = currLine;
|
jtulach@678
|
21355 |
this$static.col = currCol;
|
jtulach@678
|
21356 |
}
|
jtulach@678
|
21357 |
this$static.cstart = 2147483647;
|
jtulach@678
|
21358 |
}
|
jtulach@678
|
21359 |
|
jtulach@678
|
21360 |
function $getColumnNumber(this$static){
|
jtulach@678
|
21361 |
if (this$static.col > 0) {
|
jtulach@678
|
21362 |
return this$static.col;
|
jtulach@678
|
21363 |
}
|
jtulach@678
|
21364 |
else {
|
jtulach@678
|
21365 |
return -1;
|
jtulach@678
|
21366 |
}
|
jtulach@678
|
21367 |
}
|
jtulach@678
|
21368 |
|
jtulach@678
|
21369 |
function $getLineNumber(this$static){
|
jtulach@678
|
21370 |
if (this$static.line > 0) {
|
jtulach@678
|
21371 |
return this$static.line;
|
jtulach@678
|
21372 |
}
|
jtulach@678
|
21373 |
else {
|
jtulach@678
|
21374 |
return -1;
|
jtulach@678
|
21375 |
}
|
jtulach@678
|
21376 |
}
|
jtulach@678
|
21377 |
|
jtulach@678
|
21378 |
function $toUPlusString(c){
|
jtulach@678
|
21379 |
var hexString;
|
jtulach@678
|
21380 |
hexString = toPowerOfTwoString(c, 4);
|
jtulach@678
|
21381 |
switch (hexString.length) {
|
jtulach@678
|
21382 |
case 1:
|
jtulach@678
|
21383 |
return 'U+000' + hexString;
|
jtulach@678
|
21384 |
case 2:
|
jtulach@678
|
21385 |
return 'U+00' + hexString;
|
jtulach@678
|
21386 |
case 3:
|
jtulach@678
|
21387 |
return 'U+0' + hexString;
|
jtulach@678
|
21388 |
case 4:
|
jtulach@678
|
21389 |
return 'U+' + hexString;
|
jtulach@678
|
21390 |
default:throw $RuntimeException(new RuntimeException(), 'Unreachable.');
|
jtulach@678
|
21391 |
}
|
jtulach@678
|
21392 |
}
|
jtulach@678
|
21393 |
|
jtulach@678
|
21394 |
function $warnAboutPrivateUseChar(this$static){
|
jtulach@678
|
21395 |
if (!this$static.alreadyWarnedAboutPrivateUseCharacters) {
|
jtulach@678
|
21396 |
this$static.alreadyWarnedAboutPrivateUseCharacters = true;
|
jtulach@678
|
21397 |
}
|
jtulach@678
|
21398 |
}
|
jtulach@678
|
21399 |
|
jtulach@678
|
21400 |
function getClass_52(){
|
jtulach@678
|
21401 |
return Lnu_validator_htmlparser_impl_ErrorReportingTokenizer_2_classLit;
|
jtulach@678
|
21402 |
}
|
jtulach@678
|
21403 |
|
jtulach@678
|
21404 |
function ErrorReportingTokenizer(){
|
jtulach@678
|
21405 |
}
|
jtulach@678
|
21406 |
|
jtulach@678
|
21407 |
_ = ErrorReportingTokenizer.prototype = new Tokenizer();
|
jtulach@678
|
21408 |
_.getClass$ = getClass_52;
|
jtulach@678
|
21409 |
_.typeId$ = 0;
|
jtulach@678
|
21410 |
_.alreadyComplainedAboutNonAscii = false;
|
jtulach@678
|
21411 |
_.alreadyWarnedAboutPrivateUseCharacters = false;
|
jtulach@678
|
21412 |
_.col = 0;
|
jtulach@678
|
21413 |
_.colPrev = 0;
|
jtulach@678
|
21414 |
_.line = 0;
|
jtulach@678
|
21415 |
_.linePrev = 0;
|
jtulach@678
|
21416 |
_.nextCharOnNewLine = false;
|
jtulach@678
|
21417 |
_.prev = 0;
|
jtulach@678
|
21418 |
function $clinit_91(){
|
jtulach@678
|
21419 |
$clinit_91 = nullMethod;
|
jtulach@678
|
21420 |
EMPTY_ATTRIBUTENAMES = initDim(_3Lnu_validator_htmlparser_impl_AttributeName_2_classLit, 49, 9, 0, 0);
|
jtulach@678
|
21421 |
EMPTY_STRINGS = initDim(_3Ljava_lang_String_2_classLit, 48, 1, 0, 0);
|
jtulach@678
|
21422 |
EMPTY_ATTRIBUTES = $HtmlAttributes(new HtmlAttributes(), 0);
|
jtulach@678
|
21423 |
}
|
jtulach@678
|
21424 |
|
jtulach@678
|
21425 |
function $HtmlAttributes(this$static, mode){
|
jtulach@678
|
21426 |
$clinit_91();
|
jtulach@678
|
21427 |
this$static.mode = mode;
|
jtulach@678
|
21428 |
this$static.length_0 = 0;
|
jtulach@678
|
21429 |
this$static.names = initDim(_3Lnu_validator_htmlparser_impl_AttributeName_2_classLit, 49, 9, 5, 0);
|
jtulach@678
|
21430 |
this$static.values = initDim(_3Ljava_lang_String_2_classLit, 48, 1, 5, 0);
|
jtulach@678
|
21431 |
this$static.xmlnsLength = 0;
|
jtulach@678
|
21432 |
this$static.xmlnsNames = EMPTY_ATTRIBUTENAMES;
|
jtulach@678
|
21433 |
this$static.xmlnsValues = EMPTY_STRINGS;
|
jtulach@678
|
21434 |
return this$static;
|
jtulach@678
|
21435 |
}
|
jtulach@678
|
21436 |
|
jtulach@678
|
21437 |
function $addAttribute(this$static, name, value, xmlnsPolicy){
|
jtulach@678
|
21438 |
var newLen, newNames, newValues;
|
jtulach@678
|
21439 |
name == ($clinit_87() , ID);
|
jtulach@678
|
21440 |
if (name.xmlns) {
|
jtulach@678
|
21441 |
if (this$static.xmlnsNames.length == this$static.xmlnsLength) {
|
jtulach@678
|
21442 |
newLen = this$static.xmlnsLength == 0?2:this$static.xmlnsLength << 1;
|
jtulach@678
|
21443 |
newNames = initDim(_3Lnu_validator_htmlparser_impl_AttributeName_2_classLit, 49, 9, newLen, 0);
|
jtulach@678
|
21444 |
arraycopy(this$static.xmlnsNames, 0, newNames, 0, this$static.xmlnsNames.length);
|
jtulach@678
|
21445 |
this$static.xmlnsNames = newNames;
|
jtulach@678
|
21446 |
newValues = initDim(_3Ljava_lang_String_2_classLit, 48, 1, newLen, 0);
|
jtulach@678
|
21447 |
arraycopy(this$static.xmlnsValues, 0, newValues, 0, this$static.xmlnsValues.length);
|
jtulach@678
|
21448 |
this$static.xmlnsValues = newValues;
|
jtulach@678
|
21449 |
}
|
jtulach@678
|
21450 |
this$static.xmlnsNames[this$static.xmlnsLength] = name;
|
jtulach@678
|
21451 |
this$static.xmlnsValues[this$static.xmlnsLength] = value;
|
jtulach@678
|
21452 |
++this$static.xmlnsLength;
|
jtulach@678
|
21453 |
switch (xmlnsPolicy.ordinal) {
|
jtulach@678
|
21454 |
case 1:
|
jtulach@678
|
21455 |
throw $SAXException(new SAXException(), 'Saw an xmlns attribute.');
|
jtulach@678
|
21456 |
case 2:
|
jtulach@678
|
21457 |
return;
|
jtulach@678
|
21458 |
}
|
jtulach@678
|
21459 |
}
|
jtulach@678
|
21460 |
if (this$static.names.length == this$static.length_0) {
|
jtulach@678
|
21461 |
newLen = this$static.length_0 << 1;
|
jtulach@678
|
21462 |
newNames = initDim(_3Lnu_validator_htmlparser_impl_AttributeName_2_classLit, 49, 9, newLen, 0);
|
jtulach@678
|
21463 |
arraycopy(this$static.names, 0, newNames, 0, this$static.names.length);
|
jtulach@678
|
21464 |
this$static.names = newNames;
|
jtulach@678
|
21465 |
newValues = initDim(_3Ljava_lang_String_2_classLit, 48, 1, newLen, 0);
|
jtulach@678
|
21466 |
arraycopy(this$static.values, 0, newValues, 0, this$static.values.length);
|
jtulach@678
|
21467 |
this$static.values = newValues;
|
jtulach@678
|
21468 |
}
|
jtulach@678
|
21469 |
this$static.names[this$static.length_0] = name;
|
jtulach@678
|
21470 |
this$static.values[this$static.length_0] = value;
|
jtulach@678
|
21471 |
++this$static.length_0;
|
jtulach@678
|
21472 |
}
|
jtulach@678
|
21473 |
|
jtulach@678
|
21474 |
function $clear_0(this$static, m){
|
jtulach@678
|
21475 |
var i;
|
jtulach@678
|
21476 |
for (i = 0; i < this$static.length_0; ++i) {
|
jtulach@678
|
21477 |
setCheck(this$static.names, i, null);
|
jtulach@678
|
21478 |
setCheck(this$static.values, i, null);
|
jtulach@678
|
21479 |
}
|
jtulach@678
|
21480 |
this$static.length_0 = 0;
|
jtulach@678
|
21481 |
this$static.mode = m;
|
jtulach@678
|
21482 |
for (i = 0; i < this$static.xmlnsLength; ++i) {
|
jtulach@678
|
21483 |
setCheck(this$static.xmlnsNames, i, null);
|
jtulach@678
|
21484 |
setCheck(this$static.xmlnsValues, i, null);
|
jtulach@678
|
21485 |
}
|
jtulach@678
|
21486 |
this$static.xmlnsLength = 0;
|
jtulach@678
|
21487 |
}
|
jtulach@678
|
21488 |
|
jtulach@678
|
21489 |
function $clearWithoutReleasingContents(this$static){
|
jtulach@678
|
21490 |
var i;
|
jtulach@678
|
21491 |
for (i = 0; i < this$static.length_0; ++i) {
|
jtulach@678
|
21492 |
setCheck(this$static.names, i, null);
|
jtulach@678
|
21493 |
setCheck(this$static.values, i, null);
|
jtulach@678
|
21494 |
}
|
jtulach@678
|
21495 |
this$static.length_0 = 0;
|
jtulach@678
|
21496 |
}
|
jtulach@678
|
21497 |
|
jtulach@678
|
21498 |
function $cloneAttributes(this$static){
|
jtulach@678
|
21499 |
var clone, i;
|
jtulach@678
|
21500 |
clone = $HtmlAttributes(new HtmlAttributes(), 0);
|
jtulach@678
|
21501 |
for (i = 0; i < this$static.length_0; ++i) {
|
jtulach@678
|
21502 |
$addAttribute(clone, this$static.names[i], this$static.values[i], ($clinit_80() , ALLOW));
|
jtulach@678
|
21503 |
}
|
jtulach@678
|
21504 |
for (i = 0; i < this$static.xmlnsLength; ++i) {
|
jtulach@678
|
21505 |
$addAttribute(clone, this$static.xmlnsNames[i], this$static.xmlnsValues[i], ($clinit_80() , ALLOW));
|
jtulach@678
|
21506 |
}
|
jtulach@678
|
21507 |
return clone;
|
jtulach@678
|
21508 |
}
|
jtulach@678
|
21509 |
|
jtulach@678
|
21510 |
function $contains(this$static, name){
|
jtulach@678
|
21511 |
var i;
|
jtulach@678
|
21512 |
for (i = 0; i < this$static.length_0; ++i) {
|
jtulach@678
|
21513 |
if (name.local[0] == this$static.names[i].local[0]) {
|
jtulach@678
|
21514 |
return true;
|
jtulach@678
|
21515 |
}
|
jtulach@678
|
21516 |
}
|
jtulach@678
|
21517 |
for (i = 0; i < this$static.xmlnsLength; ++i) {
|
jtulach@678
|
21518 |
if (name.local[0] == this$static.xmlnsNames[i].local[0]) {
|
jtulach@678
|
21519 |
return true;
|
jtulach@678
|
21520 |
}
|
jtulach@678
|
21521 |
}
|
jtulach@678
|
21522 |
return false;
|
jtulach@678
|
21523 |
}
|
jtulach@678
|
21524 |
|
jtulach@678
|
21525 |
function $getAttributeName(this$static, index){
|
jtulach@678
|
21526 |
if (index < this$static.length_0 && index >= 0) {
|
jtulach@678
|
21527 |
return this$static.names[index];
|
jtulach@678
|
21528 |
}
|
jtulach@678
|
21529 |
else {
|
jtulach@678
|
21530 |
return null;
|
jtulach@678
|
21531 |
}
|
jtulach@678
|
21532 |
}
|
jtulach@678
|
21533 |
|
jtulach@678
|
21534 |
function $getIndex(this$static, name){
|
jtulach@678
|
21535 |
var i;
|
jtulach@678
|
21536 |
for (i = 0; i < this$static.length_0; ++i) {
|
jtulach@678
|
21537 |
if (this$static.names[i] == name) {
|
jtulach@678
|
21538 |
return i;
|
jtulach@678
|
21539 |
}
|
jtulach@678
|
21540 |
}
|
jtulach@678
|
21541 |
return -1;
|
jtulach@678
|
21542 |
}
|
jtulach@678
|
21543 |
|
jtulach@678
|
21544 |
function $getLocalName(this$static, index){
|
jtulach@678
|
21545 |
if (index < this$static.length_0 && index >= 0) {
|
jtulach@678
|
21546 |
return this$static.names[index].local[this$static.mode];
|
jtulach@678
|
21547 |
}
|
jtulach@678
|
21548 |
else {
|
jtulach@678
|
21549 |
return null;
|
jtulach@678
|
21550 |
}
|
jtulach@678
|
21551 |
}
|
jtulach@678
|
21552 |
|
jtulach@678
|
21553 |
function $getURI(this$static, index){
|
jtulach@678
|
21554 |
if (index < this$static.length_0 && index >= 0) {
|
jtulach@678
|
21555 |
return this$static.names[index].uri[this$static.mode];
|
jtulach@678
|
21556 |
}
|
jtulach@678
|
21557 |
else {
|
jtulach@678
|
21558 |
return null;
|
jtulach@678
|
21559 |
}
|
jtulach@678
|
21560 |
}
|
jtulach@678
|
21561 |
|
jtulach@678
|
21562 |
function $getValue(this$static, index){
|
jtulach@678
|
21563 |
if (index < this$static.length_0 && index >= 0) {
|
jtulach@678
|
21564 |
return this$static.values[index];
|
jtulach@678
|
21565 |
}
|
jtulach@678
|
21566 |
else {
|
jtulach@678
|
21567 |
return null;
|
jtulach@678
|
21568 |
}
|
jtulach@678
|
21569 |
}
|
jtulach@678
|
21570 |
|
jtulach@678
|
21571 |
function $getValue_0(this$static, name){
|
jtulach@678
|
21572 |
var index;
|
jtulach@678
|
21573 |
index = $getIndex(this$static, name);
|
jtulach@678
|
21574 |
if (index == -1) {
|
jtulach@678
|
21575 |
return null;
|
jtulach@678
|
21576 |
}
|
jtulach@678
|
21577 |
else {
|
jtulach@678
|
21578 |
return $getValue(this$static, index);
|
jtulach@678
|
21579 |
}
|
jtulach@678
|
21580 |
}
|
jtulach@678
|
21581 |
|
jtulach@678
|
21582 |
function $processNonNcNames(this$static, treeBuilder, namePolicy){
|
jtulach@678
|
21583 |
var attName, i, name;
|
jtulach@678
|
21584 |
for (i = 0; i < this$static.length_0; ++i) {
|
jtulach@678
|
21585 |
attName = this$static.names[i];
|
jtulach@678
|
21586 |
if (!attName.ncname[this$static.mode]) {
|
jtulach@678
|
21587 |
name = attName.local[this$static.mode];
|
jtulach@678
|
21588 |
switch (namePolicy.ordinal) {
|
jtulach@678
|
21589 |
case 2:
|
jtulach@678
|
21590 |
this$static.names[i] = ($clinit_87() , $AttributeName(new AttributeName(), ALL_NO_NS, SAME_LOCAL(escapeName(name)), ALL_NO_PREFIX, ALL_NCNAME, false));
|
jtulach@678
|
21591 |
case 0:
|
jtulach@678
|
21592 |
attName != ($clinit_87() , XML_LANG);
|
jtulach@678
|
21593 |
break;
|
jtulach@678
|
21594 |
case 1:
|
jtulach@678
|
21595 |
$fatal_1(treeBuilder, 'Attribute \u201C' + name + '\u201D is not serializable as XML 1.0.');
|
jtulach@678
|
21596 |
}
|
jtulach@678
|
21597 |
}
|
jtulach@678
|
21598 |
}
|
jtulach@678
|
21599 |
}
|
jtulach@678
|
21600 |
|
jtulach@678
|
21601 |
function getClass_53(){
|
jtulach@678
|
21602 |
return Lnu_validator_htmlparser_impl_HtmlAttributes_2_classLit;
|
jtulach@678
|
21603 |
}
|
jtulach@678
|
21604 |
|
jtulach@678
|
21605 |
function HtmlAttributes(){
|
jtulach@678
|
21606 |
}
|
jtulach@678
|
21607 |
|
jtulach@678
|
21608 |
_ = HtmlAttributes.prototype = new Object_0();
|
jtulach@678
|
21609 |
_.getClass$ = getClass_53;
|
jtulach@678
|
21610 |
_.typeId$ = 0;
|
jtulach@678
|
21611 |
_.length_0 = 0;
|
jtulach@678
|
21612 |
_.mode = 0;
|
jtulach@678
|
21613 |
_.names = null;
|
jtulach@678
|
21614 |
_.values = null;
|
jtulach@678
|
21615 |
_.xmlnsLength = 0;
|
jtulach@678
|
21616 |
_.xmlnsNames = null;
|
jtulach@678
|
21617 |
_.xmlnsValues = null;
|
jtulach@678
|
21618 |
var EMPTY_ATTRIBUTENAMES, EMPTY_ATTRIBUTES, EMPTY_STRINGS;
|
jtulach@678
|
21619 |
function $LocatorImpl(this$static, locator){
|
jtulach@678
|
21620 |
$getColumnNumber(locator);
|
jtulach@678
|
21621 |
$getLineNumber(locator);
|
jtulach@678
|
21622 |
return this$static;
|
jtulach@678
|
21623 |
}
|
jtulach@678
|
21624 |
|
jtulach@678
|
21625 |
function getClass_54(){
|
jtulach@678
|
21626 |
return Lnu_validator_htmlparser_impl_LocatorImpl_2_classLit;
|
jtulach@678
|
21627 |
}
|
jtulach@678
|
21628 |
|
jtulach@678
|
21629 |
function LocatorImpl(){
|
jtulach@678
|
21630 |
}
|
jtulach@678
|
21631 |
|
jtulach@678
|
21632 |
_ = LocatorImpl.prototype = new Object_0();
|
jtulach@678
|
21633 |
_.getClass$ = getClass_54;
|
jtulach@678
|
21634 |
_.typeId$ = 0;
|
jtulach@678
|
21635 |
function $clinit_93(){
|
jtulach@678
|
21636 |
$clinit_93 = nullMethod;
|
jtulach@678
|
21637 |
HEX_TABLE = $toCharArray('0123456789ABCDEF');
|
jtulach@678
|
21638 |
}
|
jtulach@678
|
21639 |
|
jtulach@678
|
21640 |
function appendUHexTo(sb, c){
|
jtulach@678
|
21641 |
var i;
|
jtulach@678
|
21642 |
$append_0(sb, 'U');
|
jtulach@678
|
21643 |
for (i = 0; i < 6; ++i) {
|
jtulach@678
|
21644 |
$append_0(sb, String.fromCharCode(HEX_TABLE[(c & 15728640) >> 20]));
|
jtulach@678
|
21645 |
c <<= 4;
|
jtulach@678
|
21646 |
}
|
jtulach@678
|
21647 |
}
|
jtulach@678
|
21648 |
|
jtulach@678
|
21649 |
function escapeName(str){
|
jtulach@678
|
21650 |
$clinit_93();
|
jtulach@678
|
21651 |
var c, i, next, sb;
|
jtulach@678
|
21652 |
sb = $StringBuilder(new StringBuilder());
|
jtulach@678
|
21653 |
for (i = 0; i < str.length; ++i) {
|
jtulach@678
|
21654 |
c = str.charCodeAt(i);
|
jtulach@678
|
21655 |
if ((c & 64512) == 55296) {
|
jtulach@678
|
21656 |
next = str.charCodeAt(++i);
|
jtulach@678
|
21657 |
appendUHexTo(sb, (c << 10) + next + -56613888);
|
jtulach@678
|
21658 |
}
|
jtulach@678
|
21659 |
else if (i == 0 && !(c >= 65 && c <= 90 || c >= 97 && c <= 122 || c >= 192 && c <= 214 || c >= 216 && c <= 246 || c >= 248 && c <= 255 || c >= 256 && c <= 305 || c >= 308 && c <= 318 || c >= 321 && c <= 328 || c >= 330 && c <= 382 || c >= 384 && c <= 451 || c >= 461 && c <= 496 || c >= 500 && c <= 501 || c >= 506 && c <= 535 || c >= 592 && c <= 680 || c >= 699 && c <= 705 || c == 902 || c >= 904 && c <= 906 || c == 908 || c >= 910 && c <= 929 || c >= 931 && c <= 974 || c >= 976 && c <= 982 || c == 986 || c == 988 || c == 990 || c == 992 || c >= 994 && c <= 1011 || c >= 1025 && c <= 1036 || c >= 1038 && c <= 1103 || c >= 1105 && c <= 1116 || c >= 1118 && c <= 1153 || c >= 1168 && c <= 1220 || c >= 1223 && c <= 1224 || c >= 1227 && c <= 1228 || c >= 1232 && c <= 1259 || c >= 1262 && c <= 1269 || c >= 1272 && c <= 1273 || c >= 1329 && c <= 1366 || c == 1369 || c >= 1377 && c <= 1414 || c >= 1488 && c <= 1514 || c >= 1520 && c <= 1522 || c >= 1569 && c <= 1594 || c >= 1601 && c <= 1610 || c >= 1649 && c <= 1719 || c >= 1722 && c <= 1726 || c >= 1728 && c <= 1742 || c >= 1744 && c <= 1747 || c == 1749 || c >= 1765 && c <= 1766 || c >= 2309 && c <= 2361 || c == 2365 || c >= 2392 && c <= 2401 || c >= 2437 && c <= 2444 || c >= 2447 && c <= 2448 || c >= 2451 && c <= 2472 || c >= 2474 && c <= 2480 || c == 2482 || c >= 2486 && c <= 2489 || c >= 2524 && c <= 2525 || c >= 2527 && c <= 2529 || c >= 2544 && c <= 2545 || c >= 2565 && c <= 2570 || c >= 2575 && c <= 2576 || c >= 2579 && c <= 2600 || c >= 2602 && c <= 2608 || c >= 2610 && c <= 2611 || c >= 2613 && c <= 2614 || c >= 2616 && c <= 2617 || c >= 2649 && c <= 2652 || c == 2654 || c >= 2674 && c <= 2676 || c >= 2693 && c <= 2699 || c == 2701 || c >= 2703 && c <= 2705 || c >= 2707 && c <= 2728 || c >= 2730 && c <= 2736 || c >= 2738 && c <= 2739 || c >= 2741 && c <= 2745 || c == 2749 || c == 2784 || c >= 2821 && c <= 2828 || c >= 2831 && c <= 2832 || c >= 2835 && c <= 2856 || c >= 2858 && c <= 2864 || c >= 2866 && c <= 2867 || c >= 2870 && c <= 2873 || c == 2877 || c >= 2908 && c <= 2909 || c >= 2911 && c <= 2913 || c >= 2949 && c <= 2954 || c >= 2958 && c <= 2960 || c >= 2962 && c <= 2965 || c >= 2969 && c <= 2970 || c == 2972 || c >= 2974 && c <= 2975 || c >= 2979 && c <= 2980 || c >= 2984 && c <= 2986 || c >= 2990 && c <= 2997 || c >= 2999 && c <= 3001 || c >= 3077 && c <= 3084 || c >= 3086 && c <= 3088 || c >= 3090 && c <= 3112 || c >= 3114 && c <= 3123 || c >= 3125 && c <= 3129 || c >= 3168 && c <= 3169 || c >= 3205 && c <= 3212 || c >= 3214 && c <= 3216 || c >= 3218 && c <= 3240 || c >= 3242 && c <= 3251 || c >= 3253 && c <= 3257 || c == 3294 || c >= 3296 && c <= 3297 || c >= 3333 && c <= 3340 || c >= 3342 && c <= 3344 || c >= 3346 && c <= 3368 || c >= 3370 && c <= 3385 || c >= 3424 && c <= 3425 || c >= 3585 && c <= 3630 || c == 3632 || c >= 3634 && c <= 3635 || c >= 3648 && c <= 3653 || c >= 3713 && c <= 3714 || c == 3716 || c >= 3719 && c <= 3720 || c == 3722 || c == 3725 || c >= 3732 && c <= 3735 || c >= 3737 && c <= 3743 || c >= 3745 && c <= 3747 || c == 3749 || c == 3751 || c >= 3754 && c <= 3755 || c >= 3757 && c <= 3758 || c == 3760 || c >= 3762 && c <= 3763 || c == 3773 || c >= 3776 && c <= 3780 || c >= 3904 && c <= 3911 || c >= 3913 && c <= 3945 || c >= 4256 && c <= 4293 || c >= 4304 && c <= 4342 || c == 4352 || c >= 4354 && c <= 4355 || c >= 4357 && c <= 4359 || c == 4361 || c >= 4363 && c <= 4364 || c >= 4366 && c <= 4370 || c == 4412 || c == 4414 || c == 4416 || c == 4428 || c == 4430 || c == 4432 || c >= 4436 && c <= 4437 || c == 4441 || c >= 4447 && c <= 4449 || c == 4451 || c == 4453 || c == 4455 || c == 4457 || c >= 4461 && c <= 4462 || c >= 4466 && c <= 4467 || c == 4469 || c == 4510 || c == 4520 || c == 4523 || c >= 4526 && c <= 4527 || c >= 4535 && c <= 4536 || c == 4538 || c >= 4540 && c <= 4546 || c == 4587 || c == 4592 || c == 4601 || c >= 7680 && c <= 7835 || c >= 7840 && c <= 7929 || c >= 7936 && c <= 7957 || c >= 7960 && c <= 7965 || c >= 7968 && c <= 8005 || c >= 8008 && c <= 8013 || c >= 8016 && c <= 8023 || c == 8025 || c == 8027 || c == 8029 || c >= 8031 && c <= 8061 || c >= 8064 && c <= 8116 || c >= 8118 && c <= 8124 || c == 8126 || c >= 8130 && c <= 8132 || c >= 8134 && c <= 8140 || c >= 8144 && c <= 8147 || c >= 8150 && c <= 8155 || c >= 8160 && c <= 8172 || c >= 8178 && c <= 8180 || c >= 8182 && c <= 8188 || c == 8486 || c >= 8490 && c <= 8491 || c == 8494 || c >= 8576 && c <= 8578 || c >= 12353 && c <= 12436 || c >= 12449 && c <= 12538 || c >= 12549 && c <= 12588 || c >= 44032 && c <= 55203 || c >= 19968 && c <= 40869 || c == 12295 || c >= 12321 && c <= 12329 || c == 95)) {
|
jtulach@678
|
21660 |
appendUHexTo(sb, c);
|
jtulach@678
|
21661 |
}
|
jtulach@678
|
21662 |
else if (i != 0 && !(c >= 48 && c <= 57 || c >= 1632 && c <= 1641 || c >= 1776 && c <= 1785 || c >= 2406 && c <= 2415 || c >= 2534 && c <= 2543 || c >= 2662 && c <= 2671 || c >= 2790 && c <= 2799 || c >= 2918 && c <= 2927 || c >= 3047 && c <= 3055 || c >= 3174 && c <= 3183 || c >= 3302 && c <= 3311 || c >= 3430 && c <= 3439 || c >= 3664 && c <= 3673 || c >= 3792 && c <= 3801 || c >= 3872 && c <= 3881 || c >= 65 && c <= 90 || c >= 97 && c <= 122 || c >= 192 && c <= 214 || c >= 216 && c <= 246 || c >= 248 && c <= 255 || c >= 256 && c <= 305 || c >= 308 && c <= 318 || c >= 321 && c <= 328 || c >= 330 && c <= 382 || c >= 384 && c <= 451 || c >= 461 && c <= 496 || c >= 500 && c <= 501 || c >= 506 && c <= 535 || c >= 592 && c <= 680 || c >= 699 && c <= 705 || c == 902 || c >= 904 && c <= 906 || c == 908 || c >= 910 && c <= 929 || c >= 931 && c <= 974 || c >= 976 && c <= 982 || c == 986 || c == 988 || c == 990 || c == 992 || c >= 994 && c <= 1011 || c >= 1025 && c <= 1036 || c >= 1038 && c <= 1103 || c >= 1105 && c <= 1116 || c >= 1118 && c <= 1153 || c >= 1168 && c <= 1220 || c >= 1223 && c <= 1224 || c >= 1227 && c <= 1228 || c >= 1232 && c <= 1259 || c >= 1262 && c <= 1269 || c >= 1272 && c <= 1273 || c >= 1329 && c <= 1366 || c == 1369 || c >= 1377 && c <= 1414 || c >= 1488 && c <= 1514 || c >= 1520 && c <= 1522 || c >= 1569 && c <= 1594 || c >= 1601 && c <= 1610 || c >= 1649 && c <= 1719 || c >= 1722 && c <= 1726 || c >= 1728 && c <= 1742 || c >= 1744 && c <= 1747 || c == 1749 || c >= 1765 && c <= 1766 || c >= 2309 && c <= 2361 || c == 2365 || c >= 2392 && c <= 2401 || c >= 2437 && c <= 2444 || c >= 2447 && c <= 2448 || c >= 2451 && c <= 2472 || c >= 2474 && c <= 2480 || c == 2482 || c >= 2486 && c <= 2489 || c >= 2524 && c <= 2525 || c >= 2527 && c <= 2529 || c >= 2544 && c <= 2545 || c >= 2565 && c <= 2570 || c >= 2575 && c <= 2576 || c >= 2579 && c <= 2600 || c >= 2602 && c <= 2608 || c >= 2610 && c <= 2611 || c >= 2613 && c <= 2614 || c >= 2616 && c <= 2617 || c >= 2649 && c <= 2652 || c == 2654 || c >= 2674 && c <= 2676 || c >= 2693 && c <= 2699 || c == 2701 || c >= 2703 && c <= 2705 || c >= 2707 && c <= 2728 || c >= 2730 && c <= 2736 || c >= 2738 && c <= 2739 || c >= 2741 && c <= 2745 || c == 2749 || c == 2784 || c >= 2821 && c <= 2828 || c >= 2831 && c <= 2832 || c >= 2835 && c <= 2856 || c >= 2858 && c <= 2864 || c >= 2866 && c <= 2867 || c >= 2870 && c <= 2873 || c == 2877 || c >= 2908 && c <= 2909 || c >= 2911 && c <= 2913 || c >= 2949 && c <= 2954 || c >= 2958 && c <= 2960 || c >= 2962 && c <= 2965 || c >= 2969 && c <= 2970 || c == 2972 || c >= 2974 && c <= 2975 || c >= 2979 && c <= 2980 || c >= 2984 && c <= 2986 || c >= 2990 && c <= 2997 || c >= 2999 && c <= 3001 || c >= 3077 && c <= 3084 || c >= 3086 && c <= 3088 || c >= 3090 && c <= 3112 || c >= 3114 && c <= 3123 || c >= 3125 && c <= 3129 || c >= 3168 && c <= 3169 || c >= 3205 && c <= 3212 || c >= 3214 && c <= 3216 || c >= 3218 && c <= 3240 || c >= 3242 && c <= 3251 || c >= 3253 && c <= 3257 || c == 3294 || c >= 3296 && c <= 3297 || c >= 3333 && c <= 3340 || c >= 3342 && c <= 3344 || c >= 3346 && c <= 3368 || c >= 3370 && c <= 3385 || c >= 3424 && c <= 3425 || c >= 3585 && c <= 3630 || c == 3632 || c >= 3634 && c <= 3635 || c >= 3648 && c <= 3653 || c >= 3713 && c <= 3714 || c == 3716 || c >= 3719 && c <= 3720 || c == 3722 || c == 3725 || c >= 3732 && c <= 3735 || c >= 3737 && c <= 3743 || c >= 3745 && c <= 3747 || c == 3749 || c == 3751 || c >= 3754 && c <= 3755 || c >= 3757 && c <= 3758 || c == 3760 || c >= 3762 && c <= 3763 || c == 3773 || c >= 3776 && c <= 3780 || c >= 3904 && c <= 3911 || c >= 3913 && c <= 3945 || c >= 4256 && c <= 4293 || c >= 4304 && c <= 4342 || c == 4352 || c >= 4354 && c <= 4355 || c >= 4357 && c <= 4359 || c == 4361 || c >= 4363 && c <= 4364 || c >= 4366 && c <= 4370 || c == 4412 || c == 4414 || c == 4416 || c == 4428 || c == 4430 || c == 4432 || c >= 4436 && c <= 4437 || c == 4441 || c >= 4447 && c <= 4449 || c == 4451 || c == 4453 || c == 4455 || c == 4457 || c >= 4461 && c <= 4462 || c >= 4466 && c <= 4467 || c == 4469 || c == 4510 || c == 4520 || c == 4523 || c >= 4526 && c <= 4527 || c >= 4535 && c <= 4536 || c == 4538 || c >= 4540 && c <= 4546 || c == 4587 || c == 4592 || c == 4601 || c >= 7680 && c <= 7835 || c >= 7840 && c <= 7929 || c >= 7936 && c <= 7957 || c >= 7960 && c <= 7965 || c >= 7968 && c <= 8005 || c >= 8008 && c <= 8013 || c >= 8016 && c <= 8023 || c == 8025 || c == 8027 || c == 8029 || c >= 8031 && c <= 8061 || c >= 8064 && c <= 8116 || c >= 8118 && c <= 8124 || c == 8126 || c >= 8130 && c <= 8132 || c >= 8134 && c <= 8140 || c >= 8144 && c <= 8147 || c >= 8150 && c <= 8155 || c >= 8160 && c <= 8172 || c >= 8178 && c <= 8180 || c >= 8182 && c <= 8188 || c == 8486 || c >= 8490 && c <= 8491 || c == 8494 || c >= 8576 && c <= 8578 || c >= 12353 && c <= 12436 || c >= 12449 && c <= 12538 || c >= 12549 && c <= 12588 || c >= 44032 && c <= 55203 || c >= 19968 && c <= 40869 || c == 12295 || c >= 12321 && c <= 12329 || c == 95 || c == 46 || c == 45 || c >= 768 && c <= 837 || c >= 864 && c <= 865 || c >= 1155 && c <= 1158 || c >= 1425 && c <= 1441 || c >= 1443 && c <= 1465 || c >= 1467 && c <= 1469 || c == 1471 || c >= 1473 && c <= 1474 || c == 1476 || c >= 1611 && c <= 1618 || c == 1648 || c >= 1750 && c <= 1756 || c >= 1757 && c <= 1759 || c >= 1760 && c <= 1764 || c >= 1767 && c <= 1768 || c >= 1770 && c <= 1773 || c >= 2305 && c <= 2307 || c == 2364 || c >= 2366 && c <= 2380 || c == 2381 || c >= 2385 && c <= 2388 || c >= 2402 && c <= 2403 || c >= 2433 && c <= 2435 || c == 2492 || c == 2494 || c == 2495 || c >= 2496 && c <= 2500 || c >= 2503 && c <= 2504 || c >= 2507 && c <= 2509 || c == 2519 || c >= 2530 && c <= 2531 || c == 2562 || c == 2620 || c == 2622 || c == 2623 || c >= 2624 && c <= 2626 || c >= 2631 && c <= 2632 || c >= 2635 && c <= 2637 || c >= 2672 && c <= 2673 || c >= 2689 && c <= 2691 || c == 2748 || c >= 2750 && c <= 2757 || c >= 2759 && c <= 2761 || c >= 2763 && c <= 2765 || c >= 2817 && c <= 2819 || c == 2876 || c >= 2878 && c <= 2883 || c >= 2887 && c <= 2888 || c >= 2891 && c <= 2893 || c >= 2902 && c <= 2903 || c >= 2946 && c <= 2947 || c >= 3006 && c <= 3010 || c >= 3014 && c <= 3016 || c >= 3018 && c <= 3021 || c == 3031 || c >= 3073 && c <= 3075 || c >= 3134 && c <= 3140 || c >= 3142 && c <= 3144 || c >= 3146 && c <= 3149 || c >= 3157 && c <= 3158 || c >= 3202 && c <= 3203 || c >= 3262 && c <= 3268 || c >= 3270 && c <= 3272 || c >= 3274 && c <= 3277 || c >= 3285 && c <= 3286 || c >= 3330 && c <= 3331 || c >= 3390 && c <= 3395 || c >= 3398 && c <= 3400 || c >= 3402 && c <= 3405 || c == 3415 || c == 3633 || c >= 3636 && c <= 3642 || c >= 3655 && c <= 3662 || c == 3761 || c >= 3764 && c <= 3769 || c >= 3771 && c <= 3772 || c >= 3784 && c <= 3789 || c >= 3864 && c <= 3865 || c == 3893 || c == 3895 || c == 3897 || c == 3902 || c == 3903 || c >= 3953 && c <= 3972 || c >= 3974 && c <= 3979 || c >= 3984 && c <= 3989 || c == 3991 || c >= 3993 && c <= 4013 || c >= 4017 && c <= 4023 || c == 4025 || c >= 8400 && c <= 8412 || c == 8417 || c >= 12330 && c <= 12335 || c == 12441 || c == 12442 || c == 183 || c == 720 || c == 721 || c == 903 || c == 1600 || c == 3654 || c == 3782 || c == 12293 || c >= 12337 && c <= 12341 || c >= 12445 && c <= 12446 || c >= 12540 && c <= 12542)) {
|
jtulach@678
|
21663 |
appendUHexTo(sb, c);
|
jtulach@678
|
21664 |
}
|
jtulach@678
|
21665 |
else {
|
jtulach@678
|
21666 |
$append_0(sb, String.fromCharCode(c));
|
jtulach@678
|
21667 |
}
|
jtulach@678
|
21668 |
}
|
jtulach@678
|
21669 |
return String($toString_0(sb));
|
jtulach@678
|
21670 |
}
|
jtulach@678
|
21671 |
|
jtulach@678
|
21672 |
function isNCName(str){
|
jtulach@678
|
21673 |
$clinit_93();
|
jtulach@678
|
21674 |
var i, len;
|
jtulach@678
|
21675 |
if (str == null) {
|
jtulach@678
|
21676 |
return false;
|
jtulach@678
|
21677 |
}
|
jtulach@678
|
21678 |
else {
|
jtulach@678
|
21679 |
len = str.length;
|
jtulach@678
|
21680 |
switch (len) {
|
jtulach@678
|
21681 |
case 0:
|
jtulach@678
|
21682 |
return false;
|
jtulach@678
|
21683 |
case 1:
|
jtulach@678
|
21684 |
return isNCNameStart(str.charCodeAt(0));
|
jtulach@678
|
21685 |
default:if (!isNCNameStart(str.charCodeAt(0))) {
|
jtulach@678
|
21686 |
return false;
|
jtulach@678
|
21687 |
}
|
jtulach@678
|
21688 |
|
jtulach@678
|
21689 |
for (i = 1; i < len; ++i) {
|
jtulach@678
|
21690 |
if (!isNCNameTrail(str.charCodeAt(i))) {
|
jtulach@678
|
21691 |
return false;
|
jtulach@678
|
21692 |
}
|
jtulach@678
|
21693 |
}
|
jtulach@678
|
21694 |
|
jtulach@678
|
21695 |
}
|
jtulach@678
|
21696 |
return true;
|
jtulach@678
|
21697 |
}
|
jtulach@678
|
21698 |
}
|
jtulach@678
|
21699 |
|
jtulach@678
|
21700 |
function isNCNameStart(c){
|
jtulach@678
|
21701 |
return c >= 65 && c <= 90 || c >= 97 && c <= 122 || c >= 192 && c <= 214 || c >= 216 && c <= 246 || c >= 248 && c <= 255 || c >= 256 && c <= 305 || c >= 308 && c <= 318 || c >= 321 && c <= 328 || c >= 330 && c <= 382 || c >= 384 && c <= 451 || c >= 461 && c <= 496 || c >= 500 && c <= 501 || c >= 506 && c <= 535 || c >= 592 && c <= 680 || c >= 699 && c <= 705 || c == 902 || c >= 904 && c <= 906 || c == 908 || c >= 910 && c <= 929 || c >= 931 && c <= 974 || c >= 976 && c <= 982 || c == 986 || c == 988 || c == 990 || c == 992 || c >= 994 && c <= 1011 || c >= 1025 && c <= 1036 || c >= 1038 && c <= 1103 || c >= 1105 && c <= 1116 || c >= 1118 && c <= 1153 || c >= 1168 && c <= 1220 || c >= 1223 && c <= 1224 || c >= 1227 && c <= 1228 || c >= 1232 && c <= 1259 || c >= 1262 && c <= 1269 || c >= 1272 && c <= 1273 || c >= 1329 && c <= 1366 || c == 1369 || c >= 1377 && c <= 1414 || c >= 1488 && c <= 1514 || c >= 1520 && c <= 1522 || c >= 1569 && c <= 1594 || c >= 1601 && c <= 1610 || c >= 1649 && c <= 1719 || c >= 1722 && c <= 1726 || c >= 1728 && c <= 1742 || c >= 1744 && c <= 1747 || c == 1749 || c >= 1765 && c <= 1766 || c >= 2309 && c <= 2361 || c == 2365 || c >= 2392 && c <= 2401 || c >= 2437 && c <= 2444 || c >= 2447 && c <= 2448 || c >= 2451 && c <= 2472 || c >= 2474 && c <= 2480 || c == 2482 || c >= 2486 && c <= 2489 || c >= 2524 && c <= 2525 || c >= 2527 && c <= 2529 || c >= 2544 && c <= 2545 || c >= 2565 && c <= 2570 || c >= 2575 && c <= 2576 || c >= 2579 && c <= 2600 || c >= 2602 && c <= 2608 || c >= 2610 && c <= 2611 || c >= 2613 && c <= 2614 || c >= 2616 && c <= 2617 || c >= 2649 && c <= 2652 || c == 2654 || c >= 2674 && c <= 2676 || c >= 2693 && c <= 2699 || c == 2701 || c >= 2703 && c <= 2705 || c >= 2707 && c <= 2728 || c >= 2730 && c <= 2736 || c >= 2738 && c <= 2739 || c >= 2741 && c <= 2745 || c == 2749 || c == 2784 || c >= 2821 && c <= 2828 || c >= 2831 && c <= 2832 || c >= 2835 && c <= 2856 || c >= 2858 && c <= 2864 || c >= 2866 && c <= 2867 || c >= 2870 && c <= 2873 || c == 2877 || c >= 2908 && c <= 2909 || c >= 2911 && c <= 2913 || c >= 2949 && c <= 2954 || c >= 2958 && c <= 2960 || c >= 2962 && c <= 2965 || c >= 2969 && c <= 2970 || c == 2972 || c >= 2974 && c <= 2975 || c >= 2979 && c <= 2980 || c >= 2984 && c <= 2986 || c >= 2990 && c <= 2997 || c >= 2999 && c <= 3001 || c >= 3077 && c <= 3084 || c >= 3086 && c <= 3088 || c >= 3090 && c <= 3112 || c >= 3114 && c <= 3123 || c >= 3125 && c <= 3129 || c >= 3168 && c <= 3169 || c >= 3205 && c <= 3212 || c >= 3214 && c <= 3216 || c >= 3218 && c <= 3240 || c >= 3242 && c <= 3251 || c >= 3253 && c <= 3257 || c == 3294 || c >= 3296 && c <= 3297 || c >= 3333 && c <= 3340 || c >= 3342 && c <= 3344 || c >= 3346 && c <= 3368 || c >= 3370 && c <= 3385 || c >= 3424 && c <= 3425 || c >= 3585 && c <= 3630 || c == 3632 || c >= 3634 && c <= 3635 || c >= 3648 && c <= 3653 || c >= 3713 && c <= 3714 || c == 3716 || c >= 3719 && c <= 3720 || c == 3722 || c == 3725 || c >= 3732 && c <= 3735 || c >= 3737 && c <= 3743 || c >= 3745 && c <= 3747 || c == 3749 || c == 3751 || c >= 3754 && c <= 3755 || c >= 3757 && c <= 3758 || c == 3760 || c >= 3762 && c <= 3763 || c == 3773 || c >= 3776 && c <= 3780 || c >= 3904 && c <= 3911 || c >= 3913 && c <= 3945 || c >= 4256 && c <= 4293 || c >= 4304 && c <= 4342 || c == 4352 || c >= 4354 && c <= 4355 || c >= 4357 && c <= 4359 || c == 4361 || c >= 4363 && c <= 4364 || c >= 4366 && c <= 4370 || c == 4412 || c == 4414 || c == 4416 || c == 4428 || c == 4430 || c == 4432 || c >= 4436 && c <= 4437 || c == 4441 || c >= 4447 && c <= 4449 || c == 4451 || c == 4453 || c == 4455 || c == 4457 || c >= 4461 && c <= 4462 || c >= 4466 && c <= 4467 || c == 4469 || c == 4510 || c == 4520 || c == 4523 || c >= 4526 && c <= 4527 || c >= 4535 && c <= 4536 || c == 4538 || c >= 4540 && c <= 4546 || c == 4587 || c == 4592 || c == 4601 || c >= 7680 && c <= 7835 || c >= 7840 && c <= 7929 || c >= 7936 && c <= 7957 || c >= 7960 && c <= 7965 || c >= 7968 && c <= 8005 || c >= 8008 && c <= 8013 || c >= 8016 && c <= 8023 || c == 8025 || c == 8027 || c == 8029 || c >= 8031 && c <= 8061 || c >= 8064 && c <= 8116 || c >= 8118 && c <= 8124 || c == 8126 || c >= 8130 && c <= 8132 || c >= 8134 && c <= 8140 || c >= 8144 && c <= 8147 || c >= 8150 && c <= 8155 || c >= 8160 && c <= 8172 || c >= 8178 && c <= 8180 || c >= 8182 && c <= 8188 || c == 8486 || c >= 8490 && c <= 8491 || c == 8494 || c >= 8576 && c <= 8578 || c >= 12353 && c <= 12436 || c >= 12449 && c <= 12538 || c >= 12549 && c <= 12588 || c >= 44032 && c <= 55203 || c >= 19968 && c <= 40869 || c == 12295 || c >= 12321 && c <= 12329 || c == 95;
|
jtulach@678
|
21702 |
}
|
jtulach@678
|
21703 |
|
jtulach@678
|
21704 |
function isNCNameTrail(c){
|
jtulach@678
|
21705 |
return c >= 48 && c <= 57 || c >= 1632 && c <= 1641 || c >= 1776 && c <= 1785 || c >= 2406 && c <= 2415 || c >= 2534 && c <= 2543 || c >= 2662 && c <= 2671 || c >= 2790 && c <= 2799 || c >= 2918 && c <= 2927 || c >= 3047 && c <= 3055 || c >= 3174 && c <= 3183 || c >= 3302 && c <= 3311 || c >= 3430 && c <= 3439 || c >= 3664 && c <= 3673 || c >= 3792 && c <= 3801 || c >= 3872 && c <= 3881 || c >= 65 && c <= 90 || c >= 97 && c <= 122 || c >= 192 && c <= 214 || c >= 216 && c <= 246 || c >= 248 && c <= 255 || c >= 256 && c <= 305 || c >= 308 && c <= 318 || c >= 321 && c <= 328 || c >= 330 && c <= 382 || c >= 384 && c <= 451 || c >= 461 && c <= 496 || c >= 500 && c <= 501 || c >= 506 && c <= 535 || c >= 592 && c <= 680 || c >= 699 && c <= 705 || c == 902 || c >= 904 && c <= 906 || c == 908 || c >= 910 && c <= 929 || c >= 931 && c <= 974 || c >= 976 && c <= 982 || c == 986 || c == 988 || c == 990 || c == 992 || c >= 994 && c <= 1011 || c >= 1025 && c <= 1036 || c >= 1038 && c <= 1103 || c >= 1105 && c <= 1116 || c >= 1118 && c <= 1153 || c >= 1168 && c <= 1220 || c >= 1223 && c <= 1224 || c >= 1227 && c <= 1228 || c >= 1232 && c <= 1259 || c >= 1262 && c <= 1269 || c >= 1272 && c <= 1273 || c >= 1329 && c <= 1366 || c == 1369 || c >= 1377 && c <= 1414 || c >= 1488 && c <= 1514 || c >= 1520 && c <= 1522 || c >= 1569 && c <= 1594 || c >= 1601 && c <= 1610 || c >= 1649 && c <= 1719 || c >= 1722 && c <= 1726 || c >= 1728 && c <= 1742 || c >= 1744 && c <= 1747 || c == 1749 || c >= 1765 && c <= 1766 || c >= 2309 && c <= 2361 || c == 2365 || c >= 2392 && c <= 2401 || c >= 2437 && c <= 2444 || c >= 2447 && c <= 2448 || c >= 2451 && c <= 2472 || c >= 2474 && c <= 2480 || c == 2482 || c >= 2486 && c <= 2489 || c >= 2524 && c <= 2525 || c >= 2527 && c <= 2529 || c >= 2544 && c <= 2545 || c >= 2565 && c <= 2570 || c >= 2575 && c <= 2576 || c >= 2579 && c <= 2600 || c >= 2602 && c <= 2608 || c >= 2610 && c <= 2611 || c >= 2613 && c <= 2614 || c >= 2616 && c <= 2617 || c >= 2649 && c <= 2652 || c == 2654 || c >= 2674 && c <= 2676 || c >= 2693 && c <= 2699 || c == 2701 || c >= 2703 && c <= 2705 || c >= 2707 && c <= 2728 || c >= 2730 && c <= 2736 || c >= 2738 && c <= 2739 || c >= 2741 && c <= 2745 || c == 2749 || c == 2784 || c >= 2821 && c <= 2828 || c >= 2831 && c <= 2832 || c >= 2835 && c <= 2856 || c >= 2858 && c <= 2864 || c >= 2866 && c <= 2867 || c >= 2870 && c <= 2873 || c == 2877 || c >= 2908 && c <= 2909 || c >= 2911 && c <= 2913 || c >= 2949 && c <= 2954 || c >= 2958 && c <= 2960 || c >= 2962 && c <= 2965 || c >= 2969 && c <= 2970 || c == 2972 || c >= 2974 && c <= 2975 || c >= 2979 && c <= 2980 || c >= 2984 && c <= 2986 || c >= 2990 && c <= 2997 || c >= 2999 && c <= 3001 || c >= 3077 && c <= 3084 || c >= 3086 && c <= 3088 || c >= 3090 && c <= 3112 || c >= 3114 && c <= 3123 || c >= 3125 && c <= 3129 || c >= 3168 && c <= 3169 || c >= 3205 && c <= 3212 || c >= 3214 && c <= 3216 || c >= 3218 && c <= 3240 || c >= 3242 && c <= 3251 || c >= 3253 && c <= 3257 || c == 3294 || c >= 3296 && c <= 3297 || c >= 3333 && c <= 3340 || c >= 3342 && c <= 3344 || c >= 3346 && c <= 3368 || c >= 3370 && c <= 3385 || c >= 3424 && c <= 3425 || c >= 3585 && c <= 3630 || c == 3632 || c >= 3634 && c <= 3635 || c >= 3648 && c <= 3653 || c >= 3713 && c <= 3714 || c == 3716 || c >= 3719 && c <= 3720 || c == 3722 || c == 3725 || c >= 3732 && c <= 3735 || c >= 3737 && c <= 3743 || c >= 3745 && c <= 3747 || c == 3749 || c == 3751 || c >= 3754 && c <= 3755 || c >= 3757 && c <= 3758 || c == 3760 || c >= 3762 && c <= 3763 || c == 3773 || c >= 3776 && c <= 3780 || c >= 3904 && c <= 3911 || c >= 3913 && c <= 3945 || c >= 4256 && c <= 4293 || c >= 4304 && c <= 4342 || c == 4352 || c >= 4354 && c <= 4355 || c >= 4357 && c <= 4359 || c == 4361 || c >= 4363 && c <= 4364 || c >= 4366 && c <= 4370 || c == 4412 || c == 4414 || c == 4416 || c == 4428 || c == 4430 || c == 4432 || c >= 4436 && c <= 4437 || c == 4441 || c >= 4447 && c <= 4449 || c == 4451 || c == 4453 || c == 4455 || c == 4457 || c >= 4461 && c <= 4462 || c >= 4466 && c <= 4467 || c == 4469 || c == 4510 || c == 4520 || c == 4523 || c >= 4526 && c <= 4527 || c >= 4535 && c <= 4536 || c == 4538 || c >= 4540 && c <= 4546 || c == 4587 || c == 4592 || c == 4601 || c >= 7680 && c <= 7835 || c >= 7840 && c <= 7929 || c >= 7936 && c <= 7957 || c >= 7960 && c <= 7965 || c >= 7968 && c <= 8005 || c >= 8008 && c <= 8013 || c >= 8016 && c <= 8023 || c == 8025 || c == 8027 || c == 8029 || c >= 8031 && c <= 8061 || c >= 8064 && c <= 8116 || c >= 8118 && c <= 8124 || c == 8126 || c >= 8130 && c <= 8132 || c >= 8134 && c <= 8140 || c >= 8144 && c <= 8147 || c >= 8150 && c <= 8155 || c >= 8160 && c <= 8172 || c >= 8178 && c <= 8180 || c >= 8182 && c <= 8188 || c == 8486 || c >= 8490 && c <= 8491 || c == 8494 || c >= 8576 && c <= 8578 || c >= 12353 && c <= 12436 || c >= 12449 && c <= 12538 || c >= 12549 && c <= 12588 || c >= 44032 && c <= 55203 || c >= 19968 && c <= 40869 || c == 12295 || c >= 12321 && c <= 12329 || c == 95 || c == 46 || c == 45 || c >= 768 && c <= 837 || c >= 864 && c <= 865 || c >= 1155 && c <= 1158 || c >= 1425 && c <= 1441 || c >= 1443 && c <= 1465 || c >= 1467 && c <= 1469 || c == 1471 || c >= 1473 && c <= 1474 || c == 1476 || c >= 1611 && c <= 1618 || c == 1648 || c >= 1750 && c <= 1756 || c >= 1757 && c <= 1759 || c >= 1760 && c <= 1764 || c >= 1767 && c <= 1768 || c >= 1770 && c <= 1773 || c >= 2305 && c <= 2307 || c == 2364 || c >= 2366 && c <= 2380 || c == 2381 || c >= 2385 && c <= 2388 || c >= 2402 && c <= 2403 || c >= 2433 && c <= 2435 || c == 2492 || c == 2494 || c == 2495 || c >= 2496 && c <= 2500 || c >= 2503 && c <= 2504 || c >= 2507 && c <= 2509 || c == 2519 || c >= 2530 && c <= 2531 || c == 2562 || c == 2620 || c == 2622 || c == 2623 || c >= 2624 && c <= 2626 || c >= 2631 && c <= 2632 || c >= 2635 && c <= 2637 || c >= 2672 && c <= 2673 || c >= 2689 && c <= 2691 || c == 2748 || c >= 2750 && c <= 2757 || c >= 2759 && c <= 2761 || c >= 2763 && c <= 2765 || c >= 2817 && c <= 2819 || c == 2876 || c >= 2878 && c <= 2883 || c >= 2887 && c <= 2888 || c >= 2891 && c <= 2893 || c >= 2902 && c <= 2903 || c >= 2946 && c <= 2947 || c >= 3006 && c <= 3010 || c >= 3014 && c <= 3016 || c >= 3018 && c <= 3021 || c == 3031 || c >= 3073 && c <= 3075 || c >= 3134 && c <= 3140 || c >= 3142 && c <= 3144 || c >= 3146 && c <= 3149 || c >= 3157 && c <= 3158 || c >= 3202 && c <= 3203 || c >= 3262 && c <= 3268 || c >= 3270 && c <= 3272 || c >= 3274 && c <= 3277 || c >= 3285 && c <= 3286 || c >= 3330 && c <= 3331 || c >= 3390 && c <= 3395 || c >= 3398 && c <= 3400 || c >= 3402 && c <= 3405 || c == 3415 || c == 3633 || c >= 3636 && c <= 3642 || c >= 3655 && c <= 3662 || c == 3761 || c >= 3764 && c <= 3769 || c >= 3771 && c <= 3772 || c >= 3784 && c <= 3789 || c >= 3864 && c <= 3865 || c == 3893 || c == 3895 || c == 3897 || c == 3902 || c == 3903 || c >= 3953 && c <= 3972 || c >= 3974 && c <= 3979 || c >= 3984 && c <= 3989 || c == 3991 || c >= 3993 && c <= 4013 || c >= 4017 && c <= 4023 || c == 4025 || c >= 8400 && c <= 8412 || c == 8417 || c >= 12330 && c <= 12335 || c == 12441 || c == 12442 || c == 183 || c == 720 || c == 721 || c == 903 || c == 1600 || c == 3654 || c == 3782 || c == 12293 || c >= 12337 && c <= 12341 || c >= 12445 && c <= 12446 || c >= 12540 && c <= 12542;
|
jtulach@678
|
21706 |
}
|
jtulach@678
|
21707 |
|
jtulach@678
|
21708 |
var HEX_TABLE;
|
jtulach@678
|
21709 |
function $clinit_94(){
|
jtulach@678
|
21710 |
$clinit_94 = nullMethod;
|
jtulach@678
|
21711 |
NAMES = initValues(_3_3C_classLit, 52, 12, [$toCharArray('AElig'), $toCharArray('AElig;'), $toCharArray('AMP'), $toCharArray('AMP;'), $toCharArray('Aacute'), $toCharArray('Aacute;'), $toCharArray('Abreve;'), $toCharArray('Acirc'), $toCharArray('Acirc;'), $toCharArray('Acy;'), $toCharArray('Afr;'), $toCharArray('Agrave'), $toCharArray('Agrave;'), $toCharArray('Alpha;'), $toCharArray('Amacr;'), $toCharArray('And;'), $toCharArray('Aogon;'), $toCharArray('Aopf;'), $toCharArray('ApplyFunction;'), $toCharArray('Aring'), $toCharArray('Aring;'), $toCharArray('Ascr;'), $toCharArray('Assign;'), $toCharArray('Atilde'), $toCharArray('Atilde;'), $toCharArray('Auml'), $toCharArray('Auml;'), $toCharArray('Backslash;'), $toCharArray('Barv;'), $toCharArray('Barwed;'), $toCharArray('Bcy;'), $toCharArray('Because;'), $toCharArray('Bernoullis;'), $toCharArray('Beta;'), $toCharArray('Bfr;'), $toCharArray('Bopf;'), $toCharArray('Breve;'), $toCharArray('Bscr;'), $toCharArray('Bumpeq;'), $toCharArray('CHcy;'), $toCharArray('COPY'), $toCharArray('COPY;'), $toCharArray('Cacute;'), $toCharArray('Cap;'), $toCharArray('CapitalDifferentialD;'), $toCharArray('Cayleys;'), $toCharArray('Ccaron;'), $toCharArray('Ccedil'), $toCharArray('Ccedil;'), $toCharArray('Ccirc;'), $toCharArray('Cconint;'), $toCharArray('Cdot;'), $toCharArray('Cedilla;'), $toCharArray('CenterDot;'), $toCharArray('Cfr;'), $toCharArray('Chi;'), $toCharArray('CircleDot;'), $toCharArray('CircleMinus;'), $toCharArray('CirclePlus;'), $toCharArray('CircleTimes;'), $toCharArray('ClockwiseContourIntegral;'), $toCharArray('CloseCurlyDoubleQuote;'), $toCharArray('CloseCurlyQuote;'), $toCharArray('Colon;'), $toCharArray('Colone;'), $toCharArray('Congruent;'), $toCharArray('Conint;'), $toCharArray('ContourIntegral;'), $toCharArray('Copf;'), $toCharArray('Coproduct;'), $toCharArray('CounterClockwiseContourIntegral;'), $toCharArray('Cross;'), $toCharArray('Cscr;'), $toCharArray('Cup;'), $toCharArray('CupCap;'), $toCharArray('DD;'), $toCharArray('DDotrahd;'), $toCharArray('DJcy;'), $toCharArray('DScy;'), $toCharArray('DZcy;'), $toCharArray('Dagger;'), $toCharArray('Darr;'), $toCharArray('Dashv;'), $toCharArray('Dcaron;'), $toCharArray('Dcy;'), $toCharArray('Del;'), $toCharArray('Delta;'), $toCharArray('Dfr;'), $toCharArray('DiacriticalAcute;'), $toCharArray('DiacriticalDot;'), $toCharArray('DiacriticalDoubleAcute;'), $toCharArray('DiacriticalGrave;'), $toCharArray('DiacriticalTilde;'), $toCharArray('Diamond;'), $toCharArray('DifferentialD;'), $toCharArray('Dopf;'), $toCharArray('Dot;'), $toCharArray('DotDot;'), $toCharArray('DotEqual;'), $toCharArray('DoubleContourIntegral;'), $toCharArray('DoubleDot;'), $toCharArray('DoubleDownArrow;'), $toCharArray('DoubleLeftArrow;'), $toCharArray('DoubleLeftRightArrow;'), $toCharArray('DoubleLeftTee;'), $toCharArray('DoubleLongLeftArrow;'), $toCharArray('DoubleLongLeftRightArrow;'), $toCharArray('DoubleLongRightArrow;'), $toCharArray('DoubleRightArrow;'), $toCharArray('DoubleRightTee;'), $toCharArray('DoubleUpArrow;'), $toCharArray('DoubleUpDownArrow;'), $toCharArray('DoubleVerticalBar;'), $toCharArray('DownArrow;'), $toCharArray('DownArrowBar;'), $toCharArray('DownArrowUpArrow;'), $toCharArray('DownBreve;'), $toCharArray('DownLeftRightVector;'), $toCharArray('DownLeftTeeVector;'), $toCharArray('DownLeftVector;'), $toCharArray('DownLeftVectorBar;'), $toCharArray('DownRightTeeVector;'), $toCharArray('DownRightVector;'), $toCharArray('DownRightVectorBar;'), $toCharArray('DownTee;'), $toCharArray('DownTeeArrow;'), $toCharArray('Downarrow;'), $toCharArray('Dscr;'), $toCharArray('Dstrok;'), $toCharArray('ENG;'), $toCharArray('ETH'), $toCharArray('ETH;'), $toCharArray('Eacute'), $toCharArray('Eacute;'), $toCharArray('Ecaron;'), $toCharArray('Ecirc'), $toCharArray('Ecirc;'), $toCharArray('Ecy;'), $toCharArray('Edot;'), $toCharArray('Efr;'), $toCharArray('Egrave'), $toCharArray('Egrave;'), $toCharArray('Element;'), $toCharArray('Emacr;'), $toCharArray('EmptySmallSquare;'), $toCharArray('EmptyVerySmallSquare;'), $toCharArray('Eogon;'), $toCharArray('Eopf;'), $toCharArray('Epsilon;'), $toCharArray('Equal;'), $toCharArray('EqualTilde;'), $toCharArray('Equilibrium;'), $toCharArray('Escr;'), $toCharArray('Esim;'), $toCharArray('Eta;'), $toCharArray('Euml'), $toCharArray('Euml;'), $toCharArray('Exists;'), $toCharArray('ExponentialE;'), $toCharArray('Fcy;'), $toCharArray('Ffr;'), $toCharArray('FilledSmallSquare;'), $toCharArray('FilledVerySmallSquare;'), $toCharArray('Fopf;'), $toCharArray('ForAll;'), $toCharArray('Fouriertrf;'), $toCharArray('Fscr;'), $toCharArray('GJcy;'), $toCharArray('GT'), $toCharArray('GT;'), $toCharArray('Gamma;'), $toCharArray('Gammad;'), $toCharArray('Gbreve;'), $toCharArray('Gcedil;'), $toCharArray('Gcirc;'), $toCharArray('Gcy;'), $toCharArray('Gdot;'), $toCharArray('Gfr;'), $toCharArray('Gg;'), $toCharArray('Gopf;'), $toCharArray('GreaterEqual;'), $toCharArray('GreaterEqualLess;'), $toCharArray('GreaterFullEqual;'), $toCharArray('GreaterGreater;'), $toCharArray('GreaterLess;'), $toCharArray('GreaterSlantEqual;'), $toCharArray('GreaterTilde;'), $toCharArray('Gscr;'), $toCharArray('Gt;'), $toCharArray('HARDcy;'), $toCharArray('Hacek;'), $toCharArray('Hat;'), $toCharArray('Hcirc;'), $toCharArray('Hfr;'), $toCharArray('HilbertSpace;'), $toCharArray('Hopf;'), $toCharArray('HorizontalLine;'), $toCharArray('Hscr;'), $toCharArray('Hstrok;'), $toCharArray('HumpDownHump;'), $toCharArray('HumpEqual;'), $toCharArray('IEcy;'), $toCharArray('IJlig;'), $toCharArray('IOcy;'), $toCharArray('Iacute'), $toCharArray('Iacute;'), $toCharArray('Icirc'), $toCharArray('Icirc;'), $toCharArray('Icy;'), $toCharArray('Idot;'), $toCharArray('Ifr;'), $toCharArray('Igrave'), $toCharArray('Igrave;'), $toCharArray('Im;'), $toCharArray('Imacr;'), $toCharArray('ImaginaryI;'), $toCharArray('Implies;'), $toCharArray('Int;'), $toCharArray('Integral;'), $toCharArray('Intersection;'), $toCharArray('InvisibleComma;'), $toCharArray('InvisibleTimes;'), $toCharArray('Iogon;'), $toCharArray('Iopf;'), $toCharArray('Iota;'), $toCharArray('Iscr;'), $toCharArray('Itilde;'), $toCharArray('Iukcy;'), $toCharArray('Iuml'), $toCharArray('Iuml;'), $toCharArray('Jcirc;'), $toCharArray('Jcy;'), $toCharArray('Jfr;'), $toCharArray('Jopf;'), $toCharArray('Jscr;'), $toCharArray('Jsercy;'), $toCharArray('Jukcy;'), $toCharArray('KHcy;'), $toCharArray('KJcy;'), $toCharArray('Kappa;'), $toCharArray('Kcedil;'), $toCharArray('Kcy;'), $toCharArray('Kfr;'), $toCharArray('Kopf;'), $toCharArray('Kscr;'), $toCharArray('LJcy;'), $toCharArray('LT'), $toCharArray('LT;'), $toCharArray('Lacute;'), $toCharArray('Lambda;'), $toCharArray('Lang;'), $toCharArray('Laplacetrf;'), $toCharArray('Larr;'), $toCharArray('Lcaron;'), $toCharArray('Lcedil;'), $toCharArray('Lcy;'), $toCharArray('LeftAngleBracket;'), $toCharArray('LeftArrow;'), $toCharArray('LeftArrowBar;'), $toCharArray('LeftArrowRightArrow;'), $toCharArray('LeftCeiling;'), $toCharArray('LeftDoubleBracket;'), $toCharArray('LeftDownTeeVector;'), $toCharArray('LeftDownVector;'), $toCharArray('LeftDownVectorBar;'), $toCharArray('LeftFloor;'), $toCharArray('LeftRightArrow;'), $toCharArray('LeftRightVector;'), $toCharArray('LeftTee;'), $toCharArray('LeftTeeArrow;'), $toCharArray('LeftTeeVector;'), $toCharArray('LeftTriangle;'), $toCharArray('LeftTriangleBar;'), $toCharArray('LeftTriangleEqual;'), $toCharArray('LeftUpDownVector;'), $toCharArray('LeftUpTeeVector;'), $toCharArray('LeftUpVector;'), $toCharArray('LeftUpVectorBar;'), $toCharArray('LeftVector;'), $toCharArray('LeftVectorBar;'), $toCharArray('Leftarrow;'), $toCharArray('Leftrightarrow;'), $toCharArray('LessEqualGreater;'), $toCharArray('LessFullEqual;'), $toCharArray('LessGreater;'), $toCharArray('LessLess;'), $toCharArray('LessSlantEqual;'), $toCharArray('LessTilde;'), $toCharArray('Lfr;'), $toCharArray('Ll;'), $toCharArray('Lleftarrow;'), $toCharArray('Lmidot;'), $toCharArray('LongLeftArrow;'), $toCharArray('LongLeftRightArrow;'), $toCharArray('LongRightArrow;'), $toCharArray('Longleftarrow;'), $toCharArray('Longleftrightarrow;'), $toCharArray('Longrightarrow;'), $toCharArray('Lopf;'), $toCharArray('LowerLeftArrow;'), $toCharArray('LowerRightArrow;'), $toCharArray('Lscr;'), $toCharArray('Lsh;'), $toCharArray('Lstrok;'), $toCharArray('Lt;'), $toCharArray('Map;'), $toCharArray('Mcy;'), $toCharArray('MediumSpace;'), $toCharArray('Mellintrf;'), $toCharArray('Mfr;'), $toCharArray('MinusPlus;'), $toCharArray('Mopf;'), $toCharArray('Mscr;'), $toCharArray('Mu;'), $toCharArray('NJcy;'), $toCharArray('Nacute;'), $toCharArray('Ncaron;'), $toCharArray('Ncedil;'), $toCharArray('Ncy;'), $toCharArray('NegativeMediumSpace;'), $toCharArray('NegativeThickSpace;'), $toCharArray('NegativeThinSpace;'), $toCharArray('NegativeVeryThinSpace;'), $toCharArray('NestedGreaterGreater;'), $toCharArray('NestedLessLess;'), $toCharArray('NewLine;'), $toCharArray('Nfr;'), $toCharArray('NoBreak;'), $toCharArray('NonBreakingSpace;'), $toCharArray('Nopf;'), $toCharArray('Not;'), $toCharArray('NotCongruent;'), $toCharArray('NotCupCap;'), $toCharArray('NotDoubleVerticalBar;'), $toCharArray('NotElement;'), $toCharArray('NotEqual;'), $toCharArray('NotExists;'), $toCharArray('NotGreater;'), $toCharArray('NotGreaterEqual;'), $toCharArray('NotGreaterLess;'), $toCharArray('NotGreaterTilde;'), $toCharArray('NotLeftTriangle;'), $toCharArray('NotLeftTriangleEqual;'), $toCharArray('NotLess;'), $toCharArray('NotLessEqual;'), $toCharArray('NotLessGreater;'), $toCharArray('NotLessTilde;'), $toCharArray('NotPrecedes;'), $toCharArray('NotPrecedesSlantEqual;'), $toCharArray('NotReverseElement;'), $toCharArray('NotRightTriangle;'), $toCharArray('NotRightTriangleEqual;'), $toCharArray('NotSquareSubsetEqual;'), $toCharArray('NotSquareSupersetEqual;'), $toCharArray('NotSubsetEqual;'), $toCharArray('NotSucceeds;'), $toCharArray('NotSucceedsSlantEqual;'), $toCharArray('NotSupersetEqual;'), $toCharArray('NotTilde;'), $toCharArray('NotTildeEqual;'), $toCharArray('NotTildeFullEqual;'), $toCharArray('NotTildeTilde;'), $toCharArray('NotVerticalBar;'), $toCharArray('Nscr;'), $toCharArray('Ntilde'), $toCharArray('Ntilde;'), $toCharArray('Nu;'), $toCharArray('OElig;'), $toCharArray('Oacute'), $toCharArray('Oacute;'), $toCharArray('Ocirc'), $toCharArray('Ocirc;'), $toCharArray('Ocy;'), $toCharArray('Odblac;'), $toCharArray('Ofr;'), $toCharArray('Ograve'), $toCharArray('Ograve;'), $toCharArray('Omacr;'), $toCharArray('Omega;'), $toCharArray('Omicron;'), $toCharArray('Oopf;'), $toCharArray('OpenCurlyDoubleQuote;'), $toCharArray('OpenCurlyQuote;'), $toCharArray('Or;'), $toCharArray('Oscr;'), $toCharArray('Oslash'), $toCharArray('Oslash;'), $toCharArray('Otilde'), $toCharArray('Otilde;'), $toCharArray('Otimes;'), $toCharArray('Ouml'), $toCharArray('Ouml;'), $toCharArray('OverBar;'), $toCharArray('OverBrace;'), $toCharArray('OverBracket;'), $toCharArray('OverParenthesis;'), $toCharArray('PartialD;'), $toCharArray('Pcy;'), $toCharArray('Pfr;'), $toCharArray('Phi;'), $toCharArray('Pi;'), $toCharArray('PlusMinus;'), $toCharArray('Poincareplane;'), $toCharArray('Popf;'), $toCharArray('Pr;'), $toCharArray('Precedes;'), $toCharArray('PrecedesEqual;'), $toCharArray('PrecedesSlantEqual;'), $toCharArray('PrecedesTilde;'), $toCharArray('Prime;'), $toCharArray('Product;'), $toCharArray('Proportion;'), $toCharArray('Proportional;'), $toCharArray('Pscr;'), $toCharArray('Psi;'), $toCharArray('QUOT'), $toCharArray('QUOT;'), $toCharArray('Qfr;'), $toCharArray('Qopf;'), $toCharArray('Qscr;'), $toCharArray('RBarr;'), $toCharArray('REG'), $toCharArray('REG;'), $toCharArray('Racute;'), $toCharArray('Rang;'), $toCharArray('Rarr;'), $toCharArray('Rarrtl;'), $toCharArray('Rcaron;'), $toCharArray('Rcedil;'), $toCharArray('Rcy;'), $toCharArray('Re;'), $toCharArray('ReverseElement;'), $toCharArray('ReverseEquilibrium;'), $toCharArray('ReverseUpEquilibrium;'), $toCharArray('Rfr;'), $toCharArray('Rho;'), $toCharArray('RightAngleBracket;'), $toCharArray('RightArrow;'), $toCharArray('RightArrowBar;'), $toCharArray('RightArrowLeftArrow;'), $toCharArray('RightCeiling;'), $toCharArray('RightDoubleBracket;'), $toCharArray('RightDownTeeVector;'), $toCharArray('RightDownVector;'), $toCharArray('RightDownVectorBar;'), $toCharArray('RightFloor;'), $toCharArray('RightTee;'), $toCharArray('RightTeeArrow;'), $toCharArray('RightTeeVector;'), $toCharArray('RightTriangle;'), $toCharArray('RightTriangleBar;'), $toCharArray('RightTriangleEqual;'), $toCharArray('RightUpDownVector;'), $toCharArray('RightUpTeeVector;'), $toCharArray('RightUpVector;'), $toCharArray('RightUpVectorBar;'), $toCharArray('RightVector;'), $toCharArray('RightVectorBar;'), $toCharArray('Rightarrow;'), $toCharArray('Ropf;'), $toCharArray('RoundImplies;'), $toCharArray('Rrightarrow;'), $toCharArray('Rscr;'), $toCharArray('Rsh;'), $toCharArray('RuleDelayed;'), $toCharArray('SHCHcy;'), $toCharArray('SHcy;'), $toCharArray('SOFTcy;'), $toCharArray('Sacute;'), $toCharArray('Sc;'), $toCharArray('Scaron;'), $toCharArray('Scedil;'), $toCharArray('Scirc;'), $toCharArray('Scy;'), $toCharArray('Sfr;'), $toCharArray('ShortDownArrow;'), $toCharArray('ShortLeftArrow;'), $toCharArray('ShortRightArrow;'), $toCharArray('ShortUpArrow;'), $toCharArray('Sigma;'), $toCharArray('SmallCircle;'), $toCharArray('Sopf;'), $toCharArray('Sqrt;'), $toCharArray('Square;'), $toCharArray('SquareIntersection;'), $toCharArray('SquareSubset;'), $toCharArray('SquareSubsetEqual;'), $toCharArray('SquareSuperset;'), $toCharArray('SquareSupersetEqual;'), $toCharArray('SquareUnion;'), $toCharArray('Sscr;'), $toCharArray('Star;'), $toCharArray('Sub;'), $toCharArray('Subset;'), $toCharArray('SubsetEqual;'), $toCharArray('Succeeds;'), $toCharArray('SucceedsEqual;'), $toCharArray('SucceedsSlantEqual;'), $toCharArray('SucceedsTilde;'), $toCharArray('SuchThat;'), $toCharArray('Sum;'), $toCharArray('Sup;'), $toCharArray('Superset;'), $toCharArray('SupersetEqual;'), $toCharArray('Supset;'), $toCharArray('THORN'), $toCharArray('THORN;'), $toCharArray('TRADE;'), $toCharArray('TSHcy;'), $toCharArray('TScy;'), $toCharArray('Tab;'), $toCharArray('Tau;'), $toCharArray('Tcaron;'), $toCharArray('Tcedil;'), $toCharArray('Tcy;'), $toCharArray('Tfr;'), $toCharArray('Therefore;'), $toCharArray('Theta;'), $toCharArray('ThinSpace;'), $toCharArray('Tilde;'), $toCharArray('TildeEqual;'), $toCharArray('TildeFullEqual;'), $toCharArray('TildeTilde;'), $toCharArray('Topf;'), $toCharArray('TripleDot;'), $toCharArray('Tscr;'), $toCharArray('Tstrok;'), $toCharArray('Uacute'), $toCharArray('Uacute;'), $toCharArray('Uarr;'), $toCharArray('Uarrocir;'), $toCharArray('Ubrcy;'), $toCharArray('Ubreve;'), $toCharArray('Ucirc'), $toCharArray('Ucirc;'), $toCharArray('Ucy;'), $toCharArray('Udblac;'), $toCharArray('Ufr;'), $toCharArray('Ugrave'), $toCharArray('Ugrave;'), $toCharArray('Umacr;'), $toCharArray('UnderBar;'), $toCharArray('UnderBrace;'), $toCharArray('UnderBracket;'), $toCharArray('UnderParenthesis;'), $toCharArray('Union;'), $toCharArray('UnionPlus;'), $toCharArray('Uogon;'), $toCharArray('Uopf;'), $toCharArray('UpArrow;'), $toCharArray('UpArrowBar;'), $toCharArray('UpArrowDownArrow;'), $toCharArray('UpDownArrow;'), $toCharArray('UpEquilibrium;'), $toCharArray('UpTee;'), $toCharArray('UpTeeArrow;'), $toCharArray('Uparrow;'), $toCharArray('Updownarrow;'), $toCharArray('UpperLeftArrow;'), $toCharArray('UpperRightArrow;'), $toCharArray('Upsi;'), $toCharArray('Upsilon;'), $toCharArray('Uring;'), $toCharArray('Uscr;'), $toCharArray('Utilde;'), $toCharArray('Uuml'), $toCharArray('Uuml;'), $toCharArray('VDash;'), $toCharArray('Vbar;'), $toCharArray('Vcy;'), $toCharArray('Vdash;'), $toCharArray('Vdashl;'), $toCharArray('Vee;'), $toCharArray('Verbar;'), $toCharArray('Vert;'), $toCharArray('VerticalBar;'), $toCharArray('VerticalLine;'), $toCharArray('VerticalSeparator;'), $toCharArray('VerticalTilde;'), $toCharArray('VeryThinSpace;'), $toCharArray('Vfr;'), $toCharArray('Vopf;'), $toCharArray('Vscr;'), $toCharArray('Vvdash;'), $toCharArray('Wcirc;'), $toCharArray('Wedge;'), $toCharArray('Wfr;'), $toCharArray('Wopf;'), $toCharArray('Wscr;'), $toCharArray('Xfr;'), $toCharArray('Xi;'), $toCharArray('Xopf;'), $toCharArray('Xscr;'), $toCharArray('YAcy;'), $toCharArray('YIcy;'), $toCharArray('YUcy;'), $toCharArray('Yacute'), $toCharArray('Yacute;'), $toCharArray('Ycirc;'), $toCharArray('Ycy;'), $toCharArray('Yfr;'), $toCharArray('Yopf;'), $toCharArray('Yscr;'), $toCharArray('Yuml;'), $toCharArray('ZHcy;'), $toCharArray('Zacute;'), $toCharArray('Zcaron;'), $toCharArray('Zcy;'), $toCharArray('Zdot;'), $toCharArray('ZeroWidthSpace;'), $toCharArray('Zeta;'), $toCharArray('Zfr;'), $toCharArray('Zopf;'), $toCharArray('Zscr;'), $toCharArray('aacute'), $toCharArray('aacute;'), $toCharArray('abreve;'), $toCharArray('ac;'), $toCharArray('acd;'), $toCharArray('acirc'), $toCharArray('acirc;'), $toCharArray('acute'), $toCharArray('acute;'), $toCharArray('acy;'), $toCharArray('aelig'), $toCharArray('aelig;'), $toCharArray('af;'), $toCharArray('afr;'), $toCharArray('agrave'), $toCharArray('agrave;'), $toCharArray('alefsym;'), $toCharArray('aleph;'), $toCharArray('alpha;'), $toCharArray('amacr;'), $toCharArray('amalg;'), $toCharArray('amp'), $toCharArray('amp;'), $toCharArray('and;'), $toCharArray('andand;'), $toCharArray('andd;'), $toCharArray('andslope;'), $toCharArray('andv;'), $toCharArray('ang;'), $toCharArray('ange;'), $toCharArray('angle;'), $toCharArray('angmsd;'), $toCharArray('angmsdaa;'), $toCharArray('angmsdab;'), $toCharArray('angmsdac;'), $toCharArray('angmsdad;'), $toCharArray('angmsdae;'), $toCharArray('angmsdaf;'), $toCharArray('angmsdag;'), $toCharArray('angmsdah;'), $toCharArray('angrt;'), $toCharArray('angrtvb;'), $toCharArray('angrtvbd;'), $toCharArray('angsph;'), $toCharArray('angst;'), $toCharArray('angzarr;'), $toCharArray('aogon;'), $toCharArray('aopf;'), $toCharArray('ap;'), $toCharArray('apE;'), $toCharArray('apacir;'), $toCharArray('ape;'), $toCharArray('apid;'), $toCharArray('apos;'), $toCharArray('approx;'), $toCharArray('approxeq;'), $toCharArray('aring'), $toCharArray('aring;'), $toCharArray('ascr;'), $toCharArray('ast;'), $toCharArray('asymp;'), $toCharArray('asympeq;'), $toCharArray('atilde'), $toCharArray('atilde;'), $toCharArray('auml'), $toCharArray('auml;'), $toCharArray('awconint;'), $toCharArray('awint;'), $toCharArray('bNot;'), $toCharArray('backcong;'), $toCharArray('backepsilon;'), $toCharArray('backprime;'), $toCharArray('backsim;'), $toCharArray('backsimeq;'), $toCharArray('barvee;'), $toCharArray('barwed;'), $toCharArray('barwedge;'), $toCharArray('bbrk;'), $toCharArray('bbrktbrk;'), $toCharArray('bcong;'), $toCharArray('bcy;'), $toCharArray('bdquo;'), $toCharArray('becaus;'), $toCharArray('because;'), $toCharArray('bemptyv;'), $toCharArray('bepsi;'), $toCharArray('bernou;'), $toCharArray('beta;'), $toCharArray('beth;'), $toCharArray('between;'), $toCharArray('bfr;'), $toCharArray('bigcap;'), $toCharArray('bigcirc;'), $toCharArray('bigcup;'), $toCharArray('bigodot;'), $toCharArray('bigoplus;'), $toCharArray('bigotimes;'), $toCharArray('bigsqcup;'), $toCharArray('bigstar;'), $toCharArray('bigtriangledown;'), $toCharArray('bigtriangleup;'), $toCharArray('biguplus;'), $toCharArray('bigvee;'), $toCharArray('bigwedge;'), $toCharArray('bkarow;'), $toCharArray('blacklozenge;'), $toCharArray('blacksquare;'), $toCharArray('blacktriangle;'), $toCharArray('blacktriangledown;'), $toCharArray('blacktriangleleft;'), $toCharArray('blacktriangleright;'), $toCharArray('blank;'), $toCharArray('blk12;'), $toCharArray('blk14;'), $toCharArray('blk34;'), $toCharArray('block;'), $toCharArray('bnot;'), $toCharArray('bopf;'), $toCharArray('bot;'), $toCharArray('bottom;'), $toCharArray('bowtie;'), $toCharArray('boxDL;'), $toCharArray('boxDR;'), $toCharArray('boxDl;'), $toCharArray('boxDr;'), $toCharArray('boxH;'), $toCharArray('boxHD;'), $toCharArray('boxHU;'), $toCharArray('boxHd;'), $toCharArray('boxHu;'), $toCharArray('boxUL;'), $toCharArray('boxUR;'), $toCharArray('boxUl;'), $toCharArray('boxUr;'), $toCharArray('boxV;'), $toCharArray('boxVH;'), $toCharArray('boxVL;'), $toCharArray('boxVR;'), $toCharArray('boxVh;'), $toCharArray('boxVl;'), $toCharArray('boxVr;'), $toCharArray('boxbox;'), $toCharArray('boxdL;'), $toCharArray('boxdR;'), $toCharArray('boxdl;'), $toCharArray('boxdr;'), $toCharArray('boxh;'), $toCharArray('boxhD;'), $toCharArray('boxhU;'), $toCharArray('boxhd;'), $toCharArray('boxhu;'), $toCharArray('boxminus;'), $toCharArray('boxplus;'), $toCharArray('boxtimes;'), $toCharArray('boxuL;'), $toCharArray('boxuR;'), $toCharArray('boxul;'), $toCharArray('boxur;'), $toCharArray('boxv;'), $toCharArray('boxvH;'), $toCharArray('boxvL;'), $toCharArray('boxvR;'), $toCharArray('boxvh;'), $toCharArray('boxvl;'), $toCharArray('boxvr;'), $toCharArray('bprime;'), $toCharArray('breve;'), $toCharArray('brvbar'), $toCharArray('brvbar;'), $toCharArray('bscr;'), $toCharArray('bsemi;'), $toCharArray('bsim;'), $toCharArray('bsime;'), $toCharArray('bsol;'), $toCharArray('bsolb;'), $toCharArray('bull;'), $toCharArray('bullet;'), $toCharArray('bump;'), $toCharArray('bumpE;'), $toCharArray('bumpe;'), $toCharArray('bumpeq;'), $toCharArray('cacute;'), $toCharArray('cap;'), $toCharArray('capand;'), $toCharArray('capbrcup;'), $toCharArray('capcap;'), $toCharArray('capcup;'), $toCharArray('capdot;'), $toCharArray('caret;'), $toCharArray('caron;'), $toCharArray('ccaps;'), $toCharArray('ccaron;'), $toCharArray('ccedil'), $toCharArray('ccedil;'), $toCharArray('ccirc;'), $toCharArray('ccups;'), $toCharArray('ccupssm;'), $toCharArray('cdot;'), $toCharArray('cedil'), $toCharArray('cedil;'), $toCharArray('cemptyv;'), $toCharArray('cent'), $toCharArray('cent;'), $toCharArray('centerdot;'), $toCharArray('cfr;'), $toCharArray('chcy;'), $toCharArray('check;'), $toCharArray('checkmark;'), $toCharArray('chi;'), $toCharArray('cir;'), $toCharArray('cirE;'), $toCharArray('circ;'), $toCharArray('circeq;'), $toCharArray('circlearrowleft;'), $toCharArray('circlearrowright;'), $toCharArray('circledR;'), $toCharArray('circledS;'), $toCharArray('circledast;'), $toCharArray('circledcirc;'), $toCharArray('circleddash;'), $toCharArray('cire;'), $toCharArray('cirfnint;'), $toCharArray('cirmid;'), $toCharArray('cirscir;'), $toCharArray('clubs;'), $toCharArray('clubsuit;'), $toCharArray('colon;'), $toCharArray('colone;'), $toCharArray('coloneq;'), $toCharArray('comma;'), $toCharArray('commat;'), $toCharArray('comp;'), $toCharArray('compfn;'), $toCharArray('complement;'), $toCharArray('complexes;'), $toCharArray('cong;'), $toCharArray('congdot;'), $toCharArray('conint;'), $toCharArray('copf;'), $toCharArray('coprod;'), $toCharArray('copy'), $toCharArray('copy;'), $toCharArray('copysr;'), $toCharArray('crarr;'), $toCharArray('cross;'), $toCharArray('cscr;'), $toCharArray('csub;'), $toCharArray('csube;'), $toCharArray('csup;'), $toCharArray('csupe;'), $toCharArray('ctdot;'), $toCharArray('cudarrl;'), $toCharArray('cudarrr;'), $toCharArray('cuepr;'), $toCharArray('cuesc;'), $toCharArray('cularr;'), $toCharArray('cularrp;'), $toCharArray('cup;'), $toCharArray('cupbrcap;'), $toCharArray('cupcap;'), $toCharArray('cupcup;'), $toCharArray('cupdot;'), $toCharArray('cupor;'), $toCharArray('curarr;'), $toCharArray('curarrm;'), $toCharArray('curlyeqprec;'), $toCharArray('curlyeqsucc;'), $toCharArray('curlyvee;'), $toCharArray('curlywedge;'), $toCharArray('curren'), $toCharArray('curren;'), $toCharArray('curvearrowleft;'), $toCharArray('curvearrowright;'), $toCharArray('cuvee;'), $toCharArray('cuwed;'), $toCharArray('cwconint;'), $toCharArray('cwint;'), $toCharArray('cylcty;'), $toCharArray('dArr;'), $toCharArray('dHar;'), $toCharArray('dagger;'), $toCharArray('daleth;'), $toCharArray('darr;'), $toCharArray('dash;'), $toCharArray('dashv;'), $toCharArray('dbkarow;'), $toCharArray('dblac;'), $toCharArray('dcaron;'), $toCharArray('dcy;'), $toCharArray('dd;'), $toCharArray('ddagger;'), $toCharArray('ddarr;'), $toCharArray('ddotseq;'), $toCharArray('deg'), $toCharArray('deg;'), $toCharArray('delta;'), $toCharArray('demptyv;'), $toCharArray('dfisht;'), $toCharArray('dfr;'), $toCharArray('dharl;'), $toCharArray('dharr;'), $toCharArray('diam;'), $toCharArray('diamond;'), $toCharArray('diamondsuit;'), $toCharArray('diams;'), $toCharArray('die;'), $toCharArray('digamma;'), $toCharArray('disin;'), $toCharArray('div;'), $toCharArray('divide'), $toCharArray('divide;'), $toCharArray('divideontimes;'), $toCharArray('divonx;'), $toCharArray('djcy;'), $toCharArray('dlcorn;'), $toCharArray('dlcrop;'), $toCharArray('dollar;'), $toCharArray('dopf;'), $toCharArray('dot;'), $toCharArray('doteq;'), $toCharArray('doteqdot;'), $toCharArray('dotminus;'), $toCharArray('dotplus;'), $toCharArray('dotsquare;'), $toCharArray('doublebarwedge;'), $toCharArray('downarrow;'), $toCharArray('downdownarrows;'), $toCharArray('downharpoonleft;'), $toCharArray('downharpoonright;'), $toCharArray('drbkarow;'), $toCharArray('drcorn;'), $toCharArray('drcrop;'), $toCharArray('dscr;'), $toCharArray('dscy;'), $toCharArray('dsol;'), $toCharArray('dstrok;'), $toCharArray('dtdot;'), $toCharArray('dtri;'), $toCharArray('dtrif;'), $toCharArray('duarr;'), $toCharArray('duhar;'), $toCharArray('dwangle;'), $toCharArray('dzcy;'), $toCharArray('dzigrarr;'), $toCharArray('eDDot;'), $toCharArray('eDot;'), $toCharArray('eacute'), $toCharArray('eacute;'), $toCharArray('easter;'), $toCharArray('ecaron;'), $toCharArray('ecir;'), $toCharArray('ecirc'), $toCharArray('ecirc;'), $toCharArray('ecolon;'), $toCharArray('ecy;'), $toCharArray('edot;'), $toCharArray('ee;'), $toCharArray('efDot;'), $toCharArray('efr;'), $toCharArray('eg;'), $toCharArray('egrave'), $toCharArray('egrave;'), $toCharArray('egs;'), $toCharArray('egsdot;'), $toCharArray('el;'), $toCharArray('elinters;'), $toCharArray('ell;'), $toCharArray('els;'), $toCharArray('elsdot;'), $toCharArray('emacr;'), $toCharArray('empty;'), $toCharArray('emptyset;'), $toCharArray('emptyv;'), $toCharArray('emsp13;'), $toCharArray('emsp14;'), $toCharArray('emsp;'), $toCharArray('eng;'), $toCharArray('ensp;'), $toCharArray('eogon;'), $toCharArray('eopf;'), $toCharArray('epar;'), $toCharArray('eparsl;'), $toCharArray('eplus;'), $toCharArray('epsi;'), $toCharArray('epsilon;'), $toCharArray('epsiv;'), $toCharArray('eqcirc;'), $toCharArray('eqcolon;'), $toCharArray('eqsim;'), $toCharArray('eqslantgtr;'), $toCharArray('eqslantless;'), $toCharArray('equals;'), $toCharArray('equest;'), $toCharArray('equiv;'), $toCharArray('equivDD;'), $toCharArray('eqvparsl;'), $toCharArray('erDot;'), $toCharArray('erarr;'), $toCharArray('escr;'), $toCharArray('esdot;'), $toCharArray('esim;'), $toCharArray('eta;'), $toCharArray('eth'), $toCharArray('eth;'), $toCharArray('euml'), $toCharArray('euml;'), $toCharArray('euro;'), $toCharArray('excl;'), $toCharArray('exist;'), $toCharArray('expectation;'), $toCharArray('exponentiale;'), $toCharArray('fallingdotseq;'), $toCharArray('fcy;'), $toCharArray('female;'), $toCharArray('ffilig;'), $toCharArray('fflig;'), $toCharArray('ffllig;'), $toCharArray('ffr;'), $toCharArray('filig;'), $toCharArray('flat;'), $toCharArray('fllig;'), $toCharArray('fltns;'), $toCharArray('fnof;'), $toCharArray('fopf;'), $toCharArray('forall;'), $toCharArray('fork;'), $toCharArray('forkv;'), $toCharArray('fpartint;'), $toCharArray('frac12'), $toCharArray('frac12;'), $toCharArray('frac13;'), $toCharArray('frac14'), $toCharArray('frac14;'), $toCharArray('frac15;'), $toCharArray('frac16;'), $toCharArray('frac18;'), $toCharArray('frac23;'), $toCharArray('frac25;'), $toCharArray('frac34'), $toCharArray('frac34;'), $toCharArray('frac35;'), $toCharArray('frac38;'), $toCharArray('frac45;'), $toCharArray('frac56;'), $toCharArray('frac58;'), $toCharArray('frac78;'), $toCharArray('frasl;'), $toCharArray('frown;'), $toCharArray('fscr;'), $toCharArray('gE;'), $toCharArray('gEl;'), $toCharArray('gacute;'), $toCharArray('gamma;'), $toCharArray('gammad;'), $toCharArray('gap;'), $toCharArray('gbreve;'), $toCharArray('gcirc;'), $toCharArray('gcy;'), $toCharArray('gdot;'), $toCharArray('ge;'), $toCharArray('gel;'), $toCharArray('geq;'), $toCharArray('geqq;'), $toCharArray('geqslant;'), $toCharArray('ges;'), $toCharArray('gescc;'), $toCharArray('gesdot;'), $toCharArray('gesdoto;'), $toCharArray('gesdotol;'), $toCharArray('gesles;'), $toCharArray('gfr;'), $toCharArray('gg;'), $toCharArray('ggg;'), $toCharArray('gimel;'), $toCharArray('gjcy;'), $toCharArray('gl;'), $toCharArray('glE;'), $toCharArray('gla;'), $toCharArray('glj;'), $toCharArray('gnE;'), $toCharArray('gnap;'), $toCharArray('gnapprox;'), $toCharArray('gne;'), $toCharArray('gneq;'), $toCharArray('gneqq;'), $toCharArray('gnsim;'), $toCharArray('gopf;'), $toCharArray('grave;'), $toCharArray('gscr;'), $toCharArray('gsim;'), $toCharArray('gsime;'), $toCharArray('gsiml;'), $toCharArray('gt'), $toCharArray('gt;'), $toCharArray('gtcc;'), $toCharArray('gtcir;'), $toCharArray('gtdot;'), $toCharArray('gtlPar;'), $toCharArray('gtquest;'), $toCharArray('gtrapprox;'), $toCharArray('gtrarr;'), $toCharArray('gtrdot;'), $toCharArray('gtreqless;'), $toCharArray('gtreqqless;'), $toCharArray('gtrless;'), $toCharArray('gtrsim;'), $toCharArray('hArr;'), $toCharArray('hairsp;'), $toCharArray('half;'), $toCharArray('hamilt;'), $toCharArray('hardcy;'), $toCharArray('harr;'), $toCharArray('harrcir;'), $toCharArray('harrw;'), $toCharArray('hbar;'), $toCharArray('hcirc;'), $toCharArray('hearts;'), $toCharArray('heartsuit;'), $toCharArray('hellip;'), $toCharArray('hercon;'), $toCharArray('hfr;'), $toCharArray('hksearow;'), $toCharArray('hkswarow;'), $toCharArray('hoarr;'), $toCharArray('homtht;'), $toCharArray('hookleftarrow;'), $toCharArray('hookrightarrow;'), $toCharArray('hopf;'), $toCharArray('horbar;'), $toCharArray('hscr;'), $toCharArray('hslash;'), $toCharArray('hstrok;'), $toCharArray('hybull;'), $toCharArray('hyphen;'), $toCharArray('iacute'), $toCharArray('iacute;'), $toCharArray('ic;'), $toCharArray('icirc'), $toCharArray('icirc;'), $toCharArray('icy;'), $toCharArray('iecy;'), $toCharArray('iexcl'), $toCharArray('iexcl;'), $toCharArray('iff;'), $toCharArray('ifr;'), $toCharArray('igrave'), $toCharArray('igrave;'), $toCharArray('ii;'), $toCharArray('iiiint;'), $toCharArray('iiint;'), $toCharArray('iinfin;'), $toCharArray('iiota;'), $toCharArray('ijlig;'), $toCharArray('imacr;'), $toCharArray('image;'), $toCharArray('imagline;'), $toCharArray('imagpart;'), $toCharArray('imath;'), $toCharArray('imof;'), $toCharArray('imped;'), $toCharArray('in;'), $toCharArray('incare;'), $toCharArray('infin;'), $toCharArray('infintie;'), $toCharArray('inodot;'), $toCharArray('int;'), $toCharArray('intcal;'), $toCharArray('integers;'), $toCharArray('intercal;'), $toCharArray('intlarhk;'), $toCharArray('intprod;'), $toCharArray('iocy;'), $toCharArray('iogon;'), $toCharArray('iopf;'), $toCharArray('iota;'), $toCharArray('iprod;'), $toCharArray('iquest'), $toCharArray('iquest;'), $toCharArray('iscr;'), $toCharArray('isin;'), $toCharArray('isinE;'), $toCharArray('isindot;'), $toCharArray('isins;'), $toCharArray('isinsv;'), $toCharArray('isinv;'), $toCharArray('it;'), $toCharArray('itilde;'), $toCharArray('iukcy;'), $toCharArray('iuml'), $toCharArray('iuml;'), $toCharArray('jcirc;'), $toCharArray('jcy;'), $toCharArray('jfr;'), $toCharArray('jmath;'), $toCharArray('jopf;'), $toCharArray('jscr;'), $toCharArray('jsercy;'), $toCharArray('jukcy;'), $toCharArray('kappa;'), $toCharArray('kappav;'), $toCharArray('kcedil;'), $toCharArray('kcy;'), $toCharArray('kfr;'), $toCharArray('kgreen;'), $toCharArray('khcy;'), $toCharArray('kjcy;'), $toCharArray('kopf;'), $toCharArray('kscr;'), $toCharArray('lAarr;'), $toCharArray('lArr;'), $toCharArray('lAtail;'), $toCharArray('lBarr;'), $toCharArray('lE;'), $toCharArray('lEg;'), $toCharArray('lHar;'), $toCharArray('lacute;'), $toCharArray('laemptyv;'), $toCharArray('lagran;'), $toCharArray('lambda;'), $toCharArray('lang;'), $toCharArray('langd;'), $toCharArray('langle;'), $toCharArray('lap;'), $toCharArray('laquo'), $toCharArray('laquo;'), $toCharArray('larr;'), $toCharArray('larrb;'), $toCharArray('larrbfs;'), $toCharArray('larrfs;'), $toCharArray('larrhk;'), $toCharArray('larrlp;'), $toCharArray('larrpl;'), $toCharArray('larrsim;'), $toCharArray('larrtl;'), $toCharArray('lat;'), $toCharArray('latail;'), $toCharArray('late;'), $toCharArray('lbarr;'), $toCharArray('lbbrk;'), $toCharArray('lbrace;'), $toCharArray('lbrack;'), $toCharArray('lbrke;'), $toCharArray('lbrksld;'), $toCharArray('lbrkslu;'), $toCharArray('lcaron;'), $toCharArray('lcedil;'), $toCharArray('lceil;'), $toCharArray('lcub;'), $toCharArray('lcy;'), $toCharArray('ldca;'), $toCharArray('ldquo;'), $toCharArray('ldquor;'), $toCharArray('ldrdhar;'), $toCharArray('ldrushar;'), $toCharArray('ldsh;'), $toCharArray('le;'), $toCharArray('leftarrow;'), $toCharArray('leftarrowtail;'), $toCharArray('leftharpoondown;'), $toCharArray('leftharpoonup;'), $toCharArray('leftleftarrows;'), $toCharArray('leftrightarrow;'), $toCharArray('leftrightarrows;'), $toCharArray('leftrightharpoons;'), $toCharArray('leftrightsquigarrow;'), $toCharArray('leftthreetimes;'), $toCharArray('leg;'), $toCharArray('leq;'), $toCharArray('leqq;'), $toCharArray('leqslant;'), $toCharArray('les;'), $toCharArray('lescc;'), $toCharArray('lesdot;'), $toCharArray('lesdoto;'), $toCharArray('lesdotor;'), $toCharArray('lesges;'), $toCharArray('lessapprox;'), $toCharArray('lessdot;'), $toCharArray('lesseqgtr;'), $toCharArray('lesseqqgtr;'), $toCharArray('lessgtr;'), $toCharArray('lesssim;'), $toCharArray('lfisht;'), $toCharArray('lfloor;'), $toCharArray('lfr;'), $toCharArray('lg;'), $toCharArray('lgE;'), $toCharArray('lhard;'), $toCharArray('lharu;'), $toCharArray('lharul;'), $toCharArray('lhblk;'), $toCharArray('ljcy;'), $toCharArray('ll;'), $toCharArray('llarr;'), $toCharArray('llcorner;'), $toCharArray('llhard;'), $toCharArray('lltri;'), $toCharArray('lmidot;'), $toCharArray('lmoust;'), $toCharArray('lmoustache;'), $toCharArray('lnE;'), $toCharArray('lnap;'), $toCharArray('lnapprox;'), $toCharArray('lne;'), $toCharArray('lneq;'), $toCharArray('lneqq;'), $toCharArray('lnsim;'), $toCharArray('loang;'), $toCharArray('loarr;'), $toCharArray('lobrk;'), $toCharArray('longleftarrow;'), $toCharArray('longleftrightarrow;'), $toCharArray('longmapsto;'), $toCharArray('longrightarrow;'), $toCharArray('looparrowleft;'), $toCharArray('looparrowright;'), $toCharArray('lopar;'), $toCharArray('lopf;'), $toCharArray('loplus;'), $toCharArray('lotimes;'), $toCharArray('lowast;'), $toCharArray('lowbar;'), $toCharArray('loz;'), $toCharArray('lozenge;'), $toCharArray('lozf;'), $toCharArray('lpar;'), $toCharArray('lparlt;'), $toCharArray('lrarr;'), $toCharArray('lrcorner;'), $toCharArray('lrhar;'), $toCharArray('lrhard;'), $toCharArray('lrm;'), $toCharArray('lrtri;'), $toCharArray('lsaquo;'), $toCharArray('lscr;'), $toCharArray('lsh;'), $toCharArray('lsim;'), $toCharArray('lsime;'), $toCharArray('lsimg;'), $toCharArray('lsqb;'), $toCharArray('lsquo;'), $toCharArray('lsquor;'), $toCharArray('lstrok;'), $toCharArray('lt'), $toCharArray('lt;'), $toCharArray('ltcc;'), $toCharArray('ltcir;'), $toCharArray('ltdot;'), $toCharArray('lthree;'), $toCharArray('ltimes;'), $toCharArray('ltlarr;'), $toCharArray('ltquest;'), $toCharArray('ltrPar;'), $toCharArray('ltri;'), $toCharArray('ltrie;'), $toCharArray('ltrif;'), $toCharArray('lurdshar;'), $toCharArray('luruhar;'), $toCharArray('mDDot;'), $toCharArray('macr'), $toCharArray('macr;'), $toCharArray('male;'), $toCharArray('malt;'), $toCharArray('maltese;'), $toCharArray('map;'), $toCharArray('mapsto;'), $toCharArray('mapstodown;'), $toCharArray('mapstoleft;'), $toCharArray('mapstoup;'), $toCharArray('marker;'), $toCharArray('mcomma;'), $toCharArray('mcy;'), $toCharArray('mdash;'), $toCharArray('measuredangle;'), $toCharArray('mfr;'), $toCharArray('mho;'), $toCharArray('micro'), $toCharArray('micro;'), $toCharArray('mid;'), $toCharArray('midast;'), $toCharArray('midcir;'), $toCharArray('middot'), $toCharArray('middot;'), $toCharArray('minus;'), $toCharArray('minusb;'), $toCharArray('minusd;'), $toCharArray('minusdu;'), $toCharArray('mlcp;'), $toCharArray('mldr;'), $toCharArray('mnplus;'), $toCharArray('models;'), $toCharArray('mopf;'), $toCharArray('mp;'), $toCharArray('mscr;'), $toCharArray('mstpos;'), $toCharArray('mu;'), $toCharArray('multimap;'), $toCharArray('mumap;'), $toCharArray('nLeftarrow;'), $toCharArray('nLeftrightarrow;'), $toCharArray('nRightarrow;'), $toCharArray('nVDash;'), $toCharArray('nVdash;'), $toCharArray('nabla;'), $toCharArray('nacute;'), $toCharArray('nap;'), $toCharArray('napos;'), $toCharArray('napprox;'), $toCharArray('natur;'), $toCharArray('natural;'), $toCharArray('naturals;'), $toCharArray('nbsp'), $toCharArray('nbsp;'), $toCharArray('ncap;'), $toCharArray('ncaron;'), $toCharArray('ncedil;'), $toCharArray('ncong;'), $toCharArray('ncup;'), $toCharArray('ncy;'), $toCharArray('ndash;'), $toCharArray('ne;'), $toCharArray('neArr;'), $toCharArray('nearhk;'), $toCharArray('nearr;'), $toCharArray('nearrow;'), $toCharArray('nequiv;'), $toCharArray('nesear;'), $toCharArray('nexist;'), $toCharArray('nexists;'), $toCharArray('nfr;'), $toCharArray('nge;'), $toCharArray('ngeq;'), $toCharArray('ngsim;'), $toCharArray('ngt;'), $toCharArray('ngtr;'), $toCharArray('nhArr;'), $toCharArray('nharr;'), $toCharArray('nhpar;'), $toCharArray('ni;'), $toCharArray('nis;'), $toCharArray('nisd;'), $toCharArray('niv;'), $toCharArray('njcy;'), $toCharArray('nlArr;'), $toCharArray('nlarr;'), $toCharArray('nldr;'), $toCharArray('nle;'), $toCharArray('nleftarrow;'), $toCharArray('nleftrightarrow;'), $toCharArray('nleq;'), $toCharArray('nless;'), $toCharArray('nlsim;'), $toCharArray('nlt;'), $toCharArray('nltri;'), $toCharArray('nltrie;'), $toCharArray('nmid;'), $toCharArray('nopf;'), $toCharArray('not'), $toCharArray('not;'), $toCharArray('notin;'), $toCharArray('notinva;'), $toCharArray('notinvb;'), $toCharArray('notinvc;'), $toCharArray('notni;'), $toCharArray('notniva;'), $toCharArray('notnivb;'), $toCharArray('notnivc;'), $toCharArray('npar;'), $toCharArray('nparallel;'), $toCharArray('npolint;'), $toCharArray('npr;'), $toCharArray('nprcue;'), $toCharArray('nprec;'), $toCharArray('nrArr;'), $toCharArray('nrarr;'), $toCharArray('nrightarrow;'), $toCharArray('nrtri;'), $toCharArray('nrtrie;'), $toCharArray('nsc;'), $toCharArray('nsccue;'), $toCharArray('nscr;'), $toCharArray('nshortmid;'), $toCharArray('nshortparallel;'), $toCharArray('nsim;'), $toCharArray('nsime;'), $toCharArray('nsimeq;'), $toCharArray('nsmid;'), $toCharArray('nspar;'), $toCharArray('nsqsube;'), $toCharArray('nsqsupe;'), $toCharArray('nsub;'), $toCharArray('nsube;'), $toCharArray('nsubseteq;'), $toCharArray('nsucc;'), $toCharArray('nsup;'), $toCharArray('nsupe;'), $toCharArray('nsupseteq;'), $toCharArray('ntgl;'), $toCharArray('ntilde'), $toCharArray('ntilde;'), $toCharArray('ntlg;'), $toCharArray('ntriangleleft;'), $toCharArray('ntrianglelefteq;'), $toCharArray('ntriangleright;'), $toCharArray('ntrianglerighteq;'), $toCharArray('nu;'), $toCharArray('num;'), $toCharArray('numero;'), $toCharArray('numsp;'), $toCharArray('nvDash;'), $toCharArray('nvHarr;'), $toCharArray('nvdash;'), $toCharArray('nvinfin;'), $toCharArray('nvlArr;'), $toCharArray('nvrArr;'), $toCharArray('nwArr;'), $toCharArray('nwarhk;'), $toCharArray('nwarr;'), $toCharArray('nwarrow;'), $toCharArray('nwnear;'), $toCharArray('oS;'), $toCharArray('oacute'), $toCharArray('oacute;'), $toCharArray('oast;'), $toCharArray('ocir;'), $toCharArray('ocirc'), $toCharArray('ocirc;'), $toCharArray('ocy;'), $toCharArray('odash;'), $toCharArray('odblac;'), $toCharArray('odiv;'), $toCharArray('odot;'), $toCharArray('odsold;'), $toCharArray('oelig;'), $toCharArray('ofcir;'), $toCharArray('ofr;'), $toCharArray('ogon;'), $toCharArray('ograve'), $toCharArray('ograve;'), $toCharArray('ogt;'), $toCharArray('ohbar;'), $toCharArray('ohm;'), $toCharArray('oint;'), $toCharArray('olarr;'), $toCharArray('olcir;'), $toCharArray('olcross;'), $toCharArray('oline;'), $toCharArray('olt;'), $toCharArray('omacr;'), $toCharArray('omega;'), $toCharArray('omicron;'), $toCharArray('omid;'), $toCharArray('ominus;'), $toCharArray('oopf;'), $toCharArray('opar;'), $toCharArray('operp;'), $toCharArray('oplus;'), $toCharArray('or;'), $toCharArray('orarr;'), $toCharArray('ord;'), $toCharArray('order;'), $toCharArray('orderof;'), $toCharArray('ordf'), $toCharArray('ordf;'), $toCharArray('ordm'), $toCharArray('ordm;'), $toCharArray('origof;'), $toCharArray('oror;'), $toCharArray('orslope;'), $toCharArray('orv;'), $toCharArray('oscr;'), $toCharArray('oslash'), $toCharArray('oslash;'), $toCharArray('osol;'), $toCharArray('otilde'), $toCharArray('otilde;'), $toCharArray('otimes;'), $toCharArray('otimesas;'), $toCharArray('ouml'), $toCharArray('ouml;'), $toCharArray('ovbar;'), $toCharArray('par;'), $toCharArray('para'), $toCharArray('para;'), $toCharArray('parallel;'), $toCharArray('parsim;'), $toCharArray('parsl;'), $toCharArray('part;'), $toCharArray('pcy;'), $toCharArray('percnt;'), $toCharArray('period;'), $toCharArray('permil;'), $toCharArray('perp;'), $toCharArray('pertenk;'), $toCharArray('pfr;'), $toCharArray('phi;'), $toCharArray('phiv;'), $toCharArray('phmmat;'), $toCharArray('phone;'), $toCharArray('pi;'), $toCharArray('pitchfork;'), $toCharArray('piv;'), $toCharArray('planck;'), $toCharArray('planckh;'), $toCharArray('plankv;'), $toCharArray('plus;'), $toCharArray('plusacir;'), $toCharArray('plusb;'), $toCharArray('pluscir;'), $toCharArray('plusdo;'), $toCharArray('plusdu;'), $toCharArray('pluse;'), $toCharArray('plusmn'), $toCharArray('plusmn;'), $toCharArray('plussim;'), $toCharArray('plustwo;'), $toCharArray('pm;'), $toCharArray('pointint;'), $toCharArray('popf;'), $toCharArray('pound'), $toCharArray('pound;'), $toCharArray('pr;'), $toCharArray('prE;'), $toCharArray('prap;'), $toCharArray('prcue;'), $toCharArray('pre;'), $toCharArray('prec;'), $toCharArray('precapprox;'), $toCharArray('preccurlyeq;'), $toCharArray('preceq;'), $toCharArray('precnapprox;'), $toCharArray('precneqq;'), $toCharArray('precnsim;'), $toCharArray('precsim;'), $toCharArray('prime;'), $toCharArray('primes;'), $toCharArray('prnE;'), $toCharArray('prnap;'), $toCharArray('prnsim;'), $toCharArray('prod;'), $toCharArray('profalar;'), $toCharArray('profline;'), $toCharArray('profsurf;'), $toCharArray('prop;'), $toCharArray('propto;'), $toCharArray('prsim;'), $toCharArray('prurel;'), $toCharArray('pscr;'), $toCharArray('psi;'), $toCharArray('puncsp;'), $toCharArray('qfr;'), $toCharArray('qint;'), $toCharArray('qopf;'), $toCharArray('qprime;'), $toCharArray('qscr;'), $toCharArray('quaternions;'), $toCharArray('quatint;'), $toCharArray('quest;'), $toCharArray('questeq;'), $toCharArray('quot'), $toCharArray('quot;'), $toCharArray('rAarr;'), $toCharArray('rArr;'), $toCharArray('rAtail;'), $toCharArray('rBarr;'), $toCharArray('rHar;'), $toCharArray('race;'), $toCharArray('racute;'), $toCharArray('radic;'), $toCharArray('raemptyv;'), $toCharArray('rang;'), $toCharArray('rangd;'), $toCharArray('range;'), $toCharArray('rangle;'), $toCharArray('raquo'), $toCharArray('raquo;'), $toCharArray('rarr;'), $toCharArray('rarrap;'), $toCharArray('rarrb;'), $toCharArray('rarrbfs;'), $toCharArray('rarrc;'), $toCharArray('rarrfs;'), $toCharArray('rarrhk;'), $toCharArray('rarrlp;'), $toCharArray('rarrpl;'), $toCharArray('rarrsim;'), $toCharArray('rarrtl;'), $toCharArray('rarrw;'), $toCharArray('ratail;'), $toCharArray('ratio;'), $toCharArray('rationals;'), $toCharArray('rbarr;'), $toCharArray('rbbrk;'), $toCharArray('rbrace;'), $toCharArray('rbrack;'), $toCharArray('rbrke;'), $toCharArray('rbrksld;'), $toCharArray('rbrkslu;'), $toCharArray('rcaron;'), $toCharArray('rcedil;'), $toCharArray('rceil;'), $toCharArray('rcub;'), $toCharArray('rcy;'), $toCharArray('rdca;'), $toCharArray('rdldhar;'), $toCharArray('rdquo;'), $toCharArray('rdquor;'), $toCharArray('rdsh;'), $toCharArray('real;'), $toCharArray('realine;'), $toCharArray('realpart;'), $toCharArray('reals;'), $toCharArray('rect;'), $toCharArray('reg'), $toCharArray('reg;'), $toCharArray('rfisht;'), $toCharArray('rfloor;'), $toCharArray('rfr;'), $toCharArray('rhard;'), $toCharArray('rharu;'), $toCharArray('rharul;'), $toCharArray('rho;'), $toCharArray('rhov;'), $toCharArray('rightarrow;'), $toCharArray('rightarrowtail;'), $toCharArray('rightharpoondown;'), $toCharArray('rightharpoonup;'), $toCharArray('rightleftarrows;'), $toCharArray('rightleftharpoons;'), $toCharArray('rightrightarrows;'), $toCharArray('rightsquigarrow;'), $toCharArray('rightthreetimes;'), $toCharArray('ring;'), $toCharArray('risingdotseq;'), $toCharArray('rlarr;'), $toCharArray('rlhar;'), $toCharArray('rlm;'), $toCharArray('rmoust;'), $toCharArray('rmoustache;'), $toCharArray('rnmid;'), $toCharArray('roang;'), $toCharArray('roarr;'), $toCharArray('robrk;'), $toCharArray('ropar;'), $toCharArray('ropf;'), $toCharArray('roplus;'), $toCharArray('rotimes;'), $toCharArray('rpar;'), $toCharArray('rpargt;'), $toCharArray('rppolint;'), $toCharArray('rrarr;'), $toCharArray('rsaquo;'), $toCharArray('rscr;'), $toCharArray('rsh;'), $toCharArray('rsqb;'), $toCharArray('rsquo;'), $toCharArray('rsquor;'), $toCharArray('rthree;'), $toCharArray('rtimes;'), $toCharArray('rtri;'), $toCharArray('rtrie;'), $toCharArray('rtrif;'), $toCharArray('rtriltri;'), $toCharArray('ruluhar;'), $toCharArray('rx;'), $toCharArray('sacute;'), $toCharArray('sbquo;'), $toCharArray('sc;'), $toCharArray('scE;'), $toCharArray('scap;'), $toCharArray('scaron;'), $toCharArray('sccue;'), $toCharArray('sce;'), $toCharArray('scedil;'), $toCharArray('scirc;'), $toCharArray('scnE;'), $toCharArray('scnap;'), $toCharArray('scnsim;'), $toCharArray('scpolint;'), $toCharArray('scsim;'), $toCharArray('scy;'), $toCharArray('sdot;'), $toCharArray('sdotb;'), $toCharArray('sdote;'), $toCharArray('seArr;'), $toCharArray('searhk;'), $toCharArray('searr;'), $toCharArray('searrow;'), $toCharArray('sect'), $toCharArray('sect;'), $toCharArray('semi;'), $toCharArray('seswar;'), $toCharArray('setminus;'), $toCharArray('setmn;'), $toCharArray('sext;'), $toCharArray('sfr;'), $toCharArray('sfrown;'), $toCharArray('sharp;'), $toCharArray('shchcy;'), $toCharArray('shcy;'), $toCharArray('shortmid;'), $toCharArray('shortparallel;'), $toCharArray('shy'), $toCharArray('shy;'), $toCharArray('sigma;'), $toCharArray('sigmaf;'), $toCharArray('sigmav;'), $toCharArray('sim;'), $toCharArray('simdot;'), $toCharArray('sime;'), $toCharArray('simeq;'), $toCharArray('simg;'), $toCharArray('simgE;'), $toCharArray('siml;'), $toCharArray('simlE;'), $toCharArray('simne;'), $toCharArray('simplus;'), $toCharArray('simrarr;'), $toCharArray('slarr;'), $toCharArray('smallsetminus;'), $toCharArray('smashp;'), $toCharArray('smeparsl;'), $toCharArray('smid;'), $toCharArray('smile;'), $toCharArray('smt;'), $toCharArray('smte;'), $toCharArray('softcy;'), $toCharArray('sol;'), $toCharArray('solb;'), $toCharArray('solbar;'), $toCharArray('sopf;'), $toCharArray('spades;'), $toCharArray('spadesuit;'), $toCharArray('spar;'), $toCharArray('sqcap;'), $toCharArray('sqcup;'), $toCharArray('sqsub;'), $toCharArray('sqsube;'), $toCharArray('sqsubset;'), $toCharArray('sqsubseteq;'), $toCharArray('sqsup;'), $toCharArray('sqsupe;'), $toCharArray('sqsupset;'), $toCharArray('sqsupseteq;'), $toCharArray('squ;'), $toCharArray('square;'), $toCharArray('squarf;'), $toCharArray('squf;'), $toCharArray('srarr;'), $toCharArray('sscr;'), $toCharArray('ssetmn;'), $toCharArray('ssmile;'), $toCharArray('sstarf;'), $toCharArray('star;'), $toCharArray('starf;'), $toCharArray('straightepsilon;'), $toCharArray('straightphi;'), $toCharArray('strns;'), $toCharArray('sub;'), $toCharArray('subE;'), $toCharArray('subdot;'), $toCharArray('sube;'), $toCharArray('subedot;'), $toCharArray('submult;'), $toCharArray('subnE;'), $toCharArray('subne;'), $toCharArray('subplus;'), $toCharArray('subrarr;'), $toCharArray('subset;'), $toCharArray('subseteq;'), $toCharArray('subseteqq;'), $toCharArray('subsetneq;'), $toCharArray('subsetneqq;'), $toCharArray('subsim;'), $toCharArray('subsub;'), $toCharArray('subsup;'), $toCharArray('succ;'), $toCharArray('succapprox;'), $toCharArray('succcurlyeq;'), $toCharArray('succeq;'), $toCharArray('succnapprox;'), $toCharArray('succneqq;'), $toCharArray('succnsim;'), $toCharArray('succsim;'), $toCharArray('sum;'), $toCharArray('sung;'), $toCharArray('sup1'), $toCharArray('sup1;'), $toCharArray('sup2'), $toCharArray('sup2;'), $toCharArray('sup3'), $toCharArray('sup3;'), $toCharArray('sup;'), $toCharArray('supE;'), $toCharArray('supdot;'), $toCharArray('supdsub;'), $toCharArray('supe;'), $toCharArray('supedot;'), $toCharArray('suphsub;'), $toCharArray('suplarr;'), $toCharArray('supmult;'), $toCharArray('supnE;'), $toCharArray('supne;'), $toCharArray('supplus;'), $toCharArray('supset;'), $toCharArray('supseteq;'), $toCharArray('supseteqq;'), $toCharArray('supsetneq;'), $toCharArray('supsetneqq;'), $toCharArray('supsim;'), $toCharArray('supsub;'), $toCharArray('supsup;'), $toCharArray('swArr;'), $toCharArray('swarhk;'), $toCharArray('swarr;'), $toCharArray('swarrow;'), $toCharArray('swnwar;'), $toCharArray('szlig'), $toCharArray('szlig;'), $toCharArray('target;'), $toCharArray('tau;'), $toCharArray('tbrk;'), $toCharArray('tcaron;'), $toCharArray('tcedil;'), $toCharArray('tcy;'), $toCharArray('tdot;'), $toCharArray('telrec;'), $toCharArray('tfr;'), $toCharArray('there4;'), $toCharArray('therefore;'), $toCharArray('theta;'), $toCharArray('thetasym;'), $toCharArray('thetav;'), $toCharArray('thickapprox;'), $toCharArray('thicksim;'), $toCharArray('thinsp;'), $toCharArray('thkap;'), $toCharArray('thksim;'), $toCharArray('thorn'), $toCharArray('thorn;'), $toCharArray('tilde;'), $toCharArray('times'), $toCharArray('times;'), $toCharArray('timesb;'), $toCharArray('timesbar;'), $toCharArray('timesd;'), $toCharArray('tint;'), $toCharArray('toea;'), $toCharArray('top;'), $toCharArray('topbot;'), $toCharArray('topcir;'), $toCharArray('topf;'), $toCharArray('topfork;'), $toCharArray('tosa;'), $toCharArray('tprime;'), $toCharArray('trade;'), $toCharArray('triangle;'), $toCharArray('triangledown;'), $toCharArray('triangleleft;'), $toCharArray('trianglelefteq;'), $toCharArray('triangleq;'), $toCharArray('triangleright;'), $toCharArray('trianglerighteq;'), $toCharArray('tridot;'), $toCharArray('trie;'), $toCharArray('triminus;'), $toCharArray('triplus;'), $toCharArray('trisb;'), $toCharArray('tritime;'), $toCharArray('trpezium;'), $toCharArray('tscr;'), $toCharArray('tscy;'), $toCharArray('tshcy;'), $toCharArray('tstrok;'), $toCharArray('twixt;'), $toCharArray('twoheadleftarrow;'), $toCharArray('twoheadrightarrow;'), $toCharArray('uArr;'), $toCharArray('uHar;'), $toCharArray('uacute'), $toCharArray('uacute;'), $toCharArray('uarr;'), $toCharArray('ubrcy;'), $toCharArray('ubreve;'), $toCharArray('ucirc'), $toCharArray('ucirc;'), $toCharArray('ucy;'), $toCharArray('udarr;'), $toCharArray('udblac;'), $toCharArray('udhar;'), $toCharArray('ufisht;'), $toCharArray('ufr;'), $toCharArray('ugrave'), $toCharArray('ugrave;'), $toCharArray('uharl;'), $toCharArray('uharr;'), $toCharArray('uhblk;'), $toCharArray('ulcorn;'), $toCharArray('ulcorner;'), $toCharArray('ulcrop;'), $toCharArray('ultri;'), $toCharArray('umacr;'), $toCharArray('uml'), $toCharArray('uml;'), $toCharArray('uogon;'), $toCharArray('uopf;'), $toCharArray('uparrow;'), $toCharArray('updownarrow;'), $toCharArray('upharpoonleft;'), $toCharArray('upharpoonright;'), $toCharArray('uplus;'), $toCharArray('upsi;'), $toCharArray('upsih;'), $toCharArray('upsilon;'), $toCharArray('upuparrows;'), $toCharArray('urcorn;'), $toCharArray('urcorner;'), $toCharArray('urcrop;'), $toCharArray('uring;'), $toCharArray('urtri;'), $toCharArray('uscr;'), $toCharArray('utdot;'), $toCharArray('utilde;'), $toCharArray('utri;'), $toCharArray('utrif;'), $toCharArray('uuarr;'), $toCharArray('uuml'), $toCharArray('uuml;'), $toCharArray('uwangle;'), $toCharArray('vArr;'), $toCharArray('vBar;'), $toCharArray('vBarv;'), $toCharArray('vDash;'), $toCharArray('vangrt;'), $toCharArray('varepsilon;'), $toCharArray('varkappa;'), $toCharArray('varnothing;'), $toCharArray('varphi;'), $toCharArray('varpi;'), $toCharArray('varpropto;'), $toCharArray('varr;'), $toCharArray('varrho;'), $toCharArray('varsigma;'), $toCharArray('vartheta;'), $toCharArray('vartriangleleft;'), $toCharArray('vartriangleright;'), $toCharArray('vcy;'), $toCharArray('vdash;'), $toCharArray('vee;'), $toCharArray('veebar;'), $toCharArray('veeeq;'), $toCharArray('vellip;'), $toCharArray('verbar;'), $toCharArray('vert;'), $toCharArray('vfr;'), $toCharArray('vltri;'), $toCharArray('vopf;'), $toCharArray('vprop;'), $toCharArray('vrtri;'), $toCharArray('vscr;'), $toCharArray('vzigzag;'), $toCharArray('wcirc;'), $toCharArray('wedbar;'), $toCharArray('wedge;'), $toCharArray('wedgeq;'), $toCharArray('weierp;'), $toCharArray('wfr;'), $toCharArray('wopf;'), $toCharArray('wp;'), $toCharArray('wr;'), $toCharArray('wreath;'), $toCharArray('wscr;'), $toCharArray('xcap;'), $toCharArray('xcirc;'), $toCharArray('xcup;'), $toCharArray('xdtri;'), $toCharArray('xfr;'), $toCharArray('xhArr;'), $toCharArray('xharr;'), $toCharArray('xi;'), $toCharArray('xlArr;'), $toCharArray('xlarr;'), $toCharArray('xmap;'), $toCharArray('xnis;'), $toCharArray('xodot;'), $toCharArray('xopf;'), $toCharArray('xoplus;'), $toCharArray('xotime;'), $toCharArray('xrArr;'), $toCharArray('xrarr;'), $toCharArray('xscr;'), $toCharArray('xsqcup;'), $toCharArray('xuplus;'), $toCharArray('xutri;'), $toCharArray('xvee;'), $toCharArray('xwedge;'), $toCharArray('yacute'), $toCharArray('yacute;'), $toCharArray('yacy;'), $toCharArray('ycirc;'), $toCharArray('ycy;'), $toCharArray('yen'), $toCharArray('yen;'), $toCharArray('yfr;'), $toCharArray('yicy;'), $toCharArray('yopf;'), $toCharArray('yscr;'), $toCharArray('yucy;'), $toCharArray('yuml'), $toCharArray('yuml;'), $toCharArray('zacute;'), $toCharArray('zcaron;'), $toCharArray('zcy;'), $toCharArray('zdot;'), $toCharArray('zeetrf;'), $toCharArray('zeta;'), $toCharArray('zfr;'), $toCharArray('zhcy;'), $toCharArray('zigrarr;'), $toCharArray('zopf;'), $toCharArray('zscr;'), $toCharArray('zwj;'), $toCharArray('zwnj;')]);
|
jtulach@678
|
21712 |
VALUES_0 = initValues(_3_3C_classLit, 52, 12, [initValues(_3C_classLit, 42, -1, [198]), initValues(_3C_classLit, 42, -1, [198]), initValues(_3C_classLit, 42, -1, [38]), initValues(_3C_classLit, 42, -1, [38]), initValues(_3C_classLit, 42, -1, [193]), initValues(_3C_classLit, 42, -1, [193]), initValues(_3C_classLit, 42, -1, [258]), initValues(_3C_classLit, 42, -1, [194]), initValues(_3C_classLit, 42, -1, [194]), initValues(_3C_classLit, 42, -1, [1040]), initValues(_3C_classLit, 42, -1, [55349, 56580]), initValues(_3C_classLit, 42, -1, [192]), initValues(_3C_classLit, 42, -1, [192]), initValues(_3C_classLit, 42, -1, [913]), initValues(_3C_classLit, 42, -1, [256]), initValues(_3C_classLit, 42, -1, [10835]), initValues(_3C_classLit, 42, -1, [260]), initValues(_3C_classLit, 42, -1, [55349, 56632]), initValues(_3C_classLit, 42, -1, [8289]), initValues(_3C_classLit, 42, -1, [197]), initValues(_3C_classLit, 42, -1, [197]), initValues(_3C_classLit, 42, -1, [55349, 56476]), initValues(_3C_classLit, 42, -1, [8788]), initValues(_3C_classLit, 42, -1, [195]), initValues(_3C_classLit, 42, -1, [195]), initValues(_3C_classLit, 42, -1, [196]), initValues(_3C_classLit, 42, -1, [196]), initValues(_3C_classLit, 42, -1, [8726]), initValues(_3C_classLit, 42, -1, [10983]), initValues(_3C_classLit, 42, -1, [8966]), initValues(_3C_classLit, 42, -1, [1041]), initValues(_3C_classLit, 42, -1, [8757]), initValues(_3C_classLit, 42, -1, [8492]), initValues(_3C_classLit, 42, -1, [914]), initValues(_3C_classLit, 42, -1, [55349, 56581]), initValues(_3C_classLit, 42, -1, [55349, 56633]), initValues(_3C_classLit, 42, -1, [728]), initValues(_3C_classLit, 42, -1, [8492]), initValues(_3C_classLit, 42, -1, [8782]), initValues(_3C_classLit, 42, -1, [1063]), initValues(_3C_classLit, 42, -1, [169]), initValues(_3C_classLit, 42, -1, [169]), initValues(_3C_classLit, 42, -1, [262]), initValues(_3C_classLit, 42, -1, [8914]), initValues(_3C_classLit, 42, -1, [8517]), initValues(_3C_classLit, 42, -1, [8493]), initValues(_3C_classLit, 42, -1, [268]), initValues(_3C_classLit, 42, -1, [199]), initValues(_3C_classLit, 42, -1, [199]), initValues(_3C_classLit, 42, -1, [264]), initValues(_3C_classLit, 42, -1, [8752]), initValues(_3C_classLit, 42, -1, [266]), initValues(_3C_classLit, 42, -1, [184]), initValues(_3C_classLit, 42, -1, [183]), initValues(_3C_classLit, 42, -1, [8493]), initValues(_3C_classLit, 42, -1, [935]), initValues(_3C_classLit, 42, -1, [8857]), initValues(_3C_classLit, 42, -1, [8854]), initValues(_3C_classLit, 42, -1, [8853]), initValues(_3C_classLit, 42, -1, [8855]), initValues(_3C_classLit, 42, -1, [8754]), initValues(_3C_classLit, 42, -1, [8221]), initValues(_3C_classLit, 42, -1, [8217]), initValues(_3C_classLit, 42, -1, [8759]), initValues(_3C_classLit, 42, -1, [10868]), initValues(_3C_classLit, 42, -1, [8801]), initValues(_3C_classLit, 42, -1, [8751]), initValues(_3C_classLit, 42, -1, [8750]), initValues(_3C_classLit, 42, -1, [8450]), initValues(_3C_classLit, 42, -1, [8720]), initValues(_3C_classLit, 42, -1, [8755]), initValues(_3C_classLit, 42, -1, [10799]), initValues(_3C_classLit, 42, -1, [55349, 56478]), initValues(_3C_classLit, 42, -1, [8915]), initValues(_3C_classLit, 42, -1, [8781]), initValues(_3C_classLit, 42, -1, [8517]), initValues(_3C_classLit, 42, -1, [10513]), initValues(_3C_classLit, 42, -1, [1026]), initValues(_3C_classLit, 42, -1, [1029]), initValues(_3C_classLit, 42, -1, [1039]), initValues(_3C_classLit, 42, -1, [8225]), initValues(_3C_classLit, 42, -1, [8609]), initValues(_3C_classLit, 42, -1, [10980]), initValues(_3C_classLit, 42, -1, [270]), initValues(_3C_classLit, 42, -1, [1044]), initValues(_3C_classLit, 42, -1, [8711]), initValues(_3C_classLit, 42, -1, [916]), initValues(_3C_classLit, 42, -1, [55349, 56583]), initValues(_3C_classLit, 42, -1, [180]), initValues(_3C_classLit, 42, -1, [729]), initValues(_3C_classLit, 42, -1, [733]), initValues(_3C_classLit, 42, -1, [96]), initValues(_3C_classLit, 42, -1, [732]), initValues(_3C_classLit, 42, -1, [8900]), initValues(_3C_classLit, 42, -1, [8518]), initValues(_3C_classLit, 42, -1, [55349, 56635]), initValues(_3C_classLit, 42, -1, [168]), initValues(_3C_classLit, 42, -1, [8412]), initValues(_3C_classLit, 42, -1, [8784]), initValues(_3C_classLit, 42, -1, [8751]), initValues(_3C_classLit, 42, -1, [168]), initValues(_3C_classLit, 42, -1, [8659]), initValues(_3C_classLit, 42, -1, [8656]), initValues(_3C_classLit, 42, -1, [8660]), initValues(_3C_classLit, 42, -1, [10980]), initValues(_3C_classLit, 42, -1, [10232]), initValues(_3C_classLit, 42, -1, [10234]), initValues(_3C_classLit, 42, -1, [10233]), initValues(_3C_classLit, 42, -1, [8658]), initValues(_3C_classLit, 42, -1, [8872]), initValues(_3C_classLit, 42, -1, [8657]), initValues(_3C_classLit, 42, -1, [8661]), initValues(_3C_classLit, 42, -1, [8741]), initValues(_3C_classLit, 42, -1, [8595]), initValues(_3C_classLit, 42, -1, [10515]), initValues(_3C_classLit, 42, -1, [8693]), initValues(_3C_classLit, 42, -1, [785]), initValues(_3C_classLit, 42, -1, [10576]), initValues(_3C_classLit, 42, -1, [10590]), initValues(_3C_classLit, 42, -1, [8637]), initValues(_3C_classLit, 42, -1, [10582]), initValues(_3C_classLit, 42, -1, [10591]), initValues(_3C_classLit, 42, -1, [8641]), initValues(_3C_classLit, 42, -1, [10583]), initValues(_3C_classLit, 42, -1, [8868]), initValues(_3C_classLit, 42, -1, [8615]), initValues(_3C_classLit, 42, -1, [8659]), initValues(_3C_classLit, 42, -1, [55349, 56479]), initValues(_3C_classLit, 42, -1, [272]), initValues(_3C_classLit, 42, -1, [330]), initValues(_3C_classLit, 42, -1, [208]), initValues(_3C_classLit, 42, -1, [208]), initValues(_3C_classLit, 42, -1, [201]), initValues(_3C_classLit, 42, -1, [201]), initValues(_3C_classLit, 42, -1, [282]), initValues(_3C_classLit, 42, -1, [202]), initValues(_3C_classLit, 42, -1, [202]), initValues(_3C_classLit, 42, -1, [1069]), initValues(_3C_classLit, 42, -1, [278]), initValues(_3C_classLit, 42, -1, [55349, 56584]), initValues(_3C_classLit, 42, -1, [200]), initValues(_3C_classLit, 42, -1, [200]), initValues(_3C_classLit, 42, -1, [8712]), initValues(_3C_classLit, 42, -1, [274]), initValues(_3C_classLit, 42, -1, [9723]), initValues(_3C_classLit, 42, -1, [9643]), initValues(_3C_classLit, 42, -1, [280]), initValues(_3C_classLit, 42, -1, [55349, 56636]), initValues(_3C_classLit, 42, -1, [917]), initValues(_3C_classLit, 42, -1, [10869]), initValues(_3C_classLit, 42, -1, [8770]), initValues(_3C_classLit, 42, -1, [8652]), initValues(_3C_classLit, 42, -1, [8496]), initValues(_3C_classLit, 42, -1, [10867]), initValues(_3C_classLit, 42, -1, [919]), initValues(_3C_classLit, 42, -1, [203]), initValues(_3C_classLit, 42, -1, [203]), initValues(_3C_classLit, 42, -1, [8707]), initValues(_3C_classLit, 42, -1, [8519]), initValues(_3C_classLit, 42, -1, [1060]), initValues(_3C_classLit, 42, -1, [55349, 56585]), initValues(_3C_classLit, 42, -1, [9724]), initValues(_3C_classLit, 42, -1, [9642]), initValues(_3C_classLit, 42, -1, [55349, 56637]), initValues(_3C_classLit, 42, -1, [8704]), initValues(_3C_classLit, 42, -1, [8497]), initValues(_3C_classLit, 42, -1, [8497]), initValues(_3C_classLit, 42, -1, [1027]), initValues(_3C_classLit, 42, -1, [62]), initValues(_3C_classLit, 42, -1, [62]), initValues(_3C_classLit, 42, -1, [915]), initValues(_3C_classLit, 42, -1, [988]), initValues(_3C_classLit, 42, -1, [286]), initValues(_3C_classLit, 42, -1, [290]), initValues(_3C_classLit, 42, -1, [284]), initValues(_3C_classLit, 42, -1, [1043]), initValues(_3C_classLit, 42, -1, [288]), initValues(_3C_classLit, 42, -1, [55349, 56586]), initValues(_3C_classLit, 42, -1, [8921]), initValues(_3C_classLit, 42, -1, [55349, 56638]), initValues(_3C_classLit, 42, -1, [8805]), initValues(_3C_classLit, 42, -1, [8923]), initValues(_3C_classLit, 42, -1, [8807]), initValues(_3C_classLit, 42, -1, [10914]), initValues(_3C_classLit, 42, -1, [8823]), initValues(_3C_classLit, 42, -1, [10878]), initValues(_3C_classLit, 42, -1, [8819]), initValues(_3C_classLit, 42, -1, [55349, 56482]), initValues(_3C_classLit, 42, -1, [8811]), initValues(_3C_classLit, 42, -1, [1066]), initValues(_3C_classLit, 42, -1, [711]), initValues(_3C_classLit, 42, -1, [94]), initValues(_3C_classLit, 42, -1, [292]), initValues(_3C_classLit, 42, -1, [8460]), initValues(_3C_classLit, 42, -1, [8459]), initValues(_3C_classLit, 42, -1, [8461]), initValues(_3C_classLit, 42, -1, [9472]), initValues(_3C_classLit, 42, -1, [8459]), initValues(_3C_classLit, 42, -1, [294]), initValues(_3C_classLit, 42, -1, [8782]), initValues(_3C_classLit, 42, -1, [8783]), initValues(_3C_classLit, 42, -1, [1045]), initValues(_3C_classLit, 42, -1, [306]), initValues(_3C_classLit, 42, -1, [1025]), initValues(_3C_classLit, 42, -1, [205]), initValues(_3C_classLit, 42, -1, [205]), initValues(_3C_classLit, 42, -1, [206]), initValues(_3C_classLit, 42, -1, [206]), initValues(_3C_classLit, 42, -1, [1048]), initValues(_3C_classLit, 42, -1, [304]), initValues(_3C_classLit, 42, -1, [8465]), initValues(_3C_classLit, 42, -1, [204]), initValues(_3C_classLit, 42, -1, [204]), initValues(_3C_classLit, 42, -1, [8465]), initValues(_3C_classLit, 42, -1, [298]), initValues(_3C_classLit, 42, -1, [8520]), initValues(_3C_classLit, 42, -1, [8658]), initValues(_3C_classLit, 42, -1, [8748]), initValues(_3C_classLit, 42, -1, [8747]), initValues(_3C_classLit, 42, -1, [8898]), initValues(_3C_classLit, 42, -1, [8291]), initValues(_3C_classLit, 42, -1, [8290]), initValues(_3C_classLit, 42, -1, [302]), initValues(_3C_classLit, 42, -1, [55349, 56640]), initValues(_3C_classLit, 42, -1, [921]), initValues(_3C_classLit, 42, -1, [8464]), initValues(_3C_classLit, 42, -1, [296]), initValues(_3C_classLit, 42, -1, [1030]), initValues(_3C_classLit, 42, -1, [207]), initValues(_3C_classLit, 42, -1, [207]), initValues(_3C_classLit, 42, -1, [308]), initValues(_3C_classLit, 42, -1, [1049]), initValues(_3C_classLit, 42, -1, [55349, 56589]), initValues(_3C_classLit, 42, -1, [55349, 56641]), initValues(_3C_classLit, 42, -1, [55349, 56485]), initValues(_3C_classLit, 42, -1, [1032]), initValues(_3C_classLit, 42, -1, [1028]), initValues(_3C_classLit, 42, -1, [1061]), initValues(_3C_classLit, 42, -1, [1036]), initValues(_3C_classLit, 42, -1, [922]), initValues(_3C_classLit, 42, -1, [310]), initValues(_3C_classLit, 42, -1, [1050]), initValues(_3C_classLit, 42, -1, [55349, 56590]), initValues(_3C_classLit, 42, -1, [55349, 56642]), initValues(_3C_classLit, 42, -1, [55349, 56486]), initValues(_3C_classLit, 42, -1, [1033]), initValues(_3C_classLit, 42, -1, [60]), initValues(_3C_classLit, 42, -1, [60]), initValues(_3C_classLit, 42, -1, [313]), initValues(_3C_classLit, 42, -1, [923]), initValues(_3C_classLit, 42, -1, [10218]), initValues(_3C_classLit, 42, -1, [8466]), initValues(_3C_classLit, 42, -1, [8606]), initValues(_3C_classLit, 42, -1, [317]), initValues(_3C_classLit, 42, -1, [315]), initValues(_3C_classLit, 42, -1, [1051]), initValues(_3C_classLit, 42, -1, [10216]), initValues(_3C_classLit, 42, -1, [8592]), initValues(_3C_classLit, 42, -1, [8676]), initValues(_3C_classLit, 42, -1, [8646]), initValues(_3C_classLit, 42, -1, [8968]), initValues(_3C_classLit, 42, -1, [10214]), initValues(_3C_classLit, 42, -1, [10593]), initValues(_3C_classLit, 42, -1, [8643]), initValues(_3C_classLit, 42, -1, [10585]), initValues(_3C_classLit, 42, -1, [8970]), initValues(_3C_classLit, 42, -1, [8596]), initValues(_3C_classLit, 42, -1, [10574]), initValues(_3C_classLit, 42, -1, [8867]), initValues(_3C_classLit, 42, -1, [8612]), initValues(_3C_classLit, 42, -1, [10586]), initValues(_3C_classLit, 42, -1, [8882]), initValues(_3C_classLit, 42, -1, [10703]), initValues(_3C_classLit, 42, -1, [8884]), initValues(_3C_classLit, 42, -1, [10577]), initValues(_3C_classLit, 42, -1, [10592]), initValues(_3C_classLit, 42, -1, [8639]), initValues(_3C_classLit, 42, -1, [10584]), initValues(_3C_classLit, 42, -1, [8636]), initValues(_3C_classLit, 42, -1, [10578]), initValues(_3C_classLit, 42, -1, [8656]), initValues(_3C_classLit, 42, -1, [8660]), initValues(_3C_classLit, 42, -1, [8922]), initValues(_3C_classLit, 42, -1, [8806]), initValues(_3C_classLit, 42, -1, [8822]), initValues(_3C_classLit, 42, -1, [10913]), initValues(_3C_classLit, 42, -1, [10877]), initValues(_3C_classLit, 42, -1, [8818]), initValues(_3C_classLit, 42, -1, [55349, 56591]), initValues(_3C_classLit, 42, -1, [8920]), initValues(_3C_classLit, 42, -1, [8666]), initValues(_3C_classLit, 42, -1, [319]), initValues(_3C_classLit, 42, -1, [10229]), initValues(_3C_classLit, 42, -1, [10231]), initValues(_3C_classLit, 42, -1, [10230]), initValues(_3C_classLit, 42, -1, [10232]), initValues(_3C_classLit, 42, -1, [10234]), initValues(_3C_classLit, 42, -1, [10233]), initValues(_3C_classLit, 42, -1, [55349, 56643]), initValues(_3C_classLit, 42, -1, [8601]), initValues(_3C_classLit, 42, -1, [8600]), initValues(_3C_classLit, 42, -1, [8466]), initValues(_3C_classLit, 42, -1, [8624]), initValues(_3C_classLit, 42, -1, [321]), initValues(_3C_classLit, 42, -1, [8810]), initValues(_3C_classLit, 42, -1, [10501]), initValues(_3C_classLit, 42, -1, [1052]), initValues(_3C_classLit, 42, -1, [8287]), initValues(_3C_classLit, 42, -1, [8499]), initValues(_3C_classLit, 42, -1, [55349, 56592]), initValues(_3C_classLit, 42, -1, [8723]), initValues(_3C_classLit, 42, -1, [55349, 56644]), initValues(_3C_classLit, 42, -1, [8499]), initValues(_3C_classLit, 42, -1, [924]), initValues(_3C_classLit, 42, -1, [1034]), initValues(_3C_classLit, 42, -1, [323]), initValues(_3C_classLit, 42, -1, [327]), initValues(_3C_classLit, 42, -1, [325]), initValues(_3C_classLit, 42, -1, [1053]), initValues(_3C_classLit, 42, -1, [8203]), initValues(_3C_classLit, 42, -1, [8203]), initValues(_3C_classLit, 42, -1, [8203]), initValues(_3C_classLit, 42, -1, [8203]), initValues(_3C_classLit, 42, -1, [8811]), initValues(_3C_classLit, 42, -1, [8810]), initValues(_3C_classLit, 42, -1, [10]), initValues(_3C_classLit, 42, -1, [55349, 56593]), initValues(_3C_classLit, 42, -1, [8288]), initValues(_3C_classLit, 42, -1, [160]), initValues(_3C_classLit, 42, -1, [8469]), initValues(_3C_classLit, 42, -1, [10988]), initValues(_3C_classLit, 42, -1, [8802]), initValues(_3C_classLit, 42, -1, [8813]), initValues(_3C_classLit, 42, -1, [8742]), initValues(_3C_classLit, 42, -1, [8713]), initValues(_3C_classLit, 42, -1, [8800]), initValues(_3C_classLit, 42, -1, [8708]), initValues(_3C_classLit, 42, -1, [8815]), initValues(_3C_classLit, 42, -1, [8817]), initValues(_3C_classLit, 42, -1, [8825]), initValues(_3C_classLit, 42, -1, [8821]), initValues(_3C_classLit, 42, -1, [8938]), initValues(_3C_classLit, 42, -1, [8940]), initValues(_3C_classLit, 42, -1, [8814]), initValues(_3C_classLit, 42, -1, [8816]), initValues(_3C_classLit, 42, -1, [8824]), initValues(_3C_classLit, 42, -1, [8820]), initValues(_3C_classLit, 42, -1, [8832]), initValues(_3C_classLit, 42, -1, [8928]), initValues(_3C_classLit, 42, -1, [8716]), initValues(_3C_classLit, 42, -1, [8939]), initValues(_3C_classLit, 42, -1, [8941]), initValues(_3C_classLit, 42, -1, [8930]), initValues(_3C_classLit, 42, -1, [8931]), initValues(_3C_classLit, 42, -1, [8840]), initValues(_3C_classLit, 42, -1, [8833]), initValues(_3C_classLit, 42, -1, [8929]), initValues(_3C_classLit, 42, -1, [8841]), initValues(_3C_classLit, 42, -1, [8769]), initValues(_3C_classLit, 42, -1, [8772]), initValues(_3C_classLit, 42, -1, [8775]), initValues(_3C_classLit, 42, -1, [8777]), initValues(_3C_classLit, 42, -1, [8740]), initValues(_3C_classLit, 42, -1, [55349, 56489]), initValues(_3C_classLit, 42, -1, [209]), initValues(_3C_classLit, 42, -1, [209]), initValues(_3C_classLit, 42, -1, [925]), initValues(_3C_classLit, 42, -1, [338]), initValues(_3C_classLit, 42, -1, [211]), initValues(_3C_classLit, 42, -1, [211]), initValues(_3C_classLit, 42, -1, [212]), initValues(_3C_classLit, 42, -1, [212]), initValues(_3C_classLit, 42, -1, [1054]), initValues(_3C_classLit, 42, -1, [336]), initValues(_3C_classLit, 42, -1, [55349, 56594]), initValues(_3C_classLit, 42, -1, [210]), initValues(_3C_classLit, 42, -1, [210]), initValues(_3C_classLit, 42, -1, [332]), initValues(_3C_classLit, 42, -1, [937]), initValues(_3C_classLit, 42, -1, [927]), initValues(_3C_classLit, 42, -1, [55349, 56646]), initValues(_3C_classLit, 42, -1, [8220]), initValues(_3C_classLit, 42, -1, [8216]), initValues(_3C_classLit, 42, -1, [10836]), initValues(_3C_classLit, 42, -1, [55349, 56490]), initValues(_3C_classLit, 42, -1, [216]), initValues(_3C_classLit, 42, -1, [216]), initValues(_3C_classLit, 42, -1, [213]), initValues(_3C_classLit, 42, -1, [213]), initValues(_3C_classLit, 42, -1, [10807]), initValues(_3C_classLit, 42, -1, [214]), initValues(_3C_classLit, 42, -1, [214]), initValues(_3C_classLit, 42, -1, [175]), initValues(_3C_classLit, 42, -1, [9182]), initValues(_3C_classLit, 42, -1, [9140]), initValues(_3C_classLit, 42, -1, [9180]), initValues(_3C_classLit, 42, -1, [8706]), initValues(_3C_classLit, 42, -1, [1055]), initValues(_3C_classLit, 42, -1, [55349, 56595]), initValues(_3C_classLit, 42, -1, [934]), initValues(_3C_classLit, 42, -1, [928]), initValues(_3C_classLit, 42, -1, [177]), initValues(_3C_classLit, 42, -1, [8460]), initValues(_3C_classLit, 42, -1, [8473]), initValues(_3C_classLit, 42, -1, [10939]), initValues(_3C_classLit, 42, -1, [8826]), initValues(_3C_classLit, 42, -1, [10927]), initValues(_3C_classLit, 42, -1, [8828]), initValues(_3C_classLit, 42, -1, [8830]), initValues(_3C_classLit, 42, -1, [8243]), initValues(_3C_classLit, 42, -1, [8719]), initValues(_3C_classLit, 42, -1, [8759]), initValues(_3C_classLit, 42, -1, [8733]), initValues(_3C_classLit, 42, -1, [55349, 56491]), initValues(_3C_classLit, 42, -1, [936]), initValues(_3C_classLit, 42, -1, [34]), initValues(_3C_classLit, 42, -1, [34]), initValues(_3C_classLit, 42, -1, [55349, 56596]), initValues(_3C_classLit, 42, -1, [8474]), initValues(_3C_classLit, 42, -1, [55349, 56492]), initValues(_3C_classLit, 42, -1, [10512]), initValues(_3C_classLit, 42, -1, [174]), initValues(_3C_classLit, 42, -1, [174]), initValues(_3C_classLit, 42, -1, [340]), initValues(_3C_classLit, 42, -1, [10219]), initValues(_3C_classLit, 42, -1, [8608]), initValues(_3C_classLit, 42, -1, [10518]), initValues(_3C_classLit, 42, -1, [344]), initValues(_3C_classLit, 42, -1, [342]), initValues(_3C_classLit, 42, -1, [1056]), initValues(_3C_classLit, 42, -1, [8476]), initValues(_3C_classLit, 42, -1, [8715]), initValues(_3C_classLit, 42, -1, [8651]), initValues(_3C_classLit, 42, -1, [10607]), initValues(_3C_classLit, 42, -1, [8476]), initValues(_3C_classLit, 42, -1, [929]), initValues(_3C_classLit, 42, -1, [10217]), initValues(_3C_classLit, 42, -1, [8594]), initValues(_3C_classLit, 42, -1, [8677]), initValues(_3C_classLit, 42, -1, [8644]), initValues(_3C_classLit, 42, -1, [8969]), initValues(_3C_classLit, 42, -1, [10215]), initValues(_3C_classLit, 42, -1, [10589]), initValues(_3C_classLit, 42, -1, [8642]), initValues(_3C_classLit, 42, -1, [10581]), initValues(_3C_classLit, 42, -1, [8971]), initValues(_3C_classLit, 42, -1, [8866]), initValues(_3C_classLit, 42, -1, [8614]), initValues(_3C_classLit, 42, -1, [10587]), initValues(_3C_classLit, 42, -1, [8883]), initValues(_3C_classLit, 42, -1, [10704]), initValues(_3C_classLit, 42, -1, [8885]), initValues(_3C_classLit, 42, -1, [10575]), initValues(_3C_classLit, 42, -1, [10588]), initValues(_3C_classLit, 42, -1, [8638]), initValues(_3C_classLit, 42, -1, [10580]), initValues(_3C_classLit, 42, -1, [8640]), initValues(_3C_classLit, 42, -1, [10579]), initValues(_3C_classLit, 42, -1, [8658]), initValues(_3C_classLit, 42, -1, [8477]), initValues(_3C_classLit, 42, -1, [10608]), initValues(_3C_classLit, 42, -1, [8667]), initValues(_3C_classLit, 42, -1, [8475]), initValues(_3C_classLit, 42, -1, [8625]), initValues(_3C_classLit, 42, -1, [10740]), initValues(_3C_classLit, 42, -1, [1065]), initValues(_3C_classLit, 42, -1, [1064]), initValues(_3C_classLit, 42, -1, [1068]), initValues(_3C_classLit, 42, -1, [346]), initValues(_3C_classLit, 42, -1, [10940]), initValues(_3C_classLit, 42, -1, [352]), initValues(_3C_classLit, 42, -1, [350]), initValues(_3C_classLit, 42, -1, [348]), initValues(_3C_classLit, 42, -1, [1057]), initValues(_3C_classLit, 42, -1, [55349, 56598]), initValues(_3C_classLit, 42, -1, [8595]), initValues(_3C_classLit, 42, -1, [8592]), initValues(_3C_classLit, 42, -1, [8594]), initValues(_3C_classLit, 42, -1, [8593]), initValues(_3C_classLit, 42, -1, [931]), initValues(_3C_classLit, 42, -1, [8728]), initValues(_3C_classLit, 42, -1, [55349, 56650]), initValues(_3C_classLit, 42, -1, [8730]), initValues(_3C_classLit, 42, -1, [9633]), initValues(_3C_classLit, 42, -1, [8851]), initValues(_3C_classLit, 42, -1, [8847]), initValues(_3C_classLit, 42, -1, [8849]), initValues(_3C_classLit, 42, -1, [8848]), initValues(_3C_classLit, 42, -1, [8850]), initValues(_3C_classLit, 42, -1, [8852]), initValues(_3C_classLit, 42, -1, [55349, 56494]), initValues(_3C_classLit, 42, -1, [8902]), initValues(_3C_classLit, 42, -1, [8912]), initValues(_3C_classLit, 42, -1, [8912]), initValues(_3C_classLit, 42, -1, [8838]), initValues(_3C_classLit, 42, -1, [8827]), initValues(_3C_classLit, 42, -1, [10928]), initValues(_3C_classLit, 42, -1, [8829]), initValues(_3C_classLit, 42, -1, [8831]), initValues(_3C_classLit, 42, -1, [8715]), initValues(_3C_classLit, 42, -1, [8721]), initValues(_3C_classLit, 42, -1, [8913]), initValues(_3C_classLit, 42, -1, [8835]), initValues(_3C_classLit, 42, -1, [8839]), initValues(_3C_classLit, 42, -1, [8913]), initValues(_3C_classLit, 42, -1, [222]), initValues(_3C_classLit, 42, -1, [222]), initValues(_3C_classLit, 42, -1, [8482]), initValues(_3C_classLit, 42, -1, [1035]), initValues(_3C_classLit, 42, -1, [1062]), initValues(_3C_classLit, 42, -1, [9]), initValues(_3C_classLit, 42, -1, [932]), initValues(_3C_classLit, 42, -1, [356]), initValues(_3C_classLit, 42, -1, [354]), initValues(_3C_classLit, 42, -1, [1058]), initValues(_3C_classLit, 42, -1, [55349, 56599]), initValues(_3C_classLit, 42, -1, [8756]), initValues(_3C_classLit, 42, -1, [920]), initValues(_3C_classLit, 42, -1, [8201]), initValues(_3C_classLit, 42, -1, [8764]), initValues(_3C_classLit, 42, -1, [8771]), initValues(_3C_classLit, 42, -1, [8773]), initValues(_3C_classLit, 42, -1, [8776]), initValues(_3C_classLit, 42, -1, [55349, 56651]), initValues(_3C_classLit, 42, -1, [8411]), initValues(_3C_classLit, 42, -1, [55349, 56495]), initValues(_3C_classLit, 42, -1, [358]), initValues(_3C_classLit, 42, -1, [218]), initValues(_3C_classLit, 42, -1, [218]), initValues(_3C_classLit, 42, -1, [8607]), initValues(_3C_classLit, 42, -1, [10569]), initValues(_3C_classLit, 42, -1, [1038]), initValues(_3C_classLit, 42, -1, [364]), initValues(_3C_classLit, 42, -1, [219]), initValues(_3C_classLit, 42, -1, [219]), initValues(_3C_classLit, 42, -1, [1059]), initValues(_3C_classLit, 42, -1, [368]), initValues(_3C_classLit, 42, -1, [55349, 56600]), initValues(_3C_classLit, 42, -1, [217]), initValues(_3C_classLit, 42, -1, [217]), initValues(_3C_classLit, 42, -1, [362]), initValues(_3C_classLit, 42, -1, [818]), initValues(_3C_classLit, 42, -1, [9183]), initValues(_3C_classLit, 42, -1, [9141]), initValues(_3C_classLit, 42, -1, [9181]), initValues(_3C_classLit, 42, -1, [8899]), initValues(_3C_classLit, 42, -1, [8846]), initValues(_3C_classLit, 42, -1, [370]), initValues(_3C_classLit, 42, -1, [55349, 56652]), initValues(_3C_classLit, 42, -1, [8593]), initValues(_3C_classLit, 42, -1, [10514]), initValues(_3C_classLit, 42, -1, [8645]), initValues(_3C_classLit, 42, -1, [8597]), initValues(_3C_classLit, 42, -1, [10606]), initValues(_3C_classLit, 42, -1, [8869]), initValues(_3C_classLit, 42, -1, [8613]), initValues(_3C_classLit, 42, -1, [8657]), initValues(_3C_classLit, 42, -1, [8661]), initValues(_3C_classLit, 42, -1, [8598]), initValues(_3C_classLit, 42, -1, [8599]), initValues(_3C_classLit, 42, -1, [978]), initValues(_3C_classLit, 42, -1, [933]), initValues(_3C_classLit, 42, -1, [366]), initValues(_3C_classLit, 42, -1, [55349, 56496]), initValues(_3C_classLit, 42, -1, [360]), initValues(_3C_classLit, 42, -1, [220]), initValues(_3C_classLit, 42, -1, [220]), initValues(_3C_classLit, 42, -1, [8875]), initValues(_3C_classLit, 42, -1, [10987]), initValues(_3C_classLit, 42, -1, [1042]), initValues(_3C_classLit, 42, -1, [8873]), initValues(_3C_classLit, 42, -1, [10982]), initValues(_3C_classLit, 42, -1, [8897]), initValues(_3C_classLit, 42, -1, [8214]), initValues(_3C_classLit, 42, -1, [8214]), initValues(_3C_classLit, 42, -1, [8739]), initValues(_3C_classLit, 42, -1, [124]), initValues(_3C_classLit, 42, -1, [10072]), initValues(_3C_classLit, 42, -1, [8768]), initValues(_3C_classLit, 42, -1, [8202]), initValues(_3C_classLit, 42, -1, [55349, 56601]), initValues(_3C_classLit, 42, -1, [55349, 56653]), initValues(_3C_classLit, 42, -1, [55349, 56497]), initValues(_3C_classLit, 42, -1, [8874]), initValues(_3C_classLit, 42, -1, [372]), initValues(_3C_classLit, 42, -1, [8896]), initValues(_3C_classLit, 42, -1, [55349, 56602]), initValues(_3C_classLit, 42, -1, [55349, 56654]), initValues(_3C_classLit, 42, -1, [55349, 56498]), initValues(_3C_classLit, 42, -1, [55349, 56603]), initValues(_3C_classLit, 42, -1, [926]), initValues(_3C_classLit, 42, -1, [55349, 56655]), initValues(_3C_classLit, 42, -1, [55349, 56499]), initValues(_3C_classLit, 42, -1, [1071]), initValues(_3C_classLit, 42, -1, [1031]), initValues(_3C_classLit, 42, -1, [1070]), initValues(_3C_classLit, 42, -1, [221]), initValues(_3C_classLit, 42, -1, [221]), initValues(_3C_classLit, 42, -1, [374]), initValues(_3C_classLit, 42, -1, [1067]), initValues(_3C_classLit, 42, -1, [55349, 56604]), initValues(_3C_classLit, 42, -1, [55349, 56656]), initValues(_3C_classLit, 42, -1, [55349, 56500]), initValues(_3C_classLit, 42, -1, [376]), initValues(_3C_classLit, 42, -1, [1046]), initValues(_3C_classLit, 42, -1, [377]), initValues(_3C_classLit, 42, -1, [381]), initValues(_3C_classLit, 42, -1, [1047]), initValues(_3C_classLit, 42, -1, [379]), initValues(_3C_classLit, 42, -1, [8203]), initValues(_3C_classLit, 42, -1, [918]), initValues(_3C_classLit, 42, -1, [8488]), initValues(_3C_classLit, 42, -1, [8484]), initValues(_3C_classLit, 42, -1, [55349, 56501]), initValues(_3C_classLit, 42, -1, [225]), initValues(_3C_classLit, 42, -1, [225]), initValues(_3C_classLit, 42, -1, [259]), initValues(_3C_classLit, 42, -1, [8766]), initValues(_3C_classLit, 42, -1, [8767]), initValues(_3C_classLit, 42, -1, [226]), initValues(_3C_classLit, 42, -1, [226]), initValues(_3C_classLit, 42, -1, [180]), initValues(_3C_classLit, 42, -1, [180]), initValues(_3C_classLit, 42, -1, [1072]), initValues(_3C_classLit, 42, -1, [230]), initValues(_3C_classLit, 42, -1, [230]), initValues(_3C_classLit, 42, -1, [8289]), initValues(_3C_classLit, 42, -1, [55349, 56606]), initValues(_3C_classLit, 42, -1, [224]), initValues(_3C_classLit, 42, -1, [224]), initValues(_3C_classLit, 42, -1, [8501]), initValues(_3C_classLit, 42, -1, [8501]), initValues(_3C_classLit, 42, -1, [945]), initValues(_3C_classLit, 42, -1, [257]), initValues(_3C_classLit, 42, -1, [10815]), initValues(_3C_classLit, 42, -1, [38]), initValues(_3C_classLit, 42, -1, [38]), initValues(_3C_classLit, 42, -1, [8743]), initValues(_3C_classLit, 42, -1, [10837]), initValues(_3C_classLit, 42, -1, [10844]), initValues(_3C_classLit, 42, -1, [10840]), initValues(_3C_classLit, 42, -1, [10842]), initValues(_3C_classLit, 42, -1, [8736]), initValues(_3C_classLit, 42, -1, [10660]), initValues(_3C_classLit, 42, -1, [8736]), initValues(_3C_classLit, 42, -1, [8737]), initValues(_3C_classLit, 42, -1, [10664]), initValues(_3C_classLit, 42, -1, [10665]), initValues(_3C_classLit, 42, -1, [10666]), initValues(_3C_classLit, 42, -1, [10667]), initValues(_3C_classLit, 42, -1, [10668]), initValues(_3C_classLit, 42, -1, [10669]), initValues(_3C_classLit, 42, -1, [10670]), initValues(_3C_classLit, 42, -1, [10671]), initValues(_3C_classLit, 42, -1, [8735]), initValues(_3C_classLit, 42, -1, [8894]), initValues(_3C_classLit, 42, -1, [10653]), initValues(_3C_classLit, 42, -1, [8738]), initValues(_3C_classLit, 42, -1, [8491]), initValues(_3C_classLit, 42, -1, [9084]), initValues(_3C_classLit, 42, -1, [261]), initValues(_3C_classLit, 42, -1, [55349, 56658]), initValues(_3C_classLit, 42, -1, [8776]), initValues(_3C_classLit, 42, -1, [10864]), initValues(_3C_classLit, 42, -1, [10863]), initValues(_3C_classLit, 42, -1, [8778]), initValues(_3C_classLit, 42, -1, [8779]), initValues(_3C_classLit, 42, -1, [39]), initValues(_3C_classLit, 42, -1, [8776]), initValues(_3C_classLit, 42, -1, [8778]), initValues(_3C_classLit, 42, -1, [229]), initValues(_3C_classLit, 42, -1, [229]), initValues(_3C_classLit, 42, -1, [55349, 56502]), initValues(_3C_classLit, 42, -1, [42]), initValues(_3C_classLit, 42, -1, [8776]), initValues(_3C_classLit, 42, -1, [8781]), initValues(_3C_classLit, 42, -1, [227]), initValues(_3C_classLit, 42, -1, [227]), initValues(_3C_classLit, 42, -1, [228]), initValues(_3C_classLit, 42, -1, [228]), initValues(_3C_classLit, 42, -1, [8755]), initValues(_3C_classLit, 42, -1, [10769]), initValues(_3C_classLit, 42, -1, [10989]), initValues(_3C_classLit, 42, -1, [8780]), initValues(_3C_classLit, 42, -1, [1014]), initValues(_3C_classLit, 42, -1, [8245]), initValues(_3C_classLit, 42, -1, [8765]), initValues(_3C_classLit, 42, -1, [8909]), initValues(_3C_classLit, 42, -1, [8893]), initValues(_3C_classLit, 42, -1, [8965]), initValues(_3C_classLit, 42, -1, [8965]), initValues(_3C_classLit, 42, -1, [9141]), initValues(_3C_classLit, 42, -1, [9142]), initValues(_3C_classLit, 42, -1, [8780]), initValues(_3C_classLit, 42, -1, [1073]), initValues(_3C_classLit, 42, -1, [8222]), initValues(_3C_classLit, 42, -1, [8757]), initValues(_3C_classLit, 42, -1, [8757]), initValues(_3C_classLit, 42, -1, [10672]), initValues(_3C_classLit, 42, -1, [1014]), initValues(_3C_classLit, 42, -1, [8492]), initValues(_3C_classLit, 42, -1, [946]), initValues(_3C_classLit, 42, -1, [8502]), initValues(_3C_classLit, 42, -1, [8812]), initValues(_3C_classLit, 42, -1, [55349, 56607]), initValues(_3C_classLit, 42, -1, [8898]), initValues(_3C_classLit, 42, -1, [9711]), initValues(_3C_classLit, 42, -1, [8899]), initValues(_3C_classLit, 42, -1, [10752]), initValues(_3C_classLit, 42, -1, [10753]), initValues(_3C_classLit, 42, -1, [10754]), initValues(_3C_classLit, 42, -1, [10758]), initValues(_3C_classLit, 42, -1, [9733]), initValues(_3C_classLit, 42, -1, [9661]), initValues(_3C_classLit, 42, -1, [9651]), initValues(_3C_classLit, 42, -1, [10756]), initValues(_3C_classLit, 42, -1, [8897]), initValues(_3C_classLit, 42, -1, [8896]), initValues(_3C_classLit, 42, -1, [10509]), initValues(_3C_classLit, 42, -1, [10731]), initValues(_3C_classLit, 42, -1, [9642]), initValues(_3C_classLit, 42, -1, [9652]), initValues(_3C_classLit, 42, -1, [9662]), initValues(_3C_classLit, 42, -1, [9666]), initValues(_3C_classLit, 42, -1, [9656]), initValues(_3C_classLit, 42, -1, [9251]), initValues(_3C_classLit, 42, -1, [9618]), initValues(_3C_classLit, 42, -1, [9617]), initValues(_3C_classLit, 42, -1, [9619]), initValues(_3C_classLit, 42, -1, [9608]), initValues(_3C_classLit, 42, -1, [8976]), initValues(_3C_classLit, 42, -1, [55349, 56659]), initValues(_3C_classLit, 42, -1, [8869]), initValues(_3C_classLit, 42, -1, [8869]), initValues(_3C_classLit, 42, -1, [8904]), initValues(_3C_classLit, 42, -1, [9559]), initValues(_3C_classLit, 42, -1, [9556]), initValues(_3C_classLit, 42, -1, [9558]), initValues(_3C_classLit, 42, -1, [9555]), initValues(_3C_classLit, 42, -1, [9552]), initValues(_3C_classLit, 42, -1, [9574]), initValues(_3C_classLit, 42, -1, [9577]), initValues(_3C_classLit, 42, -1, [9572]), initValues(_3C_classLit, 42, -1, [9575]), initValues(_3C_classLit, 42, -1, [9565]), initValues(_3C_classLit, 42, -1, [9562]), initValues(_3C_classLit, 42, -1, [9564]), initValues(_3C_classLit, 42, -1, [9561]), initValues(_3C_classLit, 42, -1, [9553]), initValues(_3C_classLit, 42, -1, [9580]), initValues(_3C_classLit, 42, -1, [9571]), initValues(_3C_classLit, 42, -1, [9568]), initValues(_3C_classLit, 42, -1, [9579]), initValues(_3C_classLit, 42, -1, [9570]), initValues(_3C_classLit, 42, -1, [9567]), initValues(_3C_classLit, 42, -1, [10697]), initValues(_3C_classLit, 42, -1, [9557]), initValues(_3C_classLit, 42, -1, [9554]), initValues(_3C_classLit, 42, -1, [9488]), initValues(_3C_classLit, 42, -1, [9484]), initValues(_3C_classLit, 42, -1, [9472]), initValues(_3C_classLit, 42, -1, [9573]), initValues(_3C_classLit, 42, -1, [9576]), initValues(_3C_classLit, 42, -1, [9516]), initValues(_3C_classLit, 42, -1, [9524]), initValues(_3C_classLit, 42, -1, [8863]), initValues(_3C_classLit, 42, -1, [8862]), initValues(_3C_classLit, 42, -1, [8864]), initValues(_3C_classLit, 42, -1, [9563]), initValues(_3C_classLit, 42, -1, [9560]), initValues(_3C_classLit, 42, -1, [9496]), initValues(_3C_classLit, 42, -1, [9492]), initValues(_3C_classLit, 42, -1, [9474]), initValues(_3C_classLit, 42, -1, [9578]), initValues(_3C_classLit, 42, -1, [9569]), initValues(_3C_classLit, 42, -1, [9566]), initValues(_3C_classLit, 42, -1, [9532]), initValues(_3C_classLit, 42, -1, [9508]), initValues(_3C_classLit, 42, -1, [9500]), initValues(_3C_classLit, 42, -1, [8245]), initValues(_3C_classLit, 42, -1, [728]), initValues(_3C_classLit, 42, -1, [166]), initValues(_3C_classLit, 42, -1, [166]), initValues(_3C_classLit, 42, -1, [55349, 56503]), initValues(_3C_classLit, 42, -1, [8271]), initValues(_3C_classLit, 42, -1, [8765]), initValues(_3C_classLit, 42, -1, [8909]), initValues(_3C_classLit, 42, -1, [92]), initValues(_3C_classLit, 42, -1, [10693]), initValues(_3C_classLit, 42, -1, [8226]), initValues(_3C_classLit, 42, -1, [8226]), initValues(_3C_classLit, 42, -1, [8782]), initValues(_3C_classLit, 42, -1, [10926]), initValues(_3C_classLit, 42, -1, [8783]), initValues(_3C_classLit, 42, -1, [8783]), initValues(_3C_classLit, 42, -1, [263]), initValues(_3C_classLit, 42, -1, [8745]), initValues(_3C_classLit, 42, -1, [10820]), initValues(_3C_classLit, 42, -1, [10825]), initValues(_3C_classLit, 42, -1, [10827]), initValues(_3C_classLit, 42, -1, [10823]), initValues(_3C_classLit, 42, -1, [10816]), initValues(_3C_classLit, 42, -1, [8257]), initValues(_3C_classLit, 42, -1, [711]), initValues(_3C_classLit, 42, -1, [10829]), initValues(_3C_classLit, 42, -1, [269]), initValues(_3C_classLit, 42, -1, [231]), initValues(_3C_classLit, 42, -1, [231]), initValues(_3C_classLit, 42, -1, [265]), initValues(_3C_classLit, 42, -1, [10828]), initValues(_3C_classLit, 42, -1, [10832]), initValues(_3C_classLit, 42, -1, [267]), initValues(_3C_classLit, 42, -1, [184]), initValues(_3C_classLit, 42, -1, [184]), initValues(_3C_classLit, 42, -1, [10674]), initValues(_3C_classLit, 42, -1, [162]), initValues(_3C_classLit, 42, -1, [162]), initValues(_3C_classLit, 42, -1, [183]), initValues(_3C_classLit, 42, -1, [55349, 56608]), initValues(_3C_classLit, 42, -1, [1095]), initValues(_3C_classLit, 42, -1, [10003]), initValues(_3C_classLit, 42, -1, [10003]), initValues(_3C_classLit, 42, -1, [967]), initValues(_3C_classLit, 42, -1, [9675]), initValues(_3C_classLit, 42, -1, [10691]), initValues(_3C_classLit, 42, -1, [710]), initValues(_3C_classLit, 42, -1, [8791]), initValues(_3C_classLit, 42, -1, [8634]), initValues(_3C_classLit, 42, -1, [8635]), initValues(_3C_classLit, 42, -1, [174]), initValues(_3C_classLit, 42, -1, [9416]), initValues(_3C_classLit, 42, -1, [8859]), initValues(_3C_classLit, 42, -1, [8858]), initValues(_3C_classLit, 42, -1, [8861]), initValues(_3C_classLit, 42, -1, [8791]), initValues(_3C_classLit, 42, -1, [10768]), initValues(_3C_classLit, 42, -1, [10991]), initValues(_3C_classLit, 42, -1, [10690]), initValues(_3C_classLit, 42, -1, [9827]), initValues(_3C_classLit, 42, -1, [9827]), initValues(_3C_classLit, 42, -1, [58]), initValues(_3C_classLit, 42, -1, [8788]), initValues(_3C_classLit, 42, -1, [8788]), initValues(_3C_classLit, 42, -1, [44]), initValues(_3C_classLit, 42, -1, [64]), initValues(_3C_classLit, 42, -1, [8705]), initValues(_3C_classLit, 42, -1, [8728]), initValues(_3C_classLit, 42, -1, [8705]), initValues(_3C_classLit, 42, -1, [8450]), initValues(_3C_classLit, 42, -1, [8773]), initValues(_3C_classLit, 42, -1, [10861]), initValues(_3C_classLit, 42, -1, [8750]), initValues(_3C_classLit, 42, -1, [55349, 56660]), initValues(_3C_classLit, 42, -1, [8720]), initValues(_3C_classLit, 42, -1, [169]), initValues(_3C_classLit, 42, -1, [169]), initValues(_3C_classLit, 42, -1, [8471]), initValues(_3C_classLit, 42, -1, [8629]), initValues(_3C_classLit, 42, -1, [10007]), initValues(_3C_classLit, 42, -1, [55349, 56504]), initValues(_3C_classLit, 42, -1, [10959]), initValues(_3C_classLit, 42, -1, [10961]), initValues(_3C_classLit, 42, -1, [10960]), initValues(_3C_classLit, 42, -1, [10962]), initValues(_3C_classLit, 42, -1, [8943]), initValues(_3C_classLit, 42, -1, [10552]), initValues(_3C_classLit, 42, -1, [10549]), initValues(_3C_classLit, 42, -1, [8926]), initValues(_3C_classLit, 42, -1, [8927]), initValues(_3C_classLit, 42, -1, [8630]), initValues(_3C_classLit, 42, -1, [10557]), initValues(_3C_classLit, 42, -1, [8746]), initValues(_3C_classLit, 42, -1, [10824]), initValues(_3C_classLit, 42, -1, [10822]), initValues(_3C_classLit, 42, -1, [10826]), initValues(_3C_classLit, 42, -1, [8845]), initValues(_3C_classLit, 42, -1, [10821]), initValues(_3C_classLit, 42, -1, [8631]), initValues(_3C_classLit, 42, -1, [10556]), initValues(_3C_classLit, 42, -1, [8926]), initValues(_3C_classLit, 42, -1, [8927]), initValues(_3C_classLit, 42, -1, [8910]), initValues(_3C_classLit, 42, -1, [8911]), initValues(_3C_classLit, 42, -1, [164]), initValues(_3C_classLit, 42, -1, [164]), initValues(_3C_classLit, 42, -1, [8630]), initValues(_3C_classLit, 42, -1, [8631]), initValues(_3C_classLit, 42, -1, [8910]), initValues(_3C_classLit, 42, -1, [8911]), initValues(_3C_classLit, 42, -1, [8754]), initValues(_3C_classLit, 42, -1, [8753]), initValues(_3C_classLit, 42, -1, [9005]), initValues(_3C_classLit, 42, -1, [8659]), initValues(_3C_classLit, 42, -1, [10597]), initValues(_3C_classLit, 42, -1, [8224]), initValues(_3C_classLit, 42, -1, [8504]), initValues(_3C_classLit, 42, -1, [8595]), initValues(_3C_classLit, 42, -1, [8208]), initValues(_3C_classLit, 42, -1, [8867]), initValues(_3C_classLit, 42, -1, [10511]), initValues(_3C_classLit, 42, -1, [733]), initValues(_3C_classLit, 42, -1, [271]), initValues(_3C_classLit, 42, -1, [1076]), initValues(_3C_classLit, 42, -1, [8518]), initValues(_3C_classLit, 42, -1, [8225]), initValues(_3C_classLit, 42, -1, [8650]), initValues(_3C_classLit, 42, -1, [10871]), initValues(_3C_classLit, 42, -1, [176]), initValues(_3C_classLit, 42, -1, [176]), initValues(_3C_classLit, 42, -1, [948]), initValues(_3C_classLit, 42, -1, [10673]), initValues(_3C_classLit, 42, -1, [10623]), initValues(_3C_classLit, 42, -1, [55349, 56609]), initValues(_3C_classLit, 42, -1, [8643]), initValues(_3C_classLit, 42, -1, [8642]), initValues(_3C_classLit, 42, -1, [8900]), initValues(_3C_classLit, 42, -1, [8900]), initValues(_3C_classLit, 42, -1, [9830]), initValues(_3C_classLit, 42, -1, [9830]), initValues(_3C_classLit, 42, -1, [168]), initValues(_3C_classLit, 42, -1, [989]), initValues(_3C_classLit, 42, -1, [8946]), initValues(_3C_classLit, 42, -1, [247]), initValues(_3C_classLit, 42, -1, [247]), initValues(_3C_classLit, 42, -1, [247]), initValues(_3C_classLit, 42, -1, [8903]), initValues(_3C_classLit, 42, -1, [8903]), initValues(_3C_classLit, 42, -1, [1106]), initValues(_3C_classLit, 42, -1, [8990]), initValues(_3C_classLit, 42, -1, [8973]), initValues(_3C_classLit, 42, -1, [36]), initValues(_3C_classLit, 42, -1, [55349, 56661]), initValues(_3C_classLit, 42, -1, [729]), initValues(_3C_classLit, 42, -1, [8784]), initValues(_3C_classLit, 42, -1, [8785]), initValues(_3C_classLit, 42, -1, [8760]), initValues(_3C_classLit, 42, -1, [8724]), initValues(_3C_classLit, 42, -1, [8865]), initValues(_3C_classLit, 42, -1, [8966]), initValues(_3C_classLit, 42, -1, [8595]), initValues(_3C_classLit, 42, -1, [8650]), initValues(_3C_classLit, 42, -1, [8643]), initValues(_3C_classLit, 42, -1, [8642]), initValues(_3C_classLit, 42, -1, [10512]), initValues(_3C_classLit, 42, -1, [8991]), initValues(_3C_classLit, 42, -1, [8972]), initValues(_3C_classLit, 42, -1, [55349, 56505]), initValues(_3C_classLit, 42, -1, [1109]), initValues(_3C_classLit, 42, -1, [10742]), initValues(_3C_classLit, 42, -1, [273]), initValues(_3C_classLit, 42, -1, [8945]), initValues(_3C_classLit, 42, -1, [9663]), initValues(_3C_classLit, 42, -1, [9662]), initValues(_3C_classLit, 42, -1, [8693]), initValues(_3C_classLit, 42, -1, [10607]), initValues(_3C_classLit, 42, -1, [10662]), initValues(_3C_classLit, 42, -1, [1119]), initValues(_3C_classLit, 42, -1, [10239]), initValues(_3C_classLit, 42, -1, [10871]), initValues(_3C_classLit, 42, -1, [8785]), initValues(_3C_classLit, 42, -1, [233]), initValues(_3C_classLit, 42, -1, [233]), initValues(_3C_classLit, 42, -1, [10862]), initValues(_3C_classLit, 42, -1, [283]), initValues(_3C_classLit, 42, -1, [8790]), initValues(_3C_classLit, 42, -1, [234]), initValues(_3C_classLit, 42, -1, [234]), initValues(_3C_classLit, 42, -1, [8789]), initValues(_3C_classLit, 42, -1, [1101]), initValues(_3C_classLit, 42, -1, [279]), initValues(_3C_classLit, 42, -1, [8519]), initValues(_3C_classLit, 42, -1, [8786]), initValues(_3C_classLit, 42, -1, [55349, 56610]), initValues(_3C_classLit, 42, -1, [10906]), initValues(_3C_classLit, 42, -1, [232]), initValues(_3C_classLit, 42, -1, [232]), initValues(_3C_classLit, 42, -1, [10902]), initValues(_3C_classLit, 42, -1, [10904]), initValues(_3C_classLit, 42, -1, [10905]), initValues(_3C_classLit, 42, -1, [9191]), initValues(_3C_classLit, 42, -1, [8467]), initValues(_3C_classLit, 42, -1, [10901]), initValues(_3C_classLit, 42, -1, [10903]), initValues(_3C_classLit, 42, -1, [275]), initValues(_3C_classLit, 42, -1, [8709]), initValues(_3C_classLit, 42, -1, [8709]), initValues(_3C_classLit, 42, -1, [8709]), initValues(_3C_classLit, 42, -1, [8196]), initValues(_3C_classLit, 42, -1, [8197]), initValues(_3C_classLit, 42, -1, [8195]), initValues(_3C_classLit, 42, -1, [331]), initValues(_3C_classLit, 42, -1, [8194]), initValues(_3C_classLit, 42, -1, [281]), initValues(_3C_classLit, 42, -1, [55349, 56662]), initValues(_3C_classLit, 42, -1, [8917]), initValues(_3C_classLit, 42, -1, [10723]), initValues(_3C_classLit, 42, -1, [10865]), initValues(_3C_classLit, 42, -1, [1013]), initValues(_3C_classLit, 42, -1, [949]), initValues(_3C_classLit, 42, -1, [949]), initValues(_3C_classLit, 42, -1, [8790]), initValues(_3C_classLit, 42, -1, [8789]), initValues(_3C_classLit, 42, -1, [8770]), initValues(_3C_classLit, 42, -1, [10902]), initValues(_3C_classLit, 42, -1, [10901]), initValues(_3C_classLit, 42, -1, [61]), initValues(_3C_classLit, 42, -1, [8799]), initValues(_3C_classLit, 42, -1, [8801]), initValues(_3C_classLit, 42, -1, [10872]), initValues(_3C_classLit, 42, -1, [10725]), initValues(_3C_classLit, 42, -1, [8787]), initValues(_3C_classLit, 42, -1, [10609]), initValues(_3C_classLit, 42, -1, [8495]), initValues(_3C_classLit, 42, -1, [8784]), initValues(_3C_classLit, 42, -1, [8770]), initValues(_3C_classLit, 42, -1, [951]), initValues(_3C_classLit, 42, -1, [240]), initValues(_3C_classLit, 42, -1, [240]), initValues(_3C_classLit, 42, -1, [235]), initValues(_3C_classLit, 42, -1, [235]), initValues(_3C_classLit, 42, -1, [8364]), initValues(_3C_classLit, 42, -1, [33]), initValues(_3C_classLit, 42, -1, [8707]), initValues(_3C_classLit, 42, -1, [8496]), initValues(_3C_classLit, 42, -1, [8519]), initValues(_3C_classLit, 42, -1, [8786]), initValues(_3C_classLit, 42, -1, [1092]), initValues(_3C_classLit, 42, -1, [9792]), initValues(_3C_classLit, 42, -1, [64259]), initValues(_3C_classLit, 42, -1, [64256]), initValues(_3C_classLit, 42, -1, [64260]), initValues(_3C_classLit, 42, -1, [55349, 56611]), initValues(_3C_classLit, 42, -1, [64257]), initValues(_3C_classLit, 42, -1, [9837]), initValues(_3C_classLit, 42, -1, [64258]), initValues(_3C_classLit, 42, -1, [9649]), initValues(_3C_classLit, 42, -1, [402]), initValues(_3C_classLit, 42, -1, [55349, 56663]), initValues(_3C_classLit, 42, -1, [8704]), initValues(_3C_classLit, 42, -1, [8916]), initValues(_3C_classLit, 42, -1, [10969]), initValues(_3C_classLit, 42, -1, [10765]), initValues(_3C_classLit, 42, -1, [189]), initValues(_3C_classLit, 42, -1, [189]), initValues(_3C_classLit, 42, -1, [8531]), initValues(_3C_classLit, 42, -1, [188]), initValues(_3C_classLit, 42, -1, [188]), initValues(_3C_classLit, 42, -1, [8533]), initValues(_3C_classLit, 42, -1, [8537]), initValues(_3C_classLit, 42, -1, [8539]), initValues(_3C_classLit, 42, -1, [8532]), initValues(_3C_classLit, 42, -1, [8534]), initValues(_3C_classLit, 42, -1, [190]), initValues(_3C_classLit, 42, -1, [190]), initValues(_3C_classLit, 42, -1, [8535]), initValues(_3C_classLit, 42, -1, [8540]), initValues(_3C_classLit, 42, -1, [8536]), initValues(_3C_classLit, 42, -1, [8538]), initValues(_3C_classLit, 42, -1, [8541]), initValues(_3C_classLit, 42, -1, [8542]), initValues(_3C_classLit, 42, -1, [8260]), initValues(_3C_classLit, 42, -1, [8994]), initValues(_3C_classLit, 42, -1, [55349, 56507]), initValues(_3C_classLit, 42, -1, [8807]), initValues(_3C_classLit, 42, -1, [10892]), initValues(_3C_classLit, 42, -1, [501]), initValues(_3C_classLit, 42, -1, [947]), initValues(_3C_classLit, 42, -1, [989]), initValues(_3C_classLit, 42, -1, [10886]), initValues(_3C_classLit, 42, -1, [287]), initValues(_3C_classLit, 42, -1, [285]), initValues(_3C_classLit, 42, -1, [1075]), initValues(_3C_classLit, 42, -1, [289]), initValues(_3C_classLit, 42, -1, [8805]), initValues(_3C_classLit, 42, -1, [8923]), initValues(_3C_classLit, 42, -1, [8805]), initValues(_3C_classLit, 42, -1, [8807]), initValues(_3C_classLit, 42, -1, [10878]), initValues(_3C_classLit, 42, -1, [10878]), initValues(_3C_classLit, 42, -1, [10921]), initValues(_3C_classLit, 42, -1, [10880]), initValues(_3C_classLit, 42, -1, [10882]), initValues(_3C_classLit, 42, -1, [10884]), initValues(_3C_classLit, 42, -1, [10900]), initValues(_3C_classLit, 42, -1, [55349, 56612]), initValues(_3C_classLit, 42, -1, [8811]), initValues(_3C_classLit, 42, -1, [8921]), initValues(_3C_classLit, 42, -1, [8503]), initValues(_3C_classLit, 42, -1, [1107]), initValues(_3C_classLit, 42, -1, [8823]), initValues(_3C_classLit, 42, -1, [10898]), initValues(_3C_classLit, 42, -1, [10917]), initValues(_3C_classLit, 42, -1, [10916]), initValues(_3C_classLit, 42, -1, [8809]), initValues(_3C_classLit, 42, -1, [10890]), initValues(_3C_classLit, 42, -1, [10890]), initValues(_3C_classLit, 42, -1, [10888]), initValues(_3C_classLit, 42, -1, [10888]), initValues(_3C_classLit, 42, -1, [8809]), initValues(_3C_classLit, 42, -1, [8935]), initValues(_3C_classLit, 42, -1, [55349, 56664]), initValues(_3C_classLit, 42, -1, [96]), initValues(_3C_classLit, 42, -1, [8458]), initValues(_3C_classLit, 42, -1, [8819]), initValues(_3C_classLit, 42, -1, [10894]), initValues(_3C_classLit, 42, -1, [10896]), initValues(_3C_classLit, 42, -1, [62]), initValues(_3C_classLit, 42, -1, [62]), initValues(_3C_classLit, 42, -1, [10919]), initValues(_3C_classLit, 42, -1, [10874]), initValues(_3C_classLit, 42, -1, [8919]), initValues(_3C_classLit, 42, -1, [10645]), initValues(_3C_classLit, 42, -1, [10876]), initValues(_3C_classLit, 42, -1, [10886]), initValues(_3C_classLit, 42, -1, [10616]), initValues(_3C_classLit, 42, -1, [8919]), initValues(_3C_classLit, 42, -1, [8923]), initValues(_3C_classLit, 42, -1, [10892]), initValues(_3C_classLit, 42, -1, [8823]), initValues(_3C_classLit, 42, -1, [8819]), initValues(_3C_classLit, 42, -1, [8660]), initValues(_3C_classLit, 42, -1, [8202]), initValues(_3C_classLit, 42, -1, [189]), initValues(_3C_classLit, 42, -1, [8459]), initValues(_3C_classLit, 42, -1, [1098]), initValues(_3C_classLit, 42, -1, [8596]), initValues(_3C_classLit, 42, -1, [10568]), initValues(_3C_classLit, 42, -1, [8621]), initValues(_3C_classLit, 42, -1, [8463]), initValues(_3C_classLit, 42, -1, [293]), initValues(_3C_classLit, 42, -1, [9829]), initValues(_3C_classLit, 42, -1, [9829]), initValues(_3C_classLit, 42, -1, [8230]), initValues(_3C_classLit, 42, -1, [8889]), initValues(_3C_classLit, 42, -1, [55349, 56613]), initValues(_3C_classLit, 42, -1, [10533]), initValues(_3C_classLit, 42, -1, [10534]), initValues(_3C_classLit, 42, -1, [8703]), initValues(_3C_classLit, 42, -1, [8763]), initValues(_3C_classLit, 42, -1, [8617]), initValues(_3C_classLit, 42, -1, [8618]), initValues(_3C_classLit, 42, -1, [55349, 56665]), initValues(_3C_classLit, 42, -1, [8213]), initValues(_3C_classLit, 42, -1, [55349, 56509]), initValues(_3C_classLit, 42, -1, [8463]), initValues(_3C_classLit, 42, -1, [295]), initValues(_3C_classLit, 42, -1, [8259]), initValues(_3C_classLit, 42, -1, [8208]), initValues(_3C_classLit, 42, -1, [237]), initValues(_3C_classLit, 42, -1, [237]), initValues(_3C_classLit, 42, -1, [8291]), initValues(_3C_classLit, 42, -1, [238]), initValues(_3C_classLit, 42, -1, [238]), initValues(_3C_classLit, 42, -1, [1080]), initValues(_3C_classLit, 42, -1, [1077]), initValues(_3C_classLit, 42, -1, [161]), initValues(_3C_classLit, 42, -1, [161]), initValues(_3C_classLit, 42, -1, [8660]), initValues(_3C_classLit, 42, -1, [55349, 56614]), initValues(_3C_classLit, 42, -1, [236]), initValues(_3C_classLit, 42, -1, [236]), initValues(_3C_classLit, 42, -1, [8520]), initValues(_3C_classLit, 42, -1, [10764]), initValues(_3C_classLit, 42, -1, [8749]), initValues(_3C_classLit, 42, -1, [10716]), initValues(_3C_classLit, 42, -1, [8489]), initValues(_3C_classLit, 42, -1, [307]), initValues(_3C_classLit, 42, -1, [299]), initValues(_3C_classLit, 42, -1, [8465]), initValues(_3C_classLit, 42, -1, [8464]), initValues(_3C_classLit, 42, -1, [8465]), initValues(_3C_classLit, 42, -1, [305]), initValues(_3C_classLit, 42, -1, [8887]), initValues(_3C_classLit, 42, -1, [437]), initValues(_3C_classLit, 42, -1, [8712]), initValues(_3C_classLit, 42, -1, [8453]), initValues(_3C_classLit, 42, -1, [8734]), initValues(_3C_classLit, 42, -1, [10717]), initValues(_3C_classLit, 42, -1, [305]), initValues(_3C_classLit, 42, -1, [8747]), initValues(_3C_classLit, 42, -1, [8890]), initValues(_3C_classLit, 42, -1, [8484]), initValues(_3C_classLit, 42, -1, [8890]), initValues(_3C_classLit, 42, -1, [10775]), initValues(_3C_classLit, 42, -1, [10812]), initValues(_3C_classLit, 42, -1, [1105]), initValues(_3C_classLit, 42, -1, [303]), initValues(_3C_classLit, 42, -1, [55349, 56666]), initValues(_3C_classLit, 42, -1, [953]), initValues(_3C_classLit, 42, -1, [10812]), initValues(_3C_classLit, 42, -1, [191]), initValues(_3C_classLit, 42, -1, [191]), initValues(_3C_classLit, 42, -1, [55349, 56510]), initValues(_3C_classLit, 42, -1, [8712]), initValues(_3C_classLit, 42, -1, [8953]), initValues(_3C_classLit, 42, -1, [8949]), initValues(_3C_classLit, 42, -1, [8948]), initValues(_3C_classLit, 42, -1, [8947]), initValues(_3C_classLit, 42, -1, [8712]), initValues(_3C_classLit, 42, -1, [8290]), initValues(_3C_classLit, 42, -1, [297]), initValues(_3C_classLit, 42, -1, [1110]), initValues(_3C_classLit, 42, -1, [239]), initValues(_3C_classLit, 42, -1, [239]), initValues(_3C_classLit, 42, -1, [309]), initValues(_3C_classLit, 42, -1, [1081]), initValues(_3C_classLit, 42, -1, [55349, 56615]), initValues(_3C_classLit, 42, -1, [567]), initValues(_3C_classLit, 42, -1, [55349, 56667]), initValues(_3C_classLit, 42, -1, [55349, 56511]), initValues(_3C_classLit, 42, -1, [1112]), initValues(_3C_classLit, 42, -1, [1108]), initValues(_3C_classLit, 42, -1, [954]), initValues(_3C_classLit, 42, -1, [1008]), initValues(_3C_classLit, 42, -1, [311]), initValues(_3C_classLit, 42, -1, [1082]), initValues(_3C_classLit, 42, -1, [55349, 56616]), initValues(_3C_classLit, 42, -1, [312]), initValues(_3C_classLit, 42, -1, [1093]), initValues(_3C_classLit, 42, -1, [1116]), initValues(_3C_classLit, 42, -1, [55349, 56668]), initValues(_3C_classLit, 42, -1, [55349, 56512]), initValues(_3C_classLit, 42, -1, [8666]), initValues(_3C_classLit, 42, -1, [8656]), initValues(_3C_classLit, 42, -1, [10523]), initValues(_3C_classLit, 42, -1, [10510]), initValues(_3C_classLit, 42, -1, [8806]), initValues(_3C_classLit, 42, -1, [10891]), initValues(_3C_classLit, 42, -1, [10594]), initValues(_3C_classLit, 42, -1, [314]), initValues(_3C_classLit, 42, -1, [10676]), initValues(_3C_classLit, 42, -1, [8466]), initValues(_3C_classLit, 42, -1, [955]), initValues(_3C_classLit, 42, -1, [10216]), initValues(_3C_classLit, 42, -1, [10641]), initValues(_3C_classLit, 42, -1, [10216]), initValues(_3C_classLit, 42, -1, [10885]), initValues(_3C_classLit, 42, -1, [171]), initValues(_3C_classLit, 42, -1, [171]), initValues(_3C_classLit, 42, -1, [8592]), initValues(_3C_classLit, 42, -1, [8676]), initValues(_3C_classLit, 42, -1, [10527]), initValues(_3C_classLit, 42, -1, [10525]), initValues(_3C_classLit, 42, -1, [8617]), initValues(_3C_classLit, 42, -1, [8619]), initValues(_3C_classLit, 42, -1, [10553]), initValues(_3C_classLit, 42, -1, [10611]), initValues(_3C_classLit, 42, -1, [8610]), initValues(_3C_classLit, 42, -1, [10923]), initValues(_3C_classLit, 42, -1, [10521]), initValues(_3C_classLit, 42, -1, [10925]), initValues(_3C_classLit, 42, -1, [10508]), initValues(_3C_classLit, 42, -1, [10098]), initValues(_3C_classLit, 42, -1, [123]), initValues(_3C_classLit, 42, -1, [91]), initValues(_3C_classLit, 42, -1, [10635]), initValues(_3C_classLit, 42, -1, [10639]), initValues(_3C_classLit, 42, -1, [10637]), initValues(_3C_classLit, 42, -1, [318]), initValues(_3C_classLit, 42, -1, [316]), initValues(_3C_classLit, 42, -1, [8968]), initValues(_3C_classLit, 42, -1, [123]), initValues(_3C_classLit, 42, -1, [1083]), initValues(_3C_classLit, 42, -1, [10550]), initValues(_3C_classLit, 42, -1, [8220]), initValues(_3C_classLit, 42, -1, [8222]), initValues(_3C_classLit, 42, -1, [10599]), initValues(_3C_classLit, 42, -1, [10571]), initValues(_3C_classLit, 42, -1, [8626]), initValues(_3C_classLit, 42, -1, [8804]), initValues(_3C_classLit, 42, -1, [8592]), initValues(_3C_classLit, 42, -1, [8610]), initValues(_3C_classLit, 42, -1, [8637]), initValues(_3C_classLit, 42, -1, [8636]), initValues(_3C_classLit, 42, -1, [8647]), initValues(_3C_classLit, 42, -1, [8596]), initValues(_3C_classLit, 42, -1, [8646]), initValues(_3C_classLit, 42, -1, [8651]), initValues(_3C_classLit, 42, -1, [8621]), initValues(_3C_classLit, 42, -1, [8907]), initValues(_3C_classLit, 42, -1, [8922]), initValues(_3C_classLit, 42, -1, [8804]), initValues(_3C_classLit, 42, -1, [8806]), initValues(_3C_classLit, 42, -1, [10877]), initValues(_3C_classLit, 42, -1, [10877]), initValues(_3C_classLit, 42, -1, [10920]), initValues(_3C_classLit, 42, -1, [10879]), initValues(_3C_classLit, 42, -1, [10881]), initValues(_3C_classLit, 42, -1, [10883]), initValues(_3C_classLit, 42, -1, [10899]), initValues(_3C_classLit, 42, -1, [10885]), initValues(_3C_classLit, 42, -1, [8918]), initValues(_3C_classLit, 42, -1, [8922]), initValues(_3C_classLit, 42, -1, [10891]), initValues(_3C_classLit, 42, -1, [8822]), initValues(_3C_classLit, 42, -1, [8818]), initValues(_3C_classLit, 42, -1, [10620]), initValues(_3C_classLit, 42, -1, [8970]), initValues(_3C_classLit, 42, -1, [55349, 56617]), initValues(_3C_classLit, 42, -1, [8822]), initValues(_3C_classLit, 42, -1, [10897]), initValues(_3C_classLit, 42, -1, [8637]), initValues(_3C_classLit, 42, -1, [8636]), initValues(_3C_classLit, 42, -1, [10602]), initValues(_3C_classLit, 42, -1, [9604]), initValues(_3C_classLit, 42, -1, [1113]), initValues(_3C_classLit, 42, -1, [8810]), initValues(_3C_classLit, 42, -1, [8647]), initValues(_3C_classLit, 42, -1, [8990]), initValues(_3C_classLit, 42, -1, [10603]), initValues(_3C_classLit, 42, -1, [9722]), initValues(_3C_classLit, 42, -1, [320]), initValues(_3C_classLit, 42, -1, [9136]), initValues(_3C_classLit, 42, -1, [9136]), initValues(_3C_classLit, 42, -1, [8808]), initValues(_3C_classLit, 42, -1, [10889]), initValues(_3C_classLit, 42, -1, [10889]), initValues(_3C_classLit, 42, -1, [10887]), initValues(_3C_classLit, 42, -1, [10887]), initValues(_3C_classLit, 42, -1, [8808]), initValues(_3C_classLit, 42, -1, [8934]), initValues(_3C_classLit, 42, -1, [10220]), initValues(_3C_classLit, 42, -1, [8701]), initValues(_3C_classLit, 42, -1, [10214]), initValues(_3C_classLit, 42, -1, [10229]), initValues(_3C_classLit, 42, -1, [10231]), initValues(_3C_classLit, 42, -1, [10236]), initValues(_3C_classLit, 42, -1, [10230]), initValues(_3C_classLit, 42, -1, [8619]), initValues(_3C_classLit, 42, -1, [8620]), initValues(_3C_classLit, 42, -1, [10629]), initValues(_3C_classLit, 42, -1, [55349, 56669]), initValues(_3C_classLit, 42, -1, [10797]), initValues(_3C_classLit, 42, -1, [10804]), initValues(_3C_classLit, 42, -1, [8727]), initValues(_3C_classLit, 42, -1, [95]), initValues(_3C_classLit, 42, -1, [9674]), initValues(_3C_classLit, 42, -1, [9674]), initValues(_3C_classLit, 42, -1, [10731]), initValues(_3C_classLit, 42, -1, [40]), initValues(_3C_classLit, 42, -1, [10643]), initValues(_3C_classLit, 42, -1, [8646]), initValues(_3C_classLit, 42, -1, [8991]), initValues(_3C_classLit, 42, -1, [8651]), initValues(_3C_classLit, 42, -1, [10605]), initValues(_3C_classLit, 42, -1, [8206]), initValues(_3C_classLit, 42, -1, [8895]), initValues(_3C_classLit, 42, -1, [8249]), initValues(_3C_classLit, 42, -1, [55349, 56513]), initValues(_3C_classLit, 42, -1, [8624]), initValues(_3C_classLit, 42, -1, [8818]), initValues(_3C_classLit, 42, -1, [10893]), initValues(_3C_classLit, 42, -1, [10895]), initValues(_3C_classLit, 42, -1, [91]), initValues(_3C_classLit, 42, -1, [8216]), initValues(_3C_classLit, 42, -1, [8218]), initValues(_3C_classLit, 42, -1, [322]), initValues(_3C_classLit, 42, -1, [60]), initValues(_3C_classLit, 42, -1, [60]), initValues(_3C_classLit, 42, -1, [10918]), initValues(_3C_classLit, 42, -1, [10873]), initValues(_3C_classLit, 42, -1, [8918]), initValues(_3C_classLit, 42, -1, [8907]), initValues(_3C_classLit, 42, -1, [8905]), initValues(_3C_classLit, 42, -1, [10614]), initValues(_3C_classLit, 42, -1, [10875]), initValues(_3C_classLit, 42, -1, [10646]), initValues(_3C_classLit, 42, -1, [9667]), initValues(_3C_classLit, 42, -1, [8884]), initValues(_3C_classLit, 42, -1, [9666]), initValues(_3C_classLit, 42, -1, [10570]), initValues(_3C_classLit, 42, -1, [10598]), initValues(_3C_classLit, 42, -1, [8762]), initValues(_3C_classLit, 42, -1, [175]), initValues(_3C_classLit, 42, -1, [175]), initValues(_3C_classLit, 42, -1, [9794]), initValues(_3C_classLit, 42, -1, [10016]), initValues(_3C_classLit, 42, -1, [10016]), initValues(_3C_classLit, 42, -1, [8614]), initValues(_3C_classLit, 42, -1, [8614]), initValues(_3C_classLit, 42, -1, [8615]), initValues(_3C_classLit, 42, -1, [8612]), initValues(_3C_classLit, 42, -1, [8613]), initValues(_3C_classLit, 42, -1, [9646]), initValues(_3C_classLit, 42, -1, [10793]), initValues(_3C_classLit, 42, -1, [1084]), initValues(_3C_classLit, 42, -1, [8212]), initValues(_3C_classLit, 42, -1, [8737]), initValues(_3C_classLit, 42, -1, [55349, 56618]), initValues(_3C_classLit, 42, -1, [8487]), initValues(_3C_classLit, 42, -1, [181]), initValues(_3C_classLit, 42, -1, [181]), initValues(_3C_classLit, 42, -1, [8739]), initValues(_3C_classLit, 42, -1, [42]), initValues(_3C_classLit, 42, -1, [10992]), initValues(_3C_classLit, 42, -1, [183]), initValues(_3C_classLit, 42, -1, [183]), initValues(_3C_classLit, 42, -1, [8722]), initValues(_3C_classLit, 42, -1, [8863]), initValues(_3C_classLit, 42, -1, [8760]), initValues(_3C_classLit, 42, -1, [10794]), initValues(_3C_classLit, 42, -1, [10971]), initValues(_3C_classLit, 42, -1, [8230]), initValues(_3C_classLit, 42, -1, [8723]), initValues(_3C_classLit, 42, -1, [8871]), initValues(_3C_classLit, 42, -1, [55349, 56670]), initValues(_3C_classLit, 42, -1, [8723]), initValues(_3C_classLit, 42, -1, [55349, 56514]), initValues(_3C_classLit, 42, -1, [8766]), initValues(_3C_classLit, 42, -1, [956]), initValues(_3C_classLit, 42, -1, [8888]), initValues(_3C_classLit, 42, -1, [8888]), initValues(_3C_classLit, 42, -1, [8653]), initValues(_3C_classLit, 42, -1, [8654]), initValues(_3C_classLit, 42, -1, [8655]), initValues(_3C_classLit, 42, -1, [8879]), initValues(_3C_classLit, 42, -1, [8878]), initValues(_3C_classLit, 42, -1, [8711]), initValues(_3C_classLit, 42, -1, [324]), initValues(_3C_classLit, 42, -1, [8777]), initValues(_3C_classLit, 42, -1, [329]), initValues(_3C_classLit, 42, -1, [8777]), initValues(_3C_classLit, 42, -1, [9838]), initValues(_3C_classLit, 42, -1, [9838]), initValues(_3C_classLit, 42, -1, [8469]), initValues(_3C_classLit, 42, -1, [160]), initValues(_3C_classLit, 42, -1, [160]), initValues(_3C_classLit, 42, -1, [10819]), initValues(_3C_classLit, 42, -1, [328]), initValues(_3C_classLit, 42, -1, [326]), initValues(_3C_classLit, 42, -1, [8775]), initValues(_3C_classLit, 42, -1, [10818]), initValues(_3C_classLit, 42, -1, [1085]), initValues(_3C_classLit, 42, -1, [8211]), initValues(_3C_classLit, 42, -1, [8800]), initValues(_3C_classLit, 42, -1, [8663]), initValues(_3C_classLit, 42, -1, [10532]), initValues(_3C_classLit, 42, -1, [8599]), initValues(_3C_classLit, 42, -1, [8599]), initValues(_3C_classLit, 42, -1, [8802]), initValues(_3C_classLit, 42, -1, [10536]), initValues(_3C_classLit, 42, -1, [8708]), initValues(_3C_classLit, 42, -1, [8708]), initValues(_3C_classLit, 42, -1, [55349, 56619]), initValues(_3C_classLit, 42, -1, [8817]), initValues(_3C_classLit, 42, -1, [8817]), initValues(_3C_classLit, 42, -1, [8821]), initValues(_3C_classLit, 42, -1, [8815]), initValues(_3C_classLit, 42, -1, [8815]), initValues(_3C_classLit, 42, -1, [8654]), initValues(_3C_classLit, 42, -1, [8622]), initValues(_3C_classLit, 42, -1, [10994]), initValues(_3C_classLit, 42, -1, [8715]), initValues(_3C_classLit, 42, -1, [8956]), initValues(_3C_classLit, 42, -1, [8954]), initValues(_3C_classLit, 42, -1, [8715]), initValues(_3C_classLit, 42, -1, [1114]), initValues(_3C_classLit, 42, -1, [8653]), initValues(_3C_classLit, 42, -1, [8602]), initValues(_3C_classLit, 42, -1, [8229]), initValues(_3C_classLit, 42, -1, [8816]), initValues(_3C_classLit, 42, -1, [8602]), initValues(_3C_classLit, 42, -1, [8622]), initValues(_3C_classLit, 42, -1, [8816]), initValues(_3C_classLit, 42, -1, [8814]), initValues(_3C_classLit, 42, -1, [8820]), initValues(_3C_classLit, 42, -1, [8814]), initValues(_3C_classLit, 42, -1, [8938]), initValues(_3C_classLit, 42, -1, [8940]), initValues(_3C_classLit, 42, -1, [8740]), initValues(_3C_classLit, 42, -1, [55349, 56671]), initValues(_3C_classLit, 42, -1, [172]), initValues(_3C_classLit, 42, -1, [172]), initValues(_3C_classLit, 42, -1, [8713]), initValues(_3C_classLit, 42, -1, [8713]), initValues(_3C_classLit, 42, -1, [8951]), initValues(_3C_classLit, 42, -1, [8950]), initValues(_3C_classLit, 42, -1, [8716]), initValues(_3C_classLit, 42, -1, [8716]), initValues(_3C_classLit, 42, -1, [8958]), initValues(_3C_classLit, 42, -1, [8957]), initValues(_3C_classLit, 42, -1, [8742]), initValues(_3C_classLit, 42, -1, [8742]), initValues(_3C_classLit, 42, -1, [10772]), initValues(_3C_classLit, 42, -1, [8832]), initValues(_3C_classLit, 42, -1, [8928]), initValues(_3C_classLit, 42, -1, [8832]), initValues(_3C_classLit, 42, -1, [8655]), initValues(_3C_classLit, 42, -1, [8603]), initValues(_3C_classLit, 42, -1, [8603]), initValues(_3C_classLit, 42, -1, [8939]), initValues(_3C_classLit, 42, -1, [8941]), initValues(_3C_classLit, 42, -1, [8833]), initValues(_3C_classLit, 42, -1, [8929]), initValues(_3C_classLit, 42, -1, [55349, 56515]), initValues(_3C_classLit, 42, -1, [8740]), initValues(_3C_classLit, 42, -1, [8742]), initValues(_3C_classLit, 42, -1, [8769]), initValues(_3C_classLit, 42, -1, [8772]), initValues(_3C_classLit, 42, -1, [8772]), initValues(_3C_classLit, 42, -1, [8740]), initValues(_3C_classLit, 42, -1, [8742]), initValues(_3C_classLit, 42, -1, [8930]), initValues(_3C_classLit, 42, -1, [8931]), initValues(_3C_classLit, 42, -1, [8836]), initValues(_3C_classLit, 42, -1, [8840]), initValues(_3C_classLit, 42, -1, [8840]), initValues(_3C_classLit, 42, -1, [8833]), initValues(_3C_classLit, 42, -1, [8837]), initValues(_3C_classLit, 42, -1, [8841]), initValues(_3C_classLit, 42, -1, [8841]), initValues(_3C_classLit, 42, -1, [8825]), initValues(_3C_classLit, 42, -1, [241]), initValues(_3C_classLit, 42, -1, [241]), initValues(_3C_classLit, 42, -1, [8824]), initValues(_3C_classLit, 42, -1, [8938]), initValues(_3C_classLit, 42, -1, [8940]), initValues(_3C_classLit, 42, -1, [8939]), initValues(_3C_classLit, 42, -1, [8941]), initValues(_3C_classLit, 42, -1, [957]), initValues(_3C_classLit, 42, -1, [35]), initValues(_3C_classLit, 42, -1, [8470]), initValues(_3C_classLit, 42, -1, [8199]), initValues(_3C_classLit, 42, -1, [8877]), initValues(_3C_classLit, 42, -1, [10500]), initValues(_3C_classLit, 42, -1, [8876]), initValues(_3C_classLit, 42, -1, [10718]), initValues(_3C_classLit, 42, -1, [10498]), initValues(_3C_classLit, 42, -1, [10499]), initValues(_3C_classLit, 42, -1, [8662]), initValues(_3C_classLit, 42, -1, [10531]), initValues(_3C_classLit, 42, -1, [8598]), initValues(_3C_classLit, 42, -1, [8598]), initValues(_3C_classLit, 42, -1, [10535]), initValues(_3C_classLit, 42, -1, [9416]), initValues(_3C_classLit, 42, -1, [243]), initValues(_3C_classLit, 42, -1, [243]), initValues(_3C_classLit, 42, -1, [8859]), initValues(_3C_classLit, 42, -1, [8858]), initValues(_3C_classLit, 42, -1, [244]), initValues(_3C_classLit, 42, -1, [244]), initValues(_3C_classLit, 42, -1, [1086]), initValues(_3C_classLit, 42, -1, [8861]), initValues(_3C_classLit, 42, -1, [337]), initValues(_3C_classLit, 42, -1, [10808]), initValues(_3C_classLit, 42, -1, [8857]), initValues(_3C_classLit, 42, -1, [10684]), initValues(_3C_classLit, 42, -1, [339]), initValues(_3C_classLit, 42, -1, [10687]), initValues(_3C_classLit, 42, -1, [55349, 56620]), initValues(_3C_classLit, 42, -1, [731]), initValues(_3C_classLit, 42, -1, [242]), initValues(_3C_classLit, 42, -1, [242]), initValues(_3C_classLit, 42, -1, [10689]), initValues(_3C_classLit, 42, -1, [10677]), initValues(_3C_classLit, 42, -1, [8486]), initValues(_3C_classLit, 42, -1, [8750]), initValues(_3C_classLit, 42, -1, [8634]), initValues(_3C_classLit, 42, -1, [10686]), initValues(_3C_classLit, 42, -1, [10683]), initValues(_3C_classLit, 42, -1, [8254]), initValues(_3C_classLit, 42, -1, [10688]), initValues(_3C_classLit, 42, -1, [333]), initValues(_3C_classLit, 42, -1, [969]), initValues(_3C_classLit, 42, -1, [959]), initValues(_3C_classLit, 42, -1, [10678]), initValues(_3C_classLit, 42, -1, [8854]), initValues(_3C_classLit, 42, -1, [55349, 56672]), initValues(_3C_classLit, 42, -1, [10679]), initValues(_3C_classLit, 42, -1, [10681]), initValues(_3C_classLit, 42, -1, [8853]), initValues(_3C_classLit, 42, -1, [8744]), initValues(_3C_classLit, 42, -1, [8635]), initValues(_3C_classLit, 42, -1, [10845]), initValues(_3C_classLit, 42, -1, [8500]), initValues(_3C_classLit, 42, -1, [8500]), initValues(_3C_classLit, 42, -1, [170]), initValues(_3C_classLit, 42, -1, [170]), initValues(_3C_classLit, 42, -1, [186]), initValues(_3C_classLit, 42, -1, [186]), initValues(_3C_classLit, 42, -1, [8886]), initValues(_3C_classLit, 42, -1, [10838]), initValues(_3C_classLit, 42, -1, [10839]), initValues(_3C_classLit, 42, -1, [10843]), initValues(_3C_classLit, 42, -1, [8500]), initValues(_3C_classLit, 42, -1, [248]), initValues(_3C_classLit, 42, -1, [248]), initValues(_3C_classLit, 42, -1, [8856]), initValues(_3C_classLit, 42, -1, [245]), initValues(_3C_classLit, 42, -1, [245]), initValues(_3C_classLit, 42, -1, [8855]), initValues(_3C_classLit, 42, -1, [10806]), initValues(_3C_classLit, 42, -1, [246]), initValues(_3C_classLit, 42, -1, [246]), initValues(_3C_classLit, 42, -1, [9021]), initValues(_3C_classLit, 42, -1, [8741]), initValues(_3C_classLit, 42, -1, [182]), initValues(_3C_classLit, 42, -1, [182]), initValues(_3C_classLit, 42, -1, [8741]), initValues(_3C_classLit, 42, -1, [10995]), initValues(_3C_classLit, 42, -1, [11005]), initValues(_3C_classLit, 42, -1, [8706]), initValues(_3C_classLit, 42, -1, [1087]), initValues(_3C_classLit, 42, -1, [37]), initValues(_3C_classLit, 42, -1, [46]), initValues(_3C_classLit, 42, -1, [8240]), initValues(_3C_classLit, 42, -1, [8869]), initValues(_3C_classLit, 42, -1, [8241]), initValues(_3C_classLit, 42, -1, [55349, 56621]), initValues(_3C_classLit, 42, -1, [966]), initValues(_3C_classLit, 42, -1, [966]), initValues(_3C_classLit, 42, -1, [8499]), initValues(_3C_classLit, 42, -1, [9742]), initValues(_3C_classLit, 42, -1, [960]), initValues(_3C_classLit, 42, -1, [8916]), initValues(_3C_classLit, 42, -1, [982]), initValues(_3C_classLit, 42, -1, [8463]), initValues(_3C_classLit, 42, -1, [8462]), initValues(_3C_classLit, 42, -1, [8463]), initValues(_3C_classLit, 42, -1, [43]), initValues(_3C_classLit, 42, -1, [10787]), initValues(_3C_classLit, 42, -1, [8862]), initValues(_3C_classLit, 42, -1, [10786]), initValues(_3C_classLit, 42, -1, [8724]), initValues(_3C_classLit, 42, -1, [10789]), initValues(_3C_classLit, 42, -1, [10866]), initValues(_3C_classLit, 42, -1, [177]), initValues(_3C_classLit, 42, -1, [177]), initValues(_3C_classLit, 42, -1, [10790]), initValues(_3C_classLit, 42, -1, [10791]), initValues(_3C_classLit, 42, -1, [177]), initValues(_3C_classLit, 42, -1, [10773]), initValues(_3C_classLit, 42, -1, [55349, 56673]), initValues(_3C_classLit, 42, -1, [163]), initValues(_3C_classLit, 42, -1, [163]), initValues(_3C_classLit, 42, -1, [8826]), initValues(_3C_classLit, 42, -1, [10931]), initValues(_3C_classLit, 42, -1, [10935]), initValues(_3C_classLit, 42, -1, [8828]), initValues(_3C_classLit, 42, -1, [10927]), initValues(_3C_classLit, 42, -1, [8826]), initValues(_3C_classLit, 42, -1, [10935]), initValues(_3C_classLit, 42, -1, [8828]), initValues(_3C_classLit, 42, -1, [10927]), initValues(_3C_classLit, 42, -1, [10937]), initValues(_3C_classLit, 42, -1, [10933]), initValues(_3C_classLit, 42, -1, [8936]), initValues(_3C_classLit, 42, -1, [8830]), initValues(_3C_classLit, 42, -1, [8242]), initValues(_3C_classLit, 42, -1, [8473]), initValues(_3C_classLit, 42, -1, [10933]), initValues(_3C_classLit, 42, -1, [10937]), initValues(_3C_classLit, 42, -1, [8936]), initValues(_3C_classLit, 42, -1, [8719]), initValues(_3C_classLit, 42, -1, [9006]), initValues(_3C_classLit, 42, -1, [8978]), initValues(_3C_classLit, 42, -1, [8979]), initValues(_3C_classLit, 42, -1, [8733]), initValues(_3C_classLit, 42, -1, [8733]), initValues(_3C_classLit, 42, -1, [8830]), initValues(_3C_classLit, 42, -1, [8880]), initValues(_3C_classLit, 42, -1, [55349, 56517]), initValues(_3C_classLit, 42, -1, [968]), initValues(_3C_classLit, 42, -1, [8200]), initValues(_3C_classLit, 42, -1, [55349, 56622]), initValues(_3C_classLit, 42, -1, [10764]), initValues(_3C_classLit, 42, -1, [55349, 56674]), initValues(_3C_classLit, 42, -1, [8279]), initValues(_3C_classLit, 42, -1, [55349, 56518]), initValues(_3C_classLit, 42, -1, [8461]), initValues(_3C_classLit, 42, -1, [10774]), initValues(_3C_classLit, 42, -1, [63]), initValues(_3C_classLit, 42, -1, [8799]), initValues(_3C_classLit, 42, -1, [34]), initValues(_3C_classLit, 42, -1, [34]), initValues(_3C_classLit, 42, -1, [8667]), initValues(_3C_classLit, 42, -1, [8658]), initValues(_3C_classLit, 42, -1, [10524]), initValues(_3C_classLit, 42, -1, [10511]), initValues(_3C_classLit, 42, -1, [10596]), initValues(_3C_classLit, 42, -1, [10714]), initValues(_3C_classLit, 42, -1, [341]), initValues(_3C_classLit, 42, -1, [8730]), initValues(_3C_classLit, 42, -1, [10675]), initValues(_3C_classLit, 42, -1, [10217]), initValues(_3C_classLit, 42, -1, [10642]), initValues(_3C_classLit, 42, -1, [10661]), initValues(_3C_classLit, 42, -1, [10217]), initValues(_3C_classLit, 42, -1, [187]), initValues(_3C_classLit, 42, -1, [187]), initValues(_3C_classLit, 42, -1, [8594]), initValues(_3C_classLit, 42, -1, [10613]), initValues(_3C_classLit, 42, -1, [8677]), initValues(_3C_classLit, 42, -1, [10528]), initValues(_3C_classLit, 42, -1, [10547]), initValues(_3C_classLit, 42, -1, [10526]), initValues(_3C_classLit, 42, -1, [8618]), initValues(_3C_classLit, 42, -1, [8620]), initValues(_3C_classLit, 42, -1, [10565]), initValues(_3C_classLit, 42, -1, [10612]), initValues(_3C_classLit, 42, -1, [8611]), initValues(_3C_classLit, 42, -1, [8605]), initValues(_3C_classLit, 42, -1, [10522]), initValues(_3C_classLit, 42, -1, [8758]), initValues(_3C_classLit, 42, -1, [8474]), initValues(_3C_classLit, 42, -1, [10509]), initValues(_3C_classLit, 42, -1, [10099]), initValues(_3C_classLit, 42, -1, [125]), initValues(_3C_classLit, 42, -1, [93]), initValues(_3C_classLit, 42, -1, [10636]), initValues(_3C_classLit, 42, -1, [10638]), initValues(_3C_classLit, 42, -1, [10640]), initValues(_3C_classLit, 42, -1, [345]), initValues(_3C_classLit, 42, -1, [343]), initValues(_3C_classLit, 42, -1, [8969]), initValues(_3C_classLit, 42, -1, [125]), initValues(_3C_classLit, 42, -1, [1088]), initValues(_3C_classLit, 42, -1, [10551]), initValues(_3C_classLit, 42, -1, [10601]), initValues(_3C_classLit, 42, -1, [8221]), initValues(_3C_classLit, 42, -1, [8221]), initValues(_3C_classLit, 42, -1, [8627]), initValues(_3C_classLit, 42, -1, [8476]), initValues(_3C_classLit, 42, -1, [8475]), initValues(_3C_classLit, 42, -1, [8476]), initValues(_3C_classLit, 42, -1, [8477]), initValues(_3C_classLit, 42, -1, [9645]), initValues(_3C_classLit, 42, -1, [174]), initValues(_3C_classLit, 42, -1, [174]), initValues(_3C_classLit, 42, -1, [10621]), initValues(_3C_classLit, 42, -1, [8971]), initValues(_3C_classLit, 42, -1, [55349, 56623]), initValues(_3C_classLit, 42, -1, [8641]), initValues(_3C_classLit, 42, -1, [8640]), initValues(_3C_classLit, 42, -1, [10604]), initValues(_3C_classLit, 42, -1, [961]), initValues(_3C_classLit, 42, -1, [1009]), initValues(_3C_classLit, 42, -1, [8594]), initValues(_3C_classLit, 42, -1, [8611]), initValues(_3C_classLit, 42, -1, [8641]), initValues(_3C_classLit, 42, -1, [8640]), initValues(_3C_classLit, 42, -1, [8644]), initValues(_3C_classLit, 42, -1, [8652]), initValues(_3C_classLit, 42, -1, [8649]), initValues(_3C_classLit, 42, -1, [8605]), initValues(_3C_classLit, 42, -1, [8908]), initValues(_3C_classLit, 42, -1, [730]), initValues(_3C_classLit, 42, -1, [8787]), initValues(_3C_classLit, 42, -1, [8644]), initValues(_3C_classLit, 42, -1, [8652]), initValues(_3C_classLit, 42, -1, [8207]), initValues(_3C_classLit, 42, -1, [9137]), initValues(_3C_classLit, 42, -1, [9137]), initValues(_3C_classLit, 42, -1, [10990]), initValues(_3C_classLit, 42, -1, [10221]), initValues(_3C_classLit, 42, -1, [8702]), initValues(_3C_classLit, 42, -1, [10215]), initValues(_3C_classLit, 42, -1, [10630]), initValues(_3C_classLit, 42, -1, [55349, 56675]), initValues(_3C_classLit, 42, -1, [10798]), initValues(_3C_classLit, 42, -1, [10805]), initValues(_3C_classLit, 42, -1, [41]), initValues(_3C_classLit, 42, -1, [10644]), initValues(_3C_classLit, 42, -1, [10770]), initValues(_3C_classLit, 42, -1, [8649]), initValues(_3C_classLit, 42, -1, [8250]), initValues(_3C_classLit, 42, -1, [55349, 56519]), initValues(_3C_classLit, 42, -1, [8625]), initValues(_3C_classLit, 42, -1, [93]), initValues(_3C_classLit, 42, -1, [8217]), initValues(_3C_classLit, 42, -1, [8217]), initValues(_3C_classLit, 42, -1, [8908]), initValues(_3C_classLit, 42, -1, [8906]), initValues(_3C_classLit, 42, -1, [9657]), initValues(_3C_classLit, 42, -1, [8885]), initValues(_3C_classLit, 42, -1, [9656]), initValues(_3C_classLit, 42, -1, [10702]), initValues(_3C_classLit, 42, -1, [10600]), initValues(_3C_classLit, 42, -1, [8478]), initValues(_3C_classLit, 42, -1, [347]), initValues(_3C_classLit, 42, -1, [8218]), initValues(_3C_classLit, 42, -1, [8827]), initValues(_3C_classLit, 42, -1, [10932]), initValues(_3C_classLit, 42, -1, [10936]), initValues(_3C_classLit, 42, -1, [353]), initValues(_3C_classLit, 42, -1, [8829]), initValues(_3C_classLit, 42, -1, [10928]), initValues(_3C_classLit, 42, -1, [351]), initValues(_3C_classLit, 42, -1, [349]), initValues(_3C_classLit, 42, -1, [10934]), initValues(_3C_classLit, 42, -1, [10938]), initValues(_3C_classLit, 42, -1, [8937]), initValues(_3C_classLit, 42, -1, [10771]), initValues(_3C_classLit, 42, -1, [8831]), initValues(_3C_classLit, 42, -1, [1089]), initValues(_3C_classLit, 42, -1, [8901]), initValues(_3C_classLit, 42, -1, [8865]), initValues(_3C_classLit, 42, -1, [10854]), initValues(_3C_classLit, 42, -1, [8664]), initValues(_3C_classLit, 42, -1, [10533]), initValues(_3C_classLit, 42, -1, [8600]), initValues(_3C_classLit, 42, -1, [8600]), initValues(_3C_classLit, 42, -1, [167]), initValues(_3C_classLit, 42, -1, [167]), initValues(_3C_classLit, 42, -1, [59]), initValues(_3C_classLit, 42, -1, [10537]), initValues(_3C_classLit, 42, -1, [8726]), initValues(_3C_classLit, 42, -1, [8726]), initValues(_3C_classLit, 42, -1, [10038]), initValues(_3C_classLit, 42, -1, [55349, 56624]), initValues(_3C_classLit, 42, -1, [8994]), initValues(_3C_classLit, 42, -1, [9839]), initValues(_3C_classLit, 42, -1, [1097]), initValues(_3C_classLit, 42, -1, [1096]), initValues(_3C_classLit, 42, -1, [8739]), initValues(_3C_classLit, 42, -1, [8741]), initValues(_3C_classLit, 42, -1, [173]), initValues(_3C_classLit, 42, -1, [173]), initValues(_3C_classLit, 42, -1, [963]), initValues(_3C_classLit, 42, -1, [962]), initValues(_3C_classLit, 42, -1, [962]), initValues(_3C_classLit, 42, -1, [8764]), initValues(_3C_classLit, 42, -1, [10858]), initValues(_3C_classLit, 42, -1, [8771]), initValues(_3C_classLit, 42, -1, [8771]), initValues(_3C_classLit, 42, -1, [10910]), initValues(_3C_classLit, 42, -1, [10912]), initValues(_3C_classLit, 42, -1, [10909]), initValues(_3C_classLit, 42, -1, [10911]), initValues(_3C_classLit, 42, -1, [8774]), initValues(_3C_classLit, 42, -1, [10788]), initValues(_3C_classLit, 42, -1, [10610]), initValues(_3C_classLit, 42, -1, [8592]), initValues(_3C_classLit, 42, -1, [8726]), initValues(_3C_classLit, 42, -1, [10803]), initValues(_3C_classLit, 42, -1, [10724]), initValues(_3C_classLit, 42, -1, [8739]), initValues(_3C_classLit, 42, -1, [8995]), initValues(_3C_classLit, 42, -1, [10922]), initValues(_3C_classLit, 42, -1, [10924]), initValues(_3C_classLit, 42, -1, [1100]), initValues(_3C_classLit, 42, -1, [47]), initValues(_3C_classLit, 42, -1, [10692]), initValues(_3C_classLit, 42, -1, [9023]), initValues(_3C_classLit, 42, -1, [55349, 56676]), initValues(_3C_classLit, 42, -1, [9824]), initValues(_3C_classLit, 42, -1, [9824]), initValues(_3C_classLit, 42, -1, [8741]), initValues(_3C_classLit, 42, -1, [8851]), initValues(_3C_classLit, 42, -1, [8852]), initValues(_3C_classLit, 42, -1, [8847]), initValues(_3C_classLit, 42, -1, [8849]), initValues(_3C_classLit, 42, -1, [8847]), initValues(_3C_classLit, 42, -1, [8849]), initValues(_3C_classLit, 42, -1, [8848]), initValues(_3C_classLit, 42, -1, [8850]), initValues(_3C_classLit, 42, -1, [8848]), initValues(_3C_classLit, 42, -1, [8850]), initValues(_3C_classLit, 42, -1, [9633]), initValues(_3C_classLit, 42, -1, [9633]), initValues(_3C_classLit, 42, -1, [9642]), initValues(_3C_classLit, 42, -1, [9642]), initValues(_3C_classLit, 42, -1, [8594]), initValues(_3C_classLit, 42, -1, [55349, 56520]), initValues(_3C_classLit, 42, -1, [8726]), initValues(_3C_classLit, 42, -1, [8995]), initValues(_3C_classLit, 42, -1, [8902]), initValues(_3C_classLit, 42, -1, [9734]), initValues(_3C_classLit, 42, -1, [9733]), initValues(_3C_classLit, 42, -1, [1013]), initValues(_3C_classLit, 42, -1, [981]), initValues(_3C_classLit, 42, -1, [175]), initValues(_3C_classLit, 42, -1, [8834]), initValues(_3C_classLit, 42, -1, [10949]), initValues(_3C_classLit, 42, -1, [10941]), initValues(_3C_classLit, 42, -1, [8838]), initValues(_3C_classLit, 42, -1, [10947]), initValues(_3C_classLit, 42, -1, [10945]), initValues(_3C_classLit, 42, -1, [10955]), initValues(_3C_classLit, 42, -1, [8842]), initValues(_3C_classLit, 42, -1, [10943]), initValues(_3C_classLit, 42, -1, [10617]), initValues(_3C_classLit, 42, -1, [8834]), initValues(_3C_classLit, 42, -1, [8838]), initValues(_3C_classLit, 42, -1, [10949]), initValues(_3C_classLit, 42, -1, [8842]), initValues(_3C_classLit, 42, -1, [10955]), initValues(_3C_classLit, 42, -1, [10951]), initValues(_3C_classLit, 42, -1, [10965]), initValues(_3C_classLit, 42, -1, [10963]), initValues(_3C_classLit, 42, -1, [8827]), initValues(_3C_classLit, 42, -1, [10936]), initValues(_3C_classLit, 42, -1, [8829]), initValues(_3C_classLit, 42, -1, [10928]), initValues(_3C_classLit, 42, -1, [10938]), initValues(_3C_classLit, 42, -1, [10934]), initValues(_3C_classLit, 42, -1, [8937]), initValues(_3C_classLit, 42, -1, [8831]), initValues(_3C_classLit, 42, -1, [8721]), initValues(_3C_classLit, 42, -1, [9834]), initValues(_3C_classLit, 42, -1, [185]), initValues(_3C_classLit, 42, -1, [185]), initValues(_3C_classLit, 42, -1, [178]), initValues(_3C_classLit, 42, -1, [178]), initValues(_3C_classLit, 42, -1, [179]), initValues(_3C_classLit, 42, -1, [179]), initValues(_3C_classLit, 42, -1, [8835]), initValues(_3C_classLit, 42, -1, [10950]), initValues(_3C_classLit, 42, -1, [10942]), initValues(_3C_classLit, 42, -1, [10968]), initValues(_3C_classLit, 42, -1, [8839]), initValues(_3C_classLit, 42, -1, [10948]), initValues(_3C_classLit, 42, -1, [10967]), initValues(_3C_classLit, 42, -1, [10619]), initValues(_3C_classLit, 42, -1, [10946]), initValues(_3C_classLit, 42, -1, [10956]), initValues(_3C_classLit, 42, -1, [8843]), initValues(_3C_classLit, 42, -1, [10944]), initValues(_3C_classLit, 42, -1, [8835]), initValues(_3C_classLit, 42, -1, [8839]), initValues(_3C_classLit, 42, -1, [10950]), initValues(_3C_classLit, 42, -1, [8843]), initValues(_3C_classLit, 42, -1, [10956]), initValues(_3C_classLit, 42, -1, [10952]), initValues(_3C_classLit, 42, -1, [10964]), initValues(_3C_classLit, 42, -1, [10966]), initValues(_3C_classLit, 42, -1, [8665]), initValues(_3C_classLit, 42, -1, [10534]), initValues(_3C_classLit, 42, -1, [8601]), initValues(_3C_classLit, 42, -1, [8601]), initValues(_3C_classLit, 42, -1, [10538]), initValues(_3C_classLit, 42, -1, [223]), initValues(_3C_classLit, 42, -1, [223]), initValues(_3C_classLit, 42, -1, [8982]), initValues(_3C_classLit, 42, -1, [964]), initValues(_3C_classLit, 42, -1, [9140]), initValues(_3C_classLit, 42, -1, [357]), initValues(_3C_classLit, 42, -1, [355]), initValues(_3C_classLit, 42, -1, [1090]), initValues(_3C_classLit, 42, -1, [8411]), initValues(_3C_classLit, 42, -1, [8981]), initValues(_3C_classLit, 42, -1, [55349, 56625]), initValues(_3C_classLit, 42, -1, [8756]), initValues(_3C_classLit, 42, -1, [8756]), initValues(_3C_classLit, 42, -1, [952]), initValues(_3C_classLit, 42, -1, [977]), initValues(_3C_classLit, 42, -1, [977]), initValues(_3C_classLit, 42, -1, [8776]), initValues(_3C_classLit, 42, -1, [8764]), initValues(_3C_classLit, 42, -1, [8201]), initValues(_3C_classLit, 42, -1, [8776]), initValues(_3C_classLit, 42, -1, [8764]), initValues(_3C_classLit, 42, -1, [254]), initValues(_3C_classLit, 42, -1, [254]), initValues(_3C_classLit, 42, -1, [732]), initValues(_3C_classLit, 42, -1, [215]), initValues(_3C_classLit, 42, -1, [215]), initValues(_3C_classLit, 42, -1, [8864]), initValues(_3C_classLit, 42, -1, [10801]), initValues(_3C_classLit, 42, -1, [10800]), initValues(_3C_classLit, 42, -1, [8749]), initValues(_3C_classLit, 42, -1, [10536]), initValues(_3C_classLit, 42, -1, [8868]), initValues(_3C_classLit, 42, -1, [9014]), initValues(_3C_classLit, 42, -1, [10993]), initValues(_3C_classLit, 42, -1, [55349, 56677]), initValues(_3C_classLit, 42, -1, [10970]), initValues(_3C_classLit, 42, -1, [10537]), initValues(_3C_classLit, 42, -1, [8244]), initValues(_3C_classLit, 42, -1, [8482]), initValues(_3C_classLit, 42, -1, [9653]), initValues(_3C_classLit, 42, -1, [9663]), initValues(_3C_classLit, 42, -1, [9667]), initValues(_3C_classLit, 42, -1, [8884]), initValues(_3C_classLit, 42, -1, [8796]), initValues(_3C_classLit, 42, -1, [9657]), initValues(_3C_classLit, 42, -1, [8885]), initValues(_3C_classLit, 42, -1, [9708]), initValues(_3C_classLit, 42, -1, [8796]), initValues(_3C_classLit, 42, -1, [10810]), initValues(_3C_classLit, 42, -1, [10809]), initValues(_3C_classLit, 42, -1, [10701]), initValues(_3C_classLit, 42, -1, [10811]), initValues(_3C_classLit, 42, -1, [9186]), initValues(_3C_classLit, 42, -1, [55349, 56521]), initValues(_3C_classLit, 42, -1, [1094]), initValues(_3C_classLit, 42, -1, [1115]), initValues(_3C_classLit, 42, -1, [359]), initValues(_3C_classLit, 42, -1, [8812]), initValues(_3C_classLit, 42, -1, [8606]), initValues(_3C_classLit, 42, -1, [8608]), initValues(_3C_classLit, 42, -1, [8657]), initValues(_3C_classLit, 42, -1, [10595]), initValues(_3C_classLit, 42, -1, [250]), initValues(_3C_classLit, 42, -1, [250]), initValues(_3C_classLit, 42, -1, [8593]), initValues(_3C_classLit, 42, -1, [1118]), initValues(_3C_classLit, 42, -1, [365]), initValues(_3C_classLit, 42, -1, [251]), initValues(_3C_classLit, 42, -1, [251]), initValues(_3C_classLit, 42, -1, [1091]), initValues(_3C_classLit, 42, -1, [8645]), initValues(_3C_classLit, 42, -1, [369]), initValues(_3C_classLit, 42, -1, [10606]), initValues(_3C_classLit, 42, -1, [10622]), initValues(_3C_classLit, 42, -1, [55349, 56626]), initValues(_3C_classLit, 42, -1, [249]), initValues(_3C_classLit, 42, -1, [249]), initValues(_3C_classLit, 42, -1, [8639]), initValues(_3C_classLit, 42, -1, [8638]), initValues(_3C_classLit, 42, -1, [9600]), initValues(_3C_classLit, 42, -1, [8988]), initValues(_3C_classLit, 42, -1, [8988]), initValues(_3C_classLit, 42, -1, [8975]), initValues(_3C_classLit, 42, -1, [9720]), initValues(_3C_classLit, 42, -1, [363]), initValues(_3C_classLit, 42, -1, [168]), initValues(_3C_classLit, 42, -1, [168]), initValues(_3C_classLit, 42, -1, [371]), initValues(_3C_classLit, 42, -1, [55349, 56678]), initValues(_3C_classLit, 42, -1, [8593]), initValues(_3C_classLit, 42, -1, [8597]), initValues(_3C_classLit, 42, -1, [8639]), initValues(_3C_classLit, 42, -1, [8638]), initValues(_3C_classLit, 42, -1, [8846]), initValues(_3C_classLit, 42, -1, [965]), initValues(_3C_classLit, 42, -1, [978]), initValues(_3C_classLit, 42, -1, [965]), initValues(_3C_classLit, 42, -1, [8648]), initValues(_3C_classLit, 42, -1, [8989]), initValues(_3C_classLit, 42, -1, [8989]), initValues(_3C_classLit, 42, -1, [8974]), initValues(_3C_classLit, 42, -1, [367]), initValues(_3C_classLit, 42, -1, [9721]), initValues(_3C_classLit, 42, -1, [55349, 56522]), initValues(_3C_classLit, 42, -1, [8944]), initValues(_3C_classLit, 42, -1, [361]), initValues(_3C_classLit, 42, -1, [9653]), initValues(_3C_classLit, 42, -1, [9652]), initValues(_3C_classLit, 42, -1, [8648]), initValues(_3C_classLit, 42, -1, [252]), initValues(_3C_classLit, 42, -1, [252]), initValues(_3C_classLit, 42, -1, [10663]), initValues(_3C_classLit, 42, -1, [8661]), initValues(_3C_classLit, 42, -1, [10984]), initValues(_3C_classLit, 42, -1, [10985]), initValues(_3C_classLit, 42, -1, [8872]), initValues(_3C_classLit, 42, -1, [10652]), initValues(_3C_classLit, 42, -1, [949]), initValues(_3C_classLit, 42, -1, [1008]), initValues(_3C_classLit, 42, -1, [8709]), initValues(_3C_classLit, 42, -1, [966]), initValues(_3C_classLit, 42, -1, [982]), initValues(_3C_classLit, 42, -1, [8733]), initValues(_3C_classLit, 42, -1, [8597]), initValues(_3C_classLit, 42, -1, [1009]), initValues(_3C_classLit, 42, -1, [962]), initValues(_3C_classLit, 42, -1, [977]), initValues(_3C_classLit, 42, -1, [8882]), initValues(_3C_classLit, 42, -1, [8883]), initValues(_3C_classLit, 42, -1, [1074]), initValues(_3C_classLit, 42, -1, [8866]), initValues(_3C_classLit, 42, -1, [8744]), initValues(_3C_classLit, 42, -1, [8891]), initValues(_3C_classLit, 42, -1, [8794]), initValues(_3C_classLit, 42, -1, [8942]), initValues(_3C_classLit, 42, -1, [124]), initValues(_3C_classLit, 42, -1, [124]), initValues(_3C_classLit, 42, -1, [55349, 56627]), initValues(_3C_classLit, 42, -1, [8882]), initValues(_3C_classLit, 42, -1, [55349, 56679]), initValues(_3C_classLit, 42, -1, [8733]), initValues(_3C_classLit, 42, -1, [8883]), initValues(_3C_classLit, 42, -1, [55349, 56523]), initValues(_3C_classLit, 42, -1, [10650]), initValues(_3C_classLit, 42, -1, [373]), initValues(_3C_classLit, 42, -1, [10847]), initValues(_3C_classLit, 42, -1, [8743]), initValues(_3C_classLit, 42, -1, [8793]), initValues(_3C_classLit, 42, -1, [8472]), initValues(_3C_classLit, 42, -1, [55349, 56628]), initValues(_3C_classLit, 42, -1, [55349, 56680]), initValues(_3C_classLit, 42, -1, [8472]), initValues(_3C_classLit, 42, -1, [8768]), initValues(_3C_classLit, 42, -1, [8768]), initValues(_3C_classLit, 42, -1, [55349, 56524]), initValues(_3C_classLit, 42, -1, [8898]), initValues(_3C_classLit, 42, -1, [9711]), initValues(_3C_classLit, 42, -1, [8899]), initValues(_3C_classLit, 42, -1, [9661]), initValues(_3C_classLit, 42, -1, [55349, 56629]), initValues(_3C_classLit, 42, -1, [10234]), initValues(_3C_classLit, 42, -1, [10231]), initValues(_3C_classLit, 42, -1, [958]), initValues(_3C_classLit, 42, -1, [10232]), initValues(_3C_classLit, 42, -1, [10229]), initValues(_3C_classLit, 42, -1, [10236]), initValues(_3C_classLit, 42, -1, [8955]), initValues(_3C_classLit, 42, -1, [10752]), initValues(_3C_classLit, 42, -1, [55349, 56681]), initValues(_3C_classLit, 42, -1, [10753]), initValues(_3C_classLit, 42, -1, [10754]), initValues(_3C_classLit, 42, -1, [10233]), initValues(_3C_classLit, 42, -1, [10230]), initValues(_3C_classLit, 42, -1, [55349, 56525]), initValues(_3C_classLit, 42, -1, [10758]), initValues(_3C_classLit, 42, -1, [10756]), initValues(_3C_classLit, 42, -1, [9651]), initValues(_3C_classLit, 42, -1, [8897]), initValues(_3C_classLit, 42, -1, [8896]), initValues(_3C_classLit, 42, -1, [253]), initValues(_3C_classLit, 42, -1, [253]), initValues(_3C_classLit, 42, -1, [1103]), initValues(_3C_classLit, 42, -1, [375]), initValues(_3C_classLit, 42, -1, [1099]), initValues(_3C_classLit, 42, -1, [165]), initValues(_3C_classLit, 42, -1, [165]), initValues(_3C_classLit, 42, -1, [55349, 56630]), initValues(_3C_classLit, 42, -1, [1111]), initValues(_3C_classLit, 42, -1, [55349, 56682]), initValues(_3C_classLit, 42, -1, [55349, 56526]), initValues(_3C_classLit, 42, -1, [1102]), initValues(_3C_classLit, 42, -1, [255]), initValues(_3C_classLit, 42, -1, [255]), initValues(_3C_classLit, 42, -1, [378]), initValues(_3C_classLit, 42, -1, [382]), initValues(_3C_classLit, 42, -1, [1079]), initValues(_3C_classLit, 42, -1, [380]), initValues(_3C_classLit, 42, -1, [8488]), initValues(_3C_classLit, 42, -1, [950]), initValues(_3C_classLit, 42, -1, [55349, 56631]), initValues(_3C_classLit, 42, -1, [1078]), initValues(_3C_classLit, 42, -1, [8669]), initValues(_3C_classLit, 42, -1, [55349, 56683]), initValues(_3C_classLit, 42, -1, [55349, 56527]), initValues(_3C_classLit, 42, -1, [8205]), initValues(_3C_classLit, 42, -1, [8204])]);
|
jtulach@678
|
21713 |
WINDOWS_1252 = initValues(_3_3C_classLit, 52, 12, [initValues(_3C_classLit, 42, -1, [8364]), initValues(_3C_classLit, 42, -1, [65533]), initValues(_3C_classLit, 42, -1, [8218]), initValues(_3C_classLit, 42, -1, [402]), initValues(_3C_classLit, 42, -1, [8222]), initValues(_3C_classLit, 42, -1, [8230]), initValues(_3C_classLit, 42, -1, [8224]), initValues(_3C_classLit, 42, -1, [8225]), initValues(_3C_classLit, 42, -1, [710]), initValues(_3C_classLit, 42, -1, [8240]), initValues(_3C_classLit, 42, -1, [352]), initValues(_3C_classLit, 42, -1, [8249]), initValues(_3C_classLit, 42, -1, [338]), initValues(_3C_classLit, 42, -1, [65533]), initValues(_3C_classLit, 42, -1, [381]), initValues(_3C_classLit, 42, -1, [65533]), initValues(_3C_classLit, 42, -1, [65533]), initValues(_3C_classLit, 42, -1, [8216]), initValues(_3C_classLit, 42, -1, [8217]), initValues(_3C_classLit, 42, -1, [8220]), initValues(_3C_classLit, 42, -1, [8221]), initValues(_3C_classLit, 42, -1, [8226]), initValues(_3C_classLit, 42, -1, [8211]), initValues(_3C_classLit, 42, -1, [8212]), initValues(_3C_classLit, 42, -1, [732]), initValues(_3C_classLit, 42, -1, [8482]), initValues(_3C_classLit, 42, -1, [353]), initValues(_3C_classLit, 42, -1, [8250]), initValues(_3C_classLit, 42, -1, [339]), initValues(_3C_classLit, 42, -1, [65533]), initValues(_3C_classLit, 42, -1, [382]), initValues(_3C_classLit, 42, -1, [376])]);
|
jtulach@678
|
21714 |
}
|
jtulach@678
|
21715 |
|
jtulach@678
|
21716 |
var NAMES, VALUES_0, WINDOWS_1252;
|
jtulach@678
|
21717 |
function localEqualsBuffer(local, buf, offset, length){
|
jtulach@678
|
21718 |
var i;
|
jtulach@678
|
21719 |
if (local.length != length) {
|
jtulach@678
|
21720 |
return false;
|
jtulach@678
|
21721 |
}
|
jtulach@678
|
21722 |
for (i = 0; i < length; ++i) {
|
jtulach@678
|
21723 |
if (local.charCodeAt(i) != buf[offset + i]) {
|
jtulach@678
|
21724 |
return false;
|
jtulach@678
|
21725 |
}
|
jtulach@678
|
21726 |
}
|
jtulach@678
|
21727 |
return true;
|
jtulach@678
|
21728 |
}
|
jtulach@678
|
21729 |
|
jtulach@678
|
21730 |
function lowerCaseLiteralEqualsIgnoreAsciiCaseString(lowerCaseLiteral, string){
|
jtulach@678
|
21731 |
var c0, c1, i;
|
jtulach@678
|
21732 |
if (string == null) {
|
jtulach@678
|
21733 |
return false;
|
jtulach@678
|
21734 |
}
|
jtulach@678
|
21735 |
if (lowerCaseLiteral.length != string.length) {
|
jtulach@678
|
21736 |
return false;
|
jtulach@678
|
21737 |
}
|
jtulach@678
|
21738 |
for (i = 0; i < lowerCaseLiteral.length; ++i) {
|
jtulach@678
|
21739 |
c0 = lowerCaseLiteral.charCodeAt(i);
|
jtulach@678
|
21740 |
c1 = string.charCodeAt(i);
|
jtulach@678
|
21741 |
if (c1 >= 65 && c1 <= 90) {
|
jtulach@678
|
21742 |
c1 += 32;
|
jtulach@678
|
21743 |
}
|
jtulach@678
|
21744 |
if (c0 != c1) {
|
jtulach@678
|
21745 |
return false;
|
jtulach@678
|
21746 |
}
|
jtulach@678
|
21747 |
}
|
jtulach@678
|
21748 |
return true;
|
jtulach@678
|
21749 |
}
|
jtulach@678
|
21750 |
|
jtulach@678
|
21751 |
function lowerCaseLiteralIsPrefixOfIgnoreAsciiCaseString(lowerCaseLiteral, string){
|
jtulach@678
|
21752 |
var c0, c1, i;
|
jtulach@678
|
21753 |
if (string == null) {
|
jtulach@678
|
21754 |
return false;
|
jtulach@678
|
21755 |
}
|
jtulach@678
|
21756 |
if (lowerCaseLiteral.length > string.length) {
|
jtulach@678
|
21757 |
return false;
|
jtulach@678
|
21758 |
}
|
jtulach@678
|
21759 |
for (i = 0; i < lowerCaseLiteral.length; ++i) {
|
jtulach@678
|
21760 |
c0 = lowerCaseLiteral.charCodeAt(i);
|
jtulach@678
|
21761 |
c1 = string.charCodeAt(i);
|
jtulach@678
|
21762 |
if (c1 >= 65 && c1 <= 90) {
|
jtulach@678
|
21763 |
c1 += 32;
|
jtulach@678
|
21764 |
}
|
jtulach@678
|
21765 |
if (c0 != c1) {
|
jtulach@678
|
21766 |
return false;
|
jtulach@678
|
21767 |
}
|
jtulach@678
|
21768 |
}
|
jtulach@678
|
21769 |
return true;
|
jtulach@678
|
21770 |
}
|
jtulach@678
|
21771 |
|
jtulach@678
|
21772 |
function $StackNode(this$static, group, ns, name, node, scoping, special, fosterParenting, popName, attributes){
|
jtulach@678
|
21773 |
this$static.group = group;
|
jtulach@678
|
21774 |
this$static.name_0 = name;
|
jtulach@678
|
21775 |
this$static.popName = popName;
|
jtulach@678
|
21776 |
this$static.ns = ns;
|
jtulach@678
|
21777 |
this$static.node = node;
|
jtulach@678
|
21778 |
this$static.scoping = scoping;
|
jtulach@678
|
21779 |
this$static.special = special;
|
jtulach@678
|
21780 |
this$static.fosterParenting = fosterParenting;
|
jtulach@678
|
21781 |
this$static.attributes = attributes;
|
jtulach@678
|
21782 |
this$static.refcount = 1;
|
jtulach@678
|
21783 |
return this$static;
|
jtulach@678
|
21784 |
}
|
jtulach@678
|
21785 |
|
jtulach@678
|
21786 |
function $StackNode_0(this$static, ns, elementName, node){
|
jtulach@678
|
21787 |
this$static.group = elementName.group;
|
jtulach@678
|
21788 |
this$static.name_0 = elementName.name_0;
|
jtulach@678
|
21789 |
this$static.popName = elementName.name_0;
|
jtulach@678
|
21790 |
this$static.ns = ns;
|
jtulach@678
|
21791 |
this$static.node = node;
|
jtulach@678
|
21792 |
this$static.scoping = elementName.scoping;
|
jtulach@678
|
21793 |
this$static.special = elementName.special;
|
jtulach@678
|
21794 |
this$static.fosterParenting = elementName.fosterParenting;
|
jtulach@678
|
21795 |
this$static.attributes = null;
|
jtulach@678
|
21796 |
this$static.refcount = 1;
|
jtulach@678
|
21797 |
return this$static;
|
jtulach@678
|
21798 |
}
|
jtulach@678
|
21799 |
|
jtulach@678
|
21800 |
function $StackNode_3(this$static, ns, elementName, node, attributes){
|
jtulach@678
|
21801 |
this$static.group = elementName.group;
|
jtulach@678
|
21802 |
this$static.name_0 = elementName.name_0;
|
jtulach@678
|
21803 |
this$static.popName = elementName.name_0;
|
jtulach@678
|
21804 |
this$static.ns = ns;
|
jtulach@678
|
21805 |
this$static.node = node;
|
jtulach@678
|
21806 |
this$static.scoping = elementName.scoping;
|
jtulach@678
|
21807 |
this$static.special = elementName.special;
|
jtulach@678
|
21808 |
this$static.fosterParenting = elementName.fosterParenting;
|
jtulach@678
|
21809 |
this$static.attributes = attributes;
|
jtulach@678
|
21810 |
this$static.refcount = 1;
|
jtulach@678
|
21811 |
return this$static;
|
jtulach@678
|
21812 |
}
|
jtulach@678
|
21813 |
|
jtulach@678
|
21814 |
function $StackNode_1(this$static, ns, elementName, node, popName){
|
jtulach@678
|
21815 |
this$static.group = elementName.group;
|
jtulach@678
|
21816 |
this$static.name_0 = elementName.name_0;
|
jtulach@678
|
21817 |
this$static.popName = popName;
|
jtulach@678
|
21818 |
this$static.ns = ns;
|
jtulach@678
|
21819 |
this$static.node = node;
|
jtulach@678
|
21820 |
this$static.scoping = elementName.scoping;
|
jtulach@678
|
21821 |
this$static.special = elementName.special;
|
jtulach@678
|
21822 |
this$static.fosterParenting = elementName.fosterParenting;
|
jtulach@678
|
21823 |
this$static.attributes = null;
|
jtulach@678
|
21824 |
this$static.refcount = 1;
|
jtulach@678
|
21825 |
return this$static;
|
jtulach@678
|
21826 |
}
|
jtulach@678
|
21827 |
|
jtulach@678
|
21828 |
function $StackNode_2(this$static, ns, elementName, node, popName, scoping){
|
jtulach@678
|
21829 |
this$static.group = elementName.group;
|
jtulach@678
|
21830 |
this$static.name_0 = elementName.name_0;
|
jtulach@678
|
21831 |
this$static.popName = popName;
|
jtulach@678
|
21832 |
this$static.ns = ns;
|
jtulach@678
|
21833 |
this$static.node = node;
|
jtulach@678
|
21834 |
this$static.scoping = scoping;
|
jtulach@678
|
21835 |
this$static.special = false;
|
jtulach@678
|
21836 |
this$static.fosterParenting = false;
|
jtulach@678
|
21837 |
this$static.attributes = null;
|
jtulach@678
|
21838 |
this$static.refcount = 1;
|
jtulach@678
|
21839 |
return this$static;
|
jtulach@678
|
21840 |
}
|
jtulach@678
|
21841 |
|
jtulach@678
|
21842 |
function getClass_55(){
|
jtulach@678
|
21843 |
return Lnu_validator_htmlparser_impl_StackNode_2_classLit;
|
jtulach@678
|
21844 |
}
|
jtulach@678
|
21845 |
|
jtulach@678
|
21846 |
function toString_11(){
|
jtulach@678
|
21847 |
return this.name_0;
|
jtulach@678
|
21848 |
}
|
jtulach@678
|
21849 |
|
jtulach@678
|
21850 |
function StackNode(){
|
jtulach@678
|
21851 |
}
|
jtulach@678
|
21852 |
|
jtulach@678
|
21853 |
_ = StackNode.prototype = new Object_0();
|
jtulach@678
|
21854 |
_.getClass$ = getClass_55;
|
jtulach@678
|
21855 |
_.toString$ = toString_11;
|
jtulach@678
|
21856 |
_.typeId$ = 38;
|
jtulach@678
|
21857 |
_.attributes = null;
|
jtulach@678
|
21858 |
_.fosterParenting = false;
|
jtulach@678
|
21859 |
_.group = 0;
|
jtulach@678
|
21860 |
_.name_0 = null;
|
jtulach@678
|
21861 |
_.node = null;
|
jtulach@678
|
21862 |
_.ns = null;
|
jtulach@678
|
21863 |
_.popName = null;
|
jtulach@678
|
21864 |
_.refcount = 1;
|
jtulach@678
|
21865 |
_.scoping = false;
|
jtulach@678
|
21866 |
_.special = false;
|
jtulach@678
|
21867 |
function $UTF16Buffer(this$static, buffer, start, end){
|
jtulach@678
|
21868 |
this$static.buffer = buffer;
|
jtulach@678
|
21869 |
this$static.start = start;
|
jtulach@678
|
21870 |
this$static.end = end;
|
jtulach@678
|
21871 |
return this$static;
|
jtulach@678
|
21872 |
}
|
jtulach@678
|
21873 |
|
jtulach@678
|
21874 |
function $adjust(this$static, lastWasCR){
|
jtulach@678
|
21875 |
if (lastWasCR && this$static.buffer[this$static.start] == 10) {
|
jtulach@678
|
21876 |
++this$static.start;
|
jtulach@678
|
21877 |
}
|
jtulach@678
|
21878 |
}
|
jtulach@678
|
21879 |
|
jtulach@678
|
21880 |
function getClass_58(){
|
jtulach@678
|
21881 |
return Lnu_validator_htmlparser_impl_UTF16Buffer_2_classLit;
|
jtulach@678
|
21882 |
}
|
jtulach@678
|
21883 |
|
jtulach@678
|
21884 |
function UTF16Buffer(){
|
jtulach@678
|
21885 |
}
|
jtulach@678
|
21886 |
|
jtulach@678
|
21887 |
_ = UTF16Buffer.prototype = new Object_0();
|
jtulach@678
|
21888 |
_.getClass$ = getClass_58;
|
jtulach@678
|
21889 |
_.typeId$ = 39;
|
jtulach@678
|
21890 |
_.buffer = null;
|
jtulach@678
|
21891 |
_.end = 0;
|
jtulach@678
|
21892 |
_.start = 0;
|
jtulach@678
|
21893 |
function $SAXException(this$static, message){
|
jtulach@678
|
21894 |
this$static.detailMessage = message;
|
jtulach@678
|
21895 |
this$static.exception = null;
|
jtulach@678
|
21896 |
return this$static;
|
jtulach@678
|
21897 |
}
|
jtulach@678
|
21898 |
|
jtulach@678
|
21899 |
function $getMessage(this$static){
|
jtulach@678
|
21900 |
var message;
|
jtulach@678
|
21901 |
message = this$static.detailMessage;
|
jtulach@678
|
21902 |
if (message == null && !!this$static.exception) {
|
jtulach@678
|
21903 |
return this$static.exception.detailMessage;
|
jtulach@678
|
21904 |
}
|
jtulach@678
|
21905 |
else {
|
jtulach@678
|
21906 |
return message;
|
jtulach@678
|
21907 |
}
|
jtulach@678
|
21908 |
}
|
jtulach@678
|
21909 |
|
jtulach@678
|
21910 |
function getClass_59(){
|
jtulach@678
|
21911 |
return Lorg_xml_sax_SAXException_2_classLit;
|
jtulach@678
|
21912 |
}
|
jtulach@678
|
21913 |
|
jtulach@678
|
21914 |
function getMessage_0(){
|
jtulach@678
|
21915 |
return $getMessage(this);
|
jtulach@678
|
21916 |
}
|
jtulach@678
|
21917 |
|
jtulach@678
|
21918 |
function toString_12(){
|
jtulach@678
|
21919 |
if (this.exception) {
|
jtulach@678
|
21920 |
return $toString_1(this.exception);
|
jtulach@678
|
21921 |
}
|
jtulach@678
|
21922 |
else {
|
jtulach@678
|
21923 |
return $toString_1(this);
|
jtulach@678
|
21924 |
}
|
jtulach@678
|
21925 |
}
|
jtulach@678
|
21926 |
|
jtulach@678
|
21927 |
function SAXException(){
|
jtulach@678
|
21928 |
}
|
jtulach@678
|
21929 |
|
jtulach@678
|
21930 |
_ = SAXException.prototype = new Exception();
|
jtulach@678
|
21931 |
_.getClass$ = getClass_59;
|
jtulach@678
|
21932 |
_.getMessage = getMessage_0;
|
jtulach@678
|
21933 |
_.toString$ = toString_12;
|
jtulach@678
|
21934 |
_.typeId$ = 40;
|
jtulach@678
|
21935 |
_.exception = null;
|
jtulach@678
|
21936 |
function $SAXParseException(this$static, message, locator){
|
jtulach@678
|
21937 |
this$static.detailMessage = message;
|
jtulach@678
|
21938 |
this$static.exception = null;
|
jtulach@678
|
21939 |
if (locator) {
|
jtulach@678
|
21940 |
$getLineNumber(locator);
|
jtulach@678
|
21941 |
$getColumnNumber(locator);
|
jtulach@678
|
21942 |
}
|
jtulach@678
|
21943 |
else {
|
jtulach@678
|
21944 |
}
|
jtulach@678
|
21945 |
return this$static;
|
jtulach@678
|
21946 |
}
|
jtulach@678
|
21947 |
|
jtulach@678
|
21948 |
function $SAXParseException_0(this$static, message, locator, e){
|
jtulach@678
|
21949 |
this$static.detailMessage = message;
|
jtulach@678
|
21950 |
this$static.exception = e;
|
jtulach@678
|
21951 |
if (locator) {
|
jtulach@678
|
21952 |
$getLineNumber(locator);
|
jtulach@678
|
21953 |
$getColumnNumber(locator);
|
jtulach@678
|
21954 |
}
|
jtulach@678
|
21955 |
else {
|
jtulach@678
|
21956 |
}
|
jtulach@678
|
21957 |
return this$static;
|
jtulach@678
|
21958 |
}
|
jtulach@678
|
21959 |
|
jtulach@678
|
21960 |
function getClass_60(){
|
jtulach@678
|
21961 |
return Lorg_xml_sax_SAXParseException_2_classLit;
|
jtulach@678
|
21962 |
}
|
jtulach@678
|
21963 |
|
jtulach@678
|
21964 |
function SAXParseException(){
|
jtulach@678
|
21965 |
}
|
jtulach@678
|
21966 |
|
jtulach@678
|
21967 |
_ = SAXParseException.prototype = new SAXException();
|
jtulach@678
|
21968 |
_.getClass$ = getClass_60;
|
jtulach@678
|
21969 |
_.typeId$ = 41;
|
jtulach@678
|
21970 |
function init_0(){
|
jtulach@678
|
21971 |
!!$stats && $stats({moduleName:$moduleName, subSystem:'startup', evtGroup:'moduleStartup', millis:(new Date()).getTime(), type:'onModuleLoadStart', className:'nu.validator.htmlparser.gwt.HtmlParserModule'});
|
jtulach@678
|
21972 |
Envjs.parseHtmlDocument = parseHtmlDocument;
|
jtulach@678
|
21973 |
}
|
jtulach@678
|
21974 |
|
jtulach@678
|
21975 |
__defineParser__ = function gwtOnLoad(errFn, modName, modBase){
|
jtulach@678
|
21976 |
$moduleName = modName;
|
jtulach@678
|
21977 |
$moduleBase = modBase;
|
jtulach@678
|
21978 |
if (errFn)
|
jtulach@678
|
21979 |
try {
|
jtulach@678
|
21980 |
init_0();
|
jtulach@678
|
21981 |
}
|
jtulach@678
|
21982 |
catch (e) {
|
jtulach@678
|
21983 |
errFn(modName);
|
jtulach@678
|
21984 |
}
|
jtulach@678
|
21985 |
else {
|
jtulach@678
|
21986 |
init_0();
|
jtulach@678
|
21987 |
}
|
jtulach@678
|
21988 |
}
|
jtulach@678
|
21989 |
|
jtulach@678
|
21990 |
function nullMethod(){
|
jtulach@678
|
21991 |
}
|
jtulach@678
|
21992 |
|
jtulach@678
|
21993 |
var Ljava_lang_Object_2_classLit = createForClass('java.lang.', 'Object'), Lcom_google_gwt_user_client_Timer_2_classLit = createForClass('com.google.gwt.user.client.', 'Timer'), Ljava_lang_Throwable_2_classLit = createForClass('java.lang.', 'Throwable'), Ljava_lang_Exception_2_classLit = createForClass('java.lang.', 'Exception'), Ljava_lang_RuntimeException_2_classLit = createForClass('java.lang.', 'RuntimeException'), Lcom_google_gwt_core_client_JavaScriptException_2_classLit = createForClass('com.google.gwt.core.client.', 'JavaScriptException'), Lcom_google_gwt_core_client_JavaScriptObject_2_classLit = createForClass('com.google.gwt.core.client.', 'JavaScriptObject$'), _3Ljava_lang_String_2_classLit = createForArray('[Ljava.lang.', 'String;'), Ljava_lang_Enum_2_classLit = createForClass('java.lang.', 'Enum'), _3_3D_classLit = createForArray('', '[[D'), Ljava_util_AbstractCollection_2_classLit = createForClass('java.util.', 'AbstractCollection'), Ljava_util_AbstractList_2_classLit = createForClass('java.util.', 'AbstractList'), Ljava_util_ArrayList_2_classLit = createForClass('java.util.', 'ArrayList'), Lcom_google_gwt_user_client_Timer$1_2_classLit = createForClass('com.google.gwt.user.client.', 'Timer$1'), Ljava_lang_IndexOutOfBoundsException_2_classLit = createForClass('java.lang.', 'IndexOutOfBoundsException'), Ljava_lang_ArrayStoreException_2_classLit = createForClass('java.lang.', 'ArrayStoreException'), _3C_classLit = createForArray('', '[C'), Ljava_lang_Class_2_classLit = createForClass('java.lang.', 'Class'), Ljava_lang_ClassCastException_2_classLit = createForClass('java.lang.', 'ClassCastException'), Ljava_lang_IllegalArgumentException_2_classLit = createForClass('java.lang.', 'IllegalArgumentException'), _3I_classLit = createForArray('', '[I'), Ljava_lang_NullPointerException_2_classLit = createForClass('java.lang.', 'NullPointerException'), Ljava_lang_String_2_classLit = createForClass('java.lang.', 'String'), Ljava_lang_StringBuffer_2_classLit = createForClass('java.lang.', 'StringBuffer'), Ljava_lang_StringBuilder_2_classLit = createForClass('java.lang.', 'StringBuilder'), Ljava_lang_StringIndexOutOfBoundsException_2_classLit = createForClass('java.lang.', 'StringIndexOutOfBoundsException'), Ljava_lang_UnsupportedOperationException_2_classLit = createForClass('java.lang.', 'UnsupportedOperationException'), _3Ljava_lang_Object_2_classLit = createForArray('[Ljava.lang.', 'Object;'), Ljava_util_AbstractMap_2_classLit = createForClass('java.util.', 'AbstractMap'), Ljava_util_AbstractHashMap_2_classLit = createForClass('java.util.', 'AbstractHashMap'), Ljava_util_AbstractSet_2_classLit = createForClass('java.util.', 'AbstractSet'), Ljava_util_AbstractHashMap$EntrySet_2_classLit = createForClass('java.util.', 'AbstractHashMap$EntrySet'), Ljava_util_AbstractHashMap$EntrySetIterator_2_classLit = createForClass('java.util.', 'AbstractHashMap$EntrySetIterator'), Ljava_util_AbstractMapEntry_2_classLit = createForClass('java.util.', 'AbstractMapEntry'), Ljava_util_AbstractHashMap$MapEntryNull_2_classLit = createForClass('java.util.', 'AbstractHashMap$MapEntryNull'), Ljava_util_AbstractHashMap$MapEntryString_2_classLit = createForClass('java.util.', 'AbstractHashMap$MapEntryString'), Ljava_util_AbstractList$IteratorImpl_2_classLit = createForClass('java.util.', 'AbstractList$IteratorImpl'), Ljava_util_AbstractList$ListIteratorImpl_2_classLit = createForClass('java.util.', 'AbstractList$ListIteratorImpl'), Ljava_util_AbstractSequentialList_2_classLit = createForClass('java.util.', 'AbstractSequentialList'), Ljava_util_Comparators$1_2_classLit = createForClass('java.util.', 'Comparators$1'), Ljava_util_HashMap_2_classLit = createForClass('java.util.', 'HashMap'), Ljava_util_LinkedList_2_classLit = createForClass('java.util.', 'LinkedList'), Ljava_util_LinkedList$ListIteratorImpl_2_classLit = createForClass('java.util.', 'LinkedList$ListIteratorImpl'), Ljava_util_LinkedList$Node_2_classLit = createForClass('java.util.', 'LinkedList$Node'), Ljava_util_NoSuchElementException_2_classLit = createForClass('java.util.', 'NoSuchElementException'), Lnu_validator_htmlparser_common_DoctypeExpectation_2_classLit = createForEnum('nu.validator.htmlparser.common.', 'DoctypeExpectation'), Lnu_validator_htmlparser_common_DocumentMode_2_classLit = createForEnum('nu.validator.htmlparser.common.', 'DocumentMode'), Lnu_validator_htmlparser_common_XmlViolationPolicy_2_classLit = createForEnum('nu.validator.htmlparser.common.', 'XmlViolationPolicy'), Lnu_validator_htmlparser_impl_TreeBuilder_2_classLit = createForClass('nu.validator.htmlparser.impl.', 'TreeBuilder'), Lnu_validator_htmlparser_impl_CoalescingTreeBuilder_2_classLit = createForClass('nu.validator.htmlparser.impl.', 'CoalescingTreeBuilder'), Lnu_validator_htmlparser_gwt_BrowserTreeBuilder_2_classLit = createForClass('nu.validator.htmlparser.gwt.', 'BrowserTreeBuilder'), Lnu_validator_htmlparser_gwt_BrowserTreeBuilder$ScriptHolder_2_classLit = createForClass('nu.validator.htmlparser.gwt.', 'BrowserTreeBuilder$ScriptHolder'), Lnu_validator_htmlparser_gwt_HtmlParser_2_classLit = createForClass('nu.validator.htmlparser.gwt.', 'HtmlParser'), Lnu_validator_htmlparser_gwt_HtmlParser$1_2_classLit = createForClass('nu.validator.htmlparser.gwt.', 'HtmlParser$1'), Lnu_validator_htmlparser_gwt_ParseEndListener_2_classLit = createForClass('nu.validator.htmlparser.gwt.', 'ParseEndListener'), _3Z_classLit = createForArray('', '[Z'), _3Lnu_validator_htmlparser_impl_AttributeName_2_classLit = createForArray('[Lnu.validator.htmlparser.impl.', 'AttributeName;'), Lnu_validator_htmlparser_impl_AttributeName_2_classLit = createForClass('nu.validator.htmlparser.impl.', 'AttributeName'), _3Lnu_validator_htmlparser_impl_ElementName_2_classLit = createForArray('[Lnu.validator.htmlparser.impl.', 'ElementName;'), Lnu_validator_htmlparser_impl_ElementName_2_classLit = createForClass('nu.validator.htmlparser.impl.', 'ElementName'), Lnu_validator_htmlparser_impl_Tokenizer_2_classLit = createForClass('nu.validator.htmlparser.impl.', 'Tokenizer'), Lnu_validator_htmlparser_impl_ErrorReportingTokenizer_2_classLit = createForClass('nu.validator.htmlparser.impl.', 'ErrorReportingTokenizer'), Lnu_validator_htmlparser_impl_HtmlAttributes_2_classLit = createForClass('nu.validator.htmlparser.impl.', 'HtmlAttributes'), Lnu_validator_htmlparser_impl_LocatorImpl_2_classLit = createForClass('nu.validator.htmlparser.impl.', 'LocatorImpl'), _3_3C_classLit = createForArray('', '[[C'), Lnu_validator_htmlparser_impl_StackNode_2_classLit = createForClass('nu.validator.htmlparser.impl.', 'StackNode'), _3Lnu_validator_htmlparser_impl_StackNode_2_classLit = createForArray('[Lnu.validator.htmlparser.impl.', 'StackNode;'), Lnu_validator_htmlparser_impl_UTF16Buffer_2_classLit = createForClass('nu.validator.htmlparser.impl.', 'UTF16Buffer'), Lorg_xml_sax_SAXException_2_classLit = createForClass('org.xml.sax.', 'SAXException'), Lorg_xml_sax_SAXParseException_2_classLit = createForClass('org.xml.sax.', 'SAXParseException');
|
jtulach@678
|
21994 |
if (false) { var __gwt_initHandlers = nu_validator_htmlparser_HtmlParser.__gwt_initHandlers; nu_validator_htmlparser_HtmlParser.onScriptLoad(gwtOnLoad);}})();
|
jtulach@678
|
21995 |
|
jtulach@678
|
21996 |
/**
|
jtulach@678
|
21997 |
* DOMParser
|
jtulach@678
|
21998 |
*/
|
jtulach@678
|
21999 |
|
jtulach@678
|
22000 |
__defineParser__(function(e){
|
jtulach@678
|
22001 |
console.log('Error loading html 5 parser implementation');
|
jtulach@678
|
22002 |
}, 'nu_validator_htmlparser_HtmlParser', '');
|
jtulach@678
|
22003 |
|
jtulach@678
|
22004 |
/*DOMParser = function(principle, documentURI, baseURI){};
|
jtulach@678
|
22005 |
__extend__(DOMParser.prototype,{
|
jtulach@678
|
22006 |
parseFromString: function(xmlstring, mimetype){
|
jtulach@678
|
22007 |
//console.log('DOMParser.parseFromString %s', mimetype);
|
jtulach@678
|
22008 |
var xmldoc = new Document(new DOMImplementation());
|
jtulach@678
|
22009 |
return XMLParser.parseDocument(xmlstring, xmldoc, mimetype);
|
jtulach@678
|
22010 |
}
|
jtulach@678
|
22011 |
});*/
|
jtulach@678
|
22012 |
|
jtulach@678
|
22013 |
XMLParser.parseDocument = function(xmlstring, xmldoc, mimetype){
|
jtulach@678
|
22014 |
//console.log('XMLParser.parseDocument');
|
jtulach@678
|
22015 |
var tmpdoc = new Document(new DOMImplementation()),
|
jtulach@678
|
22016 |
parent,
|
jtulach@678
|
22017 |
importedNode,
|
jtulach@678
|
22018 |
tmpNode;
|
jtulach@678
|
22019 |
|
jtulach@678
|
22020 |
if(mimetype && mimetype == 'text/xml'){
|
jtulach@678
|
22021 |
//console.log('mimetype: text/xml');
|
jtulach@678
|
22022 |
tmpdoc.baseURI = 'http://envjs.com/xml';
|
jtulach@678
|
22023 |
xmlstring = '<html><head></head><body>'+
|
jtulach@678
|
22024 |
'<envjs_1234567890 xmlns="envjs_1234567890">'
|
jtulach@678
|
22025 |
+xmlstring+
|
jtulach@678
|
22026 |
'</envjs_1234567890>'+
|
jtulach@678
|
22027 |
'</body></html>';
|
jtulach@678
|
22028 |
Envjs.parseHtmlDocument(xmlstring, tmpdoc, false, null, null);
|
jtulach@678
|
22029 |
parent = tmpdoc.getElementsByTagName('envjs_1234567890')[0];
|
jtulach@678
|
22030 |
}else{
|
jtulach@678
|
22031 |
Envjs.parseHtmlDocument(xmlstring, tmpdoc, false, null, null);
|
jtulach@678
|
22032 |
parent = tmpdoc.documentElement;
|
jtulach@678
|
22033 |
}
|
jtulach@678
|
22034 |
|
jtulach@678
|
22035 |
while(xmldoc.firstChild != null){
|
jtulach@678
|
22036 |
xmldoc.removeChild( xmldoc.firstChild );
|
jtulach@678
|
22037 |
}
|
jtulach@678
|
22038 |
while(parent.firstChild != null){
|
jtulach@678
|
22039 |
tmpNode = parent.removeChild( parent.firstChild );
|
jtulach@678
|
22040 |
importedNode = xmldoc.importNode( tmpNode, true);
|
jtulach@678
|
22041 |
xmldoc.appendChild( importedNode );
|
jtulach@678
|
22042 |
}
|
jtulach@678
|
22043 |
return xmldoc;
|
jtulach@678
|
22044 |
};
|
jtulach@678
|
22045 |
|
jtulach@678
|
22046 |
var __fragmentCache__ = {length:0},
|
jtulach@678
|
22047 |
__cachable__ = 255;
|
jtulach@678
|
22048 |
|
jtulach@678
|
22049 |
HTMLParser.parseDocument = function(htmlstring, htmldoc){
|
jtulach@678
|
22050 |
//console.log('HTMLParser.parseDocument %s', htmldoc.async);
|
jtulach@678
|
22051 |
htmldoc.parsing = true;
|
jtulach@678
|
22052 |
Envjs.parseHtmlDocument(htmlstring, htmldoc, htmldoc.async, null, null);
|
jtulach@678
|
22053 |
//Envjs.wait(-1);
|
jtulach@678
|
22054 |
return htmldoc;
|
jtulach@678
|
22055 |
};
|
jtulach@678
|
22056 |
HTMLParser.parseFragment = function(htmlstring, element){
|
jtulach@678
|
22057 |
//console.log('HTMLParser.parseFragment')
|
jtulach@678
|
22058 |
// fragment is allowed to be an element as well
|
jtulach@678
|
22059 |
var tmpdoc,
|
jtulach@678
|
22060 |
parent,
|
jtulach@678
|
22061 |
importedNode,
|
jtulach@678
|
22062 |
tmpNode,
|
jtulach@678
|
22063 |
length,
|
jtulach@678
|
22064 |
i,
|
jtulach@678
|
22065 |
docstring;
|
jtulach@678
|
22066 |
//console.log('parsing fragment: %s', htmlstring);
|
jtulach@678
|
22067 |
//console.log('__fragmentCache__.length %s', __fragmentCache__.length)
|
jtulach@678
|
22068 |
if( htmlstring.length > __cachable__ && htmlstring in __fragmentCache__){
|
jtulach@678
|
22069 |
tmpdoc = __fragmentCache__[htmlstring];
|
jtulach@678
|
22070 |
}else{
|
jtulach@678
|
22071 |
//console.log('parsing html fragment \n%s', htmlstring);
|
jtulach@678
|
22072 |
tmpdoc = new HTMLDocument(new DOMImplementation());
|
jtulach@678
|
22073 |
|
jtulach@678
|
22074 |
|
jtulach@678
|
22075 |
// Need some indicator that this document isn't THE document
|
jtulach@678
|
22076 |
// to fire off img.src change events and other items.
|
jtulach@678
|
22077 |
// Otherwise, what happens is the tmpdoc fires and img.src
|
jtulach@678
|
22078 |
// event, then when it's all imported to the original document
|
jtulach@678
|
22079 |
// it happens again.
|
jtulach@678
|
22080 |
|
jtulach@678
|
22081 |
tmpdoc.fragment = true;
|
jtulach@678
|
22082 |
|
jtulach@678
|
22083 |
//preserves leading white space
|
jtulach@678
|
22084 |
docstring = '<html><head></head><body>'+
|
jtulach@678
|
22085 |
'<envjs_1234567890 xmlns="envjs_1234567890">'
|
jtulach@678
|
22086 |
+htmlstring+
|
jtulach@678
|
22087 |
'</envjs_1234567890>'+
|
jtulach@678
|
22088 |
'</body></html>';
|
jtulach@678
|
22089 |
Envjs.parseHtmlDocument(docstring,tmpdoc, false, null,null);
|
jtulach@678
|
22090 |
if(htmlstring.length > __cachable__ ){
|
jtulach@678
|
22091 |
tmpdoc.normalizeDocument();
|
jtulach@678
|
22092 |
__fragmentCache__[htmlstring] = tmpdoc;
|
jtulach@678
|
22093 |
__fragmentCache__.length += htmlstring.length;
|
jtulach@678
|
22094 |
tmpdoc.cached = true;
|
jtulach@678
|
22095 |
}else{
|
jtulach@678
|
22096 |
tmpdoc.cached = false;
|
jtulach@678
|
22097 |
}
|
jtulach@678
|
22098 |
}
|
jtulach@678
|
22099 |
|
jtulach@678
|
22100 |
//parent is envjs_1234567890 element
|
jtulach@678
|
22101 |
parent = tmpdoc.body.childNodes[0];
|
jtulach@678
|
22102 |
while(element.firstChild != null){
|
jtulach@678
|
22103 |
//zap the elements children so we can import
|
jtulach@678
|
22104 |
element.removeChild( element.firstChild );
|
jtulach@678
|
22105 |
}
|
jtulach@678
|
22106 |
|
jtulach@678
|
22107 |
if(tmpdoc.cached){
|
jtulach@678
|
22108 |
length = parent.childNodes.length;
|
jtulach@678
|
22109 |
for(i=0;i<length;i++){
|
jtulach@678
|
22110 |
importedNode = element.importNode( parent.childNodes[i], true );
|
jtulach@678
|
22111 |
element.appendChild( importedNode );
|
jtulach@678
|
22112 |
}
|
jtulach@678
|
22113 |
}else{
|
jtulach@678
|
22114 |
while(parent.firstChild != null){
|
jtulach@678
|
22115 |
tmpNode = parent.removeChild( parent.firstChild );
|
jtulach@678
|
22116 |
importedNode = element.importNode( tmpNode, true);
|
jtulach@678
|
22117 |
element.appendChild( importedNode );
|
jtulach@678
|
22118 |
}
|
jtulach@678
|
22119 |
}
|
jtulach@678
|
22120 |
|
jtulach@678
|
22121 |
// console.log('finished fragment: %s', element.outerHTML);
|
jtulach@678
|
22122 |
return element;
|
jtulach@678
|
22123 |
};
|
jtulach@678
|
22124 |
|
jtulach@678
|
22125 |
var __clearFragmentCache__ = function(){
|
jtulach@678
|
22126 |
__fragmentCache__ = {};
|
jtulach@678
|
22127 |
}
|
jtulach@678
|
22128 |
|
jtulach@678
|
22129 |
|
jtulach@678
|
22130 |
/**
|
jtulach@678
|
22131 |
* @name Document
|
jtulach@678
|
22132 |
* @w3c:domlevel 2
|
jtulach@678
|
22133 |
* @uri http://www.w3.org/TR/2000/REC-DOM-Level-2-Events-20001113/events.html
|
jtulach@678
|
22134 |
*/
|
jtulach@678
|
22135 |
__extend__(Document.prototype, {
|
jtulach@678
|
22136 |
loadXML : function(xmlString) {
|
jtulach@678
|
22137 |
//console.log('Parser::Document.loadXML');
|
jtulach@678
|
22138 |
// create Document
|
jtulach@678
|
22139 |
if(this === document){
|
jtulach@678
|
22140 |
//$debug("Setting internal window.document");
|
jtulach@678
|
22141 |
document = this;
|
jtulach@678
|
22142 |
}
|
jtulach@678
|
22143 |
// populate Document
|
jtulach@678
|
22144 |
try {
|
jtulach@678
|
22145 |
// make sure this document object is empty before we try to load ...
|
jtulach@678
|
22146 |
this.attributes = new NamedNodeMap(this, this);
|
jtulach@678
|
22147 |
this._namespaces = new NamespaceNodeMap(this, this);
|
jtulach@678
|
22148 |
this._readonly = false;
|
jtulach@678
|
22149 |
|
jtulach@678
|
22150 |
XMLParser.parseDocument(xmlString, this);
|
jtulach@678
|
22151 |
|
jtulach@678
|
22152 |
Envjs.wait(-1);
|
jtulach@678
|
22153 |
} catch (e) {
|
jtulach@678
|
22154 |
//$error(e);
|
jtulach@678
|
22155 |
}
|
jtulach@678
|
22156 |
return this;
|
jtulach@678
|
22157 |
}
|
jtulach@678
|
22158 |
});
|
jtulach@678
|
22159 |
|
jtulach@678
|
22160 |
|
jtulach@678
|
22161 |
__extend__(HTMLDocument.prototype, {
|
jtulach@678
|
22162 |
|
jtulach@678
|
22163 |
open : function() {
|
jtulach@678
|
22164 |
//console.log('opening doc for write.');
|
jtulach@678
|
22165 |
if (! this._writebuffer) {
|
jtulach@678
|
22166 |
this._writebuffer = [];
|
jtulach@678
|
22167 |
}
|
jtulach@678
|
22168 |
},
|
jtulach@678
|
22169 |
close : function() {
|
jtulach@678
|
22170 |
//console.log('closing doc.');
|
jtulach@678
|
22171 |
if (this._writebuffer) {
|
jtulach@678
|
22172 |
HTMLParser.parseDocument(this._writebuffer.join(''), this);
|
jtulach@678
|
22173 |
this._writebuffer = null;
|
jtulach@678
|
22174 |
//console.log('finished writing doc.');
|
jtulach@678
|
22175 |
}
|
jtulach@678
|
22176 |
},
|
jtulach@678
|
22177 |
|
jtulach@678
|
22178 |
/**
|
jtulach@678
|
22179 |
* http://dev.w3.org/html5/spec/Overview.html#document.write
|
jtulach@678
|
22180 |
*/
|
jtulach@678
|
22181 |
write: function(htmlstring) {
|
jtulach@678
|
22182 |
//console.log('writing doc.');
|
jtulach@678
|
22183 |
this.open();
|
jtulach@678
|
22184 |
this._writebuffer.push(htmlstring);
|
jtulach@678
|
22185 |
},
|
jtulach@678
|
22186 |
|
jtulach@678
|
22187 |
/**
|
jtulach@678
|
22188 |
* http://dev.w3.org/html5/spec/Overview.html#dom-document-writeln
|
jtulach@678
|
22189 |
*/
|
jtulach@678
|
22190 |
writeln: function(htmlstring) {
|
jtulach@678
|
22191 |
this.open();
|
jtulach@678
|
22192 |
this._writebuffer.push(htmlstring + '\n');
|
jtulach@678
|
22193 |
}
|
jtulach@678
|
22194 |
});
|
jtulach@678
|
22195 |
|
jtulach@678
|
22196 |
/**
|
jtulach@678
|
22197 |
* elementPopped is called by the parser in two cases
|
jtulach@678
|
22198 |
*
|
jtulach@678
|
22199 |
* - an 'tag' is * complete (all children process and end tag, real or
|
jtulach@678
|
22200 |
* implied is * processed)
|
jtulach@678
|
22201 |
* - a replaceElement happens (this happens by making placeholder
|
jtulach@678
|
22202 |
* nodes and then the real one is swapped in.
|
jtulach@678
|
22203 |
*
|
jtulach@678
|
22204 |
*/
|
jtulach@678
|
22205 |
var __elementPopped__ = function(ns, name, node){
|
jtulach@678
|
22206 |
//console.log('popped html element %s %s %s', ns, name, node);
|
jtulach@678
|
22207 |
var doc = node.ownerDocument,
|
jtulach@678
|
22208 |
okay,
|
jtulach@678
|
22209 |
event;
|
jtulach@678
|
22210 |
switch(doc.parsing){
|
jtulach@678
|
22211 |
case false:
|
jtulach@678
|
22212 |
//innerHTML so dont do loading patterns for parsing
|
jtulach@678
|
22213 |
//console.log('element popped (implies innerHTML) not in parsing mode %s', node.nodeName);
|
jtulach@678
|
22214 |
break;
|
jtulach@678
|
22215 |
case true:
|
jtulach@678
|
22216 |
switch(doc+''){
|
jtulach@678
|
22217 |
case '[object XMLDocument]':
|
jtulach@678
|
22218 |
break;
|
jtulach@678
|
22219 |
case '[object HTMLDocument]':
|
jtulach@678
|
22220 |
switch(node.namespaceURI){
|
jtulach@678
|
22221 |
case "http://n.validator.nu/placeholder/":
|
jtulach@678
|
22222 |
//console.log('got script during parsing %s', node.textContent);
|
jtulach@678
|
22223 |
break;
|
jtulach@678
|
22224 |
case null:
|
jtulach@678
|
22225 |
case "":
|
jtulach@678
|
22226 |
case "http://www.w3.org/1999/xhtml":
|
jtulach@678
|
22227 |
switch(name.toLowerCase()){
|
jtulach@678
|
22228 |
case 'script':
|
jtulach@678
|
22229 |
try{
|
jtulach@678
|
22230 |
okay = Envjs.loadLocalScript(node, null);
|
jtulach@678
|
22231 |
// console.log('loaded script? %s %s', node.uuid, okay);
|
jtulach@678
|
22232 |
// only fire event if we actually had something to load
|
jtulach@678
|
22233 |
if (node.src && node.src.length > 0){
|
jtulach@678
|
22234 |
event = doc.createEvent('HTMLEvents');
|
jtulach@678
|
22235 |
event.initEvent( okay ? "load" : "error", false, false );
|
jtulach@678
|
22236 |
node.dispatchEvent( event, false );
|
jtulach@678
|
22237 |
}
|
jtulach@678
|
22238 |
}catch(e){
|
jtulach@678
|
22239 |
console.log('error loading html element %s %s %s %e', ns, name, node, e.toString());
|
jtulach@678
|
22240 |
}
|
jtulach@678
|
22241 |
break;
|
jtulach@678
|
22242 |
case 'frame':
|
jtulach@678
|
22243 |
case 'iframe':
|
jtulach@678
|
22244 |
node.contentWindow = { };
|
jtulach@678
|
22245 |
node.contentDocument = new HTMLDocument(new DOMImplementation(), node.contentWindow);
|
jtulach@678
|
22246 |
node.contentWindow.document = node.contentDocument;
|
jtulach@678
|
22247 |
try{
|
jtulach@678
|
22248 |
Window;
|
jtulach@678
|
22249 |
}catch(e){
|
jtulach@678
|
22250 |
node.contentDocument.addEventListener('DOMContentLoaded', function(){
|
jtulach@678
|
22251 |
event = node.contentDocument.createEvent('HTMLEvents');
|
jtulach@678
|
22252 |
event.initEvent("load", false, false);
|
jtulach@678
|
22253 |
node.dispatchEvent( event, false );
|
jtulach@678
|
22254 |
});
|
jtulach@678
|
22255 |
}
|
jtulach@678
|
22256 |
try{
|
jtulach@678
|
22257 |
if (node.src && node.src.length > 0){
|
jtulach@678
|
22258 |
//console.log("getting content document for (i)frame from %s", node.src);
|
jtulach@678
|
22259 |
Envjs.loadFrame(node, Envjs.uri(node.src));
|
jtulach@678
|
22260 |
event = node.contentDocument.createEvent('HTMLEvents');
|
jtulach@678
|
22261 |
event.initEvent("load", false, false);
|
jtulach@678
|
22262 |
node.dispatchEvent( event, false );
|
jtulach@678
|
22263 |
}else{
|
jtulach@678
|
22264 |
//I dont like this being here:
|
jtulach@678
|
22265 |
//TODO: better mix-in strategy so the try/catch isnt required
|
jtulach@678
|
22266 |
try{
|
jtulach@678
|
22267 |
if(Window){
|
jtulach@678
|
22268 |
Envjs.loadFrame(node);
|
jtulach@678
|
22269 |
//console.log('src/html/document.js: triggering frame load');
|
jtulach@678
|
22270 |
event = node.contentDocument.createEvent('HTMLEvents');
|
jtulach@678
|
22271 |
event.initEvent("load", false, false);
|
jtulach@678
|
22272 |
node.dispatchEvent( event, false );
|
jtulach@678
|
22273 |
}
|
jtulach@678
|
22274 |
}catch(e){}
|
jtulach@678
|
22275 |
}
|
jtulach@678
|
22276 |
}catch(e){
|
jtulach@678
|
22277 |
console.log('error loading html element %s %e', node, e.toString());
|
jtulach@678
|
22278 |
}
|
jtulach@678
|
22279 |
/*try{
|
jtulach@678
|
22280 |
if (node.src && node.src.length > 0){
|
jtulach@678
|
22281 |
//console.log("getting content document for (i)frame from %s", node.src);
|
jtulach@678
|
22282 |
Envjs.loadFrame(node, Envjs.uri(node.src));
|
jtulach@678
|
22283 |
event = node.ownerDocument.createEvent('HTMLEvents');
|
jtulach@678
|
22284 |
event.initEvent("load", false, false);
|
jtulach@678
|
22285 |
node.dispatchEvent( event, false );
|
jtulach@678
|
22286 |
}else{
|
jtulach@678
|
22287 |
//console.log('src/parser/htmldocument: triggering frame load (no src)');
|
jtulach@678
|
22288 |
}
|
jtulach@678
|
22289 |
}catch(e){
|
jtulach@678
|
22290 |
console.log('error loading html element %s %s %s %e', ns, name, node, e.toString());
|
jtulach@678
|
22291 |
}*/
|
jtulach@678
|
22292 |
break;
|
jtulach@678
|
22293 |
case 'link':
|
jtulach@678
|
22294 |
if (node.href) {
|
jtulach@678
|
22295 |
__loadLink__(node, node.href);
|
jtulach@678
|
22296 |
}
|
jtulach@678
|
22297 |
break;
|
jtulach@678
|
22298 |
case 'option':
|
jtulach@678
|
22299 |
node._updateoptions();
|
jtulach@678
|
22300 |
break;
|
jtulach@678
|
22301 |
case 'img':
|
jtulach@678
|
22302 |
if (node.src){
|
jtulach@678
|
22303 |
__loadImage__(node, node.src);
|
jtulach@678
|
22304 |
}
|
jtulach@678
|
22305 |
break;
|
jtulach@678
|
22306 |
case 'html':
|
jtulach@678
|
22307 |
//console.log('html popped');
|
jtulach@678
|
22308 |
doc.parsing = false;
|
jtulach@678
|
22309 |
//DOMContentLoaded event
|
jtulach@678
|
22310 |
// try{
|
jtulach@678
|
22311 |
if(doc.createEvent){
|
jtulach@678
|
22312 |
event = doc.createEvent('Events');
|
jtulach@678
|
22313 |
event.initEvent("DOMContentLoaded", false, false);
|
jtulach@678
|
22314 |
doc.dispatchEvent( event, false );
|
jtulach@678
|
22315 |
}
|
jtulach@678
|
22316 |
/* }catch(e){
|
jtulach@678
|
22317 |
console.log('%s', e);
|
jtulach@678
|
22318 |
} */
|
jtulach@678
|
22319 |
try{
|
jtulach@678
|
22320 |
if(doc.createEvent){
|
jtulach@678
|
22321 |
event = doc.createEvent('HTMLEvents');
|
jtulach@678
|
22322 |
event.initEvent("load", false, false);
|
jtulach@678
|
22323 |
doc.dispatchEvent( event, false );
|
jtulach@678
|
22324 |
}
|
jtulach@678
|
22325 |
}catch(e){
|
jtulach@678
|
22326 |
console.log('%s', e);
|
jtulach@678
|
22327 |
}
|
jtulach@678
|
22328 |
|
jtulach@678
|
22329 |
try{
|
jtulach@678
|
22330 |
if(doc.parentWindow){
|
jtulach@678
|
22331 |
event = doc.createEvent('HTMLEvents');
|
jtulach@678
|
22332 |
event.initEvent("load", false, false);
|
jtulach@678
|
22333 |
doc.parentWindow.dispatchEvent( event, false );
|
jtulach@678
|
22334 |
}
|
jtulach@678
|
22335 |
}catch(e){
|
jtulach@678
|
22336 |
console.log('%s', e);
|
jtulach@678
|
22337 |
}
|
jtulach@678
|
22338 |
try{
|
jtulach@678
|
22339 |
if(doc === window.document){
|
jtulach@678
|
22340 |
//console.log('triggering window.load')
|
jtulach@678
|
22341 |
event = doc.createEvent('HTMLEvents');
|
jtulach@678
|
22342 |
event.initEvent("load", false, false);
|
jtulach@678
|
22343 |
try{
|
jtulach@678
|
22344 |
window.dispatchEvent( event, false );
|
jtulach@678
|
22345 |
}catch(e){
|
jtulach@678
|
22346 |
console.log('%s', e);
|
jtulach@678
|
22347 |
}
|
jtulach@678
|
22348 |
}
|
jtulach@678
|
22349 |
}catch(e){
|
jtulach@678
|
22350 |
//console.log('%s', e);
|
jtulach@678
|
22351 |
//swallow
|
jtulach@678
|
22352 |
}
|
jtulach@678
|
22353 |
default:
|
jtulach@678
|
22354 |
if(node.getAttribute('onload')){
|
jtulach@678
|
22355 |
//console.log('%s onload', node);
|
jtulach@678
|
22356 |
node.onload();
|
jtulach@678
|
22357 |
}
|
jtulach@678
|
22358 |
break;
|
jtulach@678
|
22359 |
}//switch on name
|
jtulach@678
|
22360 |
default:
|
jtulach@678
|
22361 |
break;
|
jtulach@678
|
22362 |
}//switch on ns
|
jtulach@678
|
22363 |
break;
|
jtulach@678
|
22364 |
default:
|
jtulach@678
|
22365 |
console.log('element popped: %s %s', ns, name, node.ownerDocument+'');
|
jtulach@678
|
22366 |
}//switch on doc type
|
jtulach@678
|
22367 |
default:
|
jtulach@678
|
22368 |
break;
|
jtulach@678
|
22369 |
}//switch on parsing
|
jtulach@678
|
22370 |
};
|
jtulach@678
|
22371 |
|
jtulach@678
|
22372 |
__extend__(HTMLElement.prototype,{
|
jtulach@678
|
22373 |
set innerHTML(html){
|
jtulach@678
|
22374 |
HTMLParser.parseFragment(html, this);
|
jtulach@678
|
22375 |
}
|
jtulach@678
|
22376 |
});
|
jtulach@678
|
22377 |
|
jtulach@678
|
22378 |
/**
|
jtulach@678
|
22379 |
* @author john resig & the envjs team
|
jtulach@678
|
22380 |
* @uri http://www.envjs.com/
|
jtulach@678
|
22381 |
* @copyright 2008-2010
|
jtulach@678
|
22382 |
* @license MIT
|
jtulach@678
|
22383 |
*/
|
jtulach@678
|
22384 |
//CLOSURE_END
|
jtulach@678
|
22385 |
}());
|
jtulach@678
|
22386 |
/*
|
jtulach@678
|
22387 |
* Envjs xhr.1.2.13
|
jtulach@678
|
22388 |
* Pure JavaScript Browser Environment
|
jtulach@678
|
22389 |
* By John Resig <http://ejohn.org/> and the Envjs Team
|
jtulach@678
|
22390 |
* Copyright 2008-2010 John Resig, under the MIT License
|
jtulach@678
|
22391 |
*
|
jtulach@678
|
22392 |
* Parts of the implementation originally written by Yehuda Katz.
|
jtulach@678
|
22393 |
*
|
jtulach@678
|
22394 |
* This file simply provides the global definitions we need to
|
jtulach@678
|
22395 |
* be able to correctly implement to core browser (XML)HTTPRequest
|
jtulach@678
|
22396 |
* interfaces.
|
jtulach@678
|
22397 |
*/
|
jtulach@678
|
22398 |
var Location,
|
jtulach@678
|
22399 |
XMLHttpRequest;
|
jtulach@678
|
22400 |
|
jtulach@678
|
22401 |
/*
|
jtulach@678
|
22402 |
* Envjs xhr.1.2.13
|
jtulach@678
|
22403 |
* Pure JavaScript Browser Environment
|
jtulach@678
|
22404 |
* By John Resig <http://ejohn.org/> and the Envjs Team
|
jtulach@678
|
22405 |
* Copyright 2008-2010 John Resig, under the MIT License
|
jtulach@678
|
22406 |
*/
|
jtulach@678
|
22407 |
|
jtulach@678
|
22408 |
//CLOSURE_START
|
jtulach@678
|
22409 |
(function(){
|
jtulach@678
|
22410 |
|
jtulach@678
|
22411 |
|
jtulach@678
|
22412 |
|
jtulach@678
|
22413 |
|
jtulach@678
|
22414 |
|
jtulach@678
|
22415 |
/**
|
jtulach@678
|
22416 |
* @author john resig
|
jtulach@678
|
22417 |
*/
|
jtulach@678
|
22418 |
// Helper method for extending one object with another.
|
jtulach@678
|
22419 |
function __extend__(a,b) {
|
jtulach@678
|
22420 |
for ( var i in b ) {
|
jtulach@678
|
22421 |
var g = b.__lookupGetter__(i), s = b.__lookupSetter__(i);
|
jtulach@678
|
22422 |
if ( g || s ) {
|
jtulach@678
|
22423 |
if ( g ) { a.__defineGetter__(i, g); }
|
jtulach@678
|
22424 |
if ( s ) { a.__defineSetter__(i, s); }
|
jtulach@678
|
22425 |
} else {
|
jtulach@678
|
22426 |
a[i] = b[i];
|
jtulach@678
|
22427 |
}
|
jtulach@678
|
22428 |
} return a;
|
jtulach@678
|
22429 |
}
|
jtulach@678
|
22430 |
|
jtulach@678
|
22431 |
/**
|
jtulach@678
|
22432 |
* @author john resig
|
jtulach@678
|
22433 |
*/
|
jtulach@678
|
22434 |
//from jQuery
|
jtulach@678
|
22435 |
function __setArray__( target, array ) {
|
jtulach@678
|
22436 |
// Resetting the length to 0, then using the native Array push
|
jtulach@678
|
22437 |
// is a super-fast way to populate an object with array-like properties
|
jtulach@678
|
22438 |
target.length = 0;
|
jtulach@678
|
22439 |
Array.prototype.push.apply( target, array );
|
jtulach@678
|
22440 |
}
|
jtulach@678
|
22441 |
|
jtulach@678
|
22442 |
/**
|
jtulach@678
|
22443 |
* @author ariel flesler
|
jtulach@678
|
22444 |
* http://flesler.blogspot.com/2008/11/fast-trim-function-for-javascript.html
|
jtulach@678
|
22445 |
* @param {Object} str
|
jtulach@678
|
22446 |
*/
|
jtulach@678
|
22447 |
function __trim__( str ){
|
jtulach@678
|
22448 |
return (str || "").replace( /^\s+|\s+$/g, "" );
|
jtulach@678
|
22449 |
}
|
jtulach@678
|
22450 |
|
jtulach@678
|
22451 |
|
jtulach@678
|
22452 |
/**
|
jtulach@678
|
22453 |
* @todo: document
|
jtulach@678
|
22454 |
*/
|
jtulach@678
|
22455 |
__extend__(Document.prototype,{
|
jtulach@678
|
22456 |
load: function(url){
|
jtulach@678
|
22457 |
if(this.documentURI == 'about:html'){
|
jtulach@678
|
22458 |
this.location.assign(url);
|
jtulach@678
|
22459 |
}else if(this.documentURI == url){
|
jtulach@678
|
22460 |
this.location.reload(false);
|
jtulach@678
|
22461 |
}else{
|
jtulach@678
|
22462 |
this.location.replace(url);
|
jtulach@678
|
22463 |
}
|
jtulach@678
|
22464 |
},
|
jtulach@678
|
22465 |
get location(){
|
jtulach@678
|
22466 |
return new Location(this.documentURI, this);
|
jtulach@678
|
22467 |
},
|
jtulach@678
|
22468 |
set location(url){
|
jtulach@678
|
22469 |
//very important or you will go into an infinite
|
jtulach@678
|
22470 |
//loop when creating a xml document
|
jtulach@678
|
22471 |
if(url) {
|
jtulach@678
|
22472 |
this.location.replace(url);
|
jtulach@678
|
22473 |
}
|
jtulach@678
|
22474 |
}
|
jtulach@678
|
22475 |
});
|
jtulach@678
|
22476 |
|
jtulach@678
|
22477 |
|
jtulach@678
|
22478 |
HTMLFormElement.prototype.submit = function(){
|
jtulach@678
|
22479 |
var event = __submit__(this),
|
jtulach@678
|
22480 |
serialized,
|
jtulach@678
|
22481 |
xhr,
|
jtulach@678
|
22482 |
method,
|
jtulach@678
|
22483 |
action;
|
jtulach@678
|
22484 |
if(!event.cancelled){
|
jtulach@678
|
22485 |
serialized = __formSerialize__(this);
|
jtulach@678
|
22486 |
xhr = new XMLHttpRequest();
|
jtulach@678
|
22487 |
method = this.method !== ""?this.method:"GET";
|
jtulach@678
|
22488 |
action = this.action !== ""?this.action:this.ownerDocument.baseURI;
|
jtulach@678
|
22489 |
xhr.open(method, action, false);
|
jtulach@678
|
22490 |
xhr.send(data, false);
|
jtulach@678
|
22491 |
if(xhr.readyState === 4){
|
jtulach@678
|
22492 |
__exchangeHTMLDocument__(this.ownerDocument, xhr.responseText, url);
|
jtulach@678
|
22493 |
}
|
jtulach@678
|
22494 |
}
|
jtulach@678
|
22495 |
};
|
jtulach@678
|
22496 |
|
jtulach@678
|
22497 |
/**
|
jtulach@678
|
22498 |
* Form Submissions
|
jtulach@678
|
22499 |
*
|
jtulach@678
|
22500 |
* This code is borrow largely from jquery.params and jquery.form.js
|
jtulach@678
|
22501 |
*
|
jtulach@678
|
22502 |
* formToArray() gathers form element data into an array of objects that can
|
jtulach@678
|
22503 |
* be passed to any of the following ajax functions: $.get, $.post, or load.
|
jtulach@678
|
22504 |
* Each object in the array has both a 'name' and 'value' property. An example of
|
jtulach@678
|
22505 |
* an array for a simple login form might be:
|
jtulach@678
|
22506 |
*
|
jtulach@678
|
22507 |
* [ { name: 'username', value: 'jresig' }, { name: 'password', value: 'secret' } ]
|
jtulach@678
|
22508 |
*
|
jtulach@678
|
22509 |
* It is this array that is passed to pre-submit callback functions provided to the
|
jtulach@678
|
22510 |
* ajaxSubmit() and ajaxForm() methods.
|
jtulach@678
|
22511 |
*
|
jtulach@678
|
22512 |
* The semantic argument can be used to force form serialization in semantic order.
|
jtulach@678
|
22513 |
* This is normally true anyway, unless the form contains input elements of type='image'.
|
jtulach@678
|
22514 |
* If your form must be submitted with name/value pairs in semantic order and your form
|
jtulach@678
|
22515 |
* contains an input of type='image" then pass true for this arg, otherwise pass false
|
jtulach@678
|
22516 |
* (or nothing) to avoid the overhead for this logic.
|
jtulach@678
|
22517 |
*
|
jtulach@678
|
22518 |
*
|
jtulach@678
|
22519 |
* @name formToArray
|
jtulach@678
|
22520 |
* @param semantic true if serialization must maintain strict semantic ordering of elements (slower)
|
jtulach@678
|
22521 |
* @type Array<Object>
|
jtulach@678
|
22522 |
*/
|
jtulach@678
|
22523 |
var __formToArray__ = function(form, semantic) {
|
jtulach@678
|
22524 |
var array = [],
|
jtulach@678
|
22525 |
elements = semantic ? form.getElementsByTagName('*') : form.elements,
|
jtulach@678
|
22526 |
element,
|
jtulach@678
|
22527 |
i,j,imax, jmax,
|
jtulach@678
|
22528 |
name,
|
jtulach@678
|
22529 |
value;
|
jtulach@678
|
22530 |
|
jtulach@678
|
22531 |
if (!elements) {
|
jtulach@678
|
22532 |
return array;
|
jtulach@678
|
22533 |
}
|
jtulach@678
|
22534 |
|
jtulach@678
|
22535 |
imax = elements.length;
|
jtulach@678
|
22536 |
for(i=0; i < imax; i++) {
|
jtulach@678
|
22537 |
element = elements[i];
|
jtulach@678
|
22538 |
name = element.name;
|
jtulach@678
|
22539 |
if (!name) {
|
jtulach@678
|
22540 |
continue;
|
jtulach@678
|
22541 |
}
|
jtulach@678
|
22542 |
if (semantic && form.clk && element.type === "image") {
|
jtulach@678
|
22543 |
// handle image inputs on the fly when semantic == true
|
jtulach@678
|
22544 |
if(!element.disabled && form.clk == element) {
|
jtulach@678
|
22545 |
array.push({
|
jtulach@678
|
22546 |
name: name+'.x',
|
jtulach@678
|
22547 |
value: form.clk_x
|
jtulach@678
|
22548 |
},{
|
jtulach@678
|
22549 |
name: name+'.y',
|
jtulach@678
|
22550 |
value: form.clk_y
|
jtulach@678
|
22551 |
});
|
jtulach@678
|
22552 |
}
|
jtulach@678
|
22553 |
continue;
|
jtulach@678
|
22554 |
}
|
jtulach@678
|
22555 |
|
jtulach@678
|
22556 |
value = __fieldValue__(element, true);
|
jtulach@678
|
22557 |
if (value && value.constructor == Array) {
|
jtulach@678
|
22558 |
jmax = value.length;
|
jtulach@678
|
22559 |
for(j=0; j < jmax; j++){
|
jtulach@678
|
22560 |
array.push({name: name, value: value[j]});
|
jtulach@678
|
22561 |
}
|
jtulach@678
|
22562 |
} else if (value !== null && typeof value != 'undefined'){
|
jtulach@678
|
22563 |
array.push({name: name, value: value});
|
jtulach@678
|
22564 |
}
|
jtulach@678
|
22565 |
}
|
jtulach@678
|
22566 |
|
jtulach@678
|
22567 |
if (!semantic && form.clk) {
|
jtulach@678
|
22568 |
// input type=='image' are not found in elements array! handle them here
|
jtulach@678
|
22569 |
elements = form.getElementsByTagName("input");
|
jtulach@678
|
22570 |
imax = imax=elements.length;
|
jtulach@678
|
22571 |
for(i=0; i < imax; i++) {
|
jtulach@678
|
22572 |
element = elements[i];
|
jtulach@678
|
22573 |
name = element.name;
|
jtulach@678
|
22574 |
if(name && !element.disabled && element.type == "image" && form.clk == input) {
|
jtulach@678
|
22575 |
array.push(
|
jtulach@678
|
22576 |
{name: name+'.x', value: form.clk_x},
|
jtulach@678
|
22577 |
{name: name+'.y', value: form.clk_y});
|
jtulach@678
|
22578 |
}
|
jtulach@678
|
22579 |
}
|
jtulach@678
|
22580 |
}
|
jtulach@678
|
22581 |
return array;
|
jtulach@678
|
22582 |
};
|
jtulach@678
|
22583 |
|
jtulach@678
|
22584 |
|
jtulach@678
|
22585 |
/**
|
jtulach@678
|
22586 |
* Serializes form data into a 'submittable' string. This method will return a string
|
jtulach@678
|
22587 |
* in the format: name1=value1&name2=value2
|
jtulach@678
|
22588 |
*
|
jtulach@678
|
22589 |
* The semantic argument can be used to force form serialization in semantic order.
|
jtulach@678
|
22590 |
* If your form must be submitted with name/value pairs in semantic order then pass
|
jtulach@678
|
22591 |
* true for this arg, otherwise pass false (or nothing) to avoid the overhead for
|
jtulach@678
|
22592 |
* this logic (which can be significant for very large forms).
|
jtulach@678
|
22593 |
*
|
jtulach@678
|
22594 |
*
|
jtulach@678
|
22595 |
* @name formSerialize
|
jtulach@678
|
22596 |
* @param semantic true if serialization must maintain strict semantic ordering of elements (slower)
|
jtulach@678
|
22597 |
* @type String
|
jtulach@678
|
22598 |
*/
|
jtulach@678
|
22599 |
var __formSerialize__ = function(form, semantic) {
|
jtulach@678
|
22600 |
//hand off to param for proper encoding
|
jtulach@678
|
22601 |
return __param__(__formToArray__(form, semantic));
|
jtulach@678
|
22602 |
};
|
jtulach@678
|
22603 |
|
jtulach@678
|
22604 |
|
jtulach@678
|
22605 |
/**
|
jtulach@678
|
22606 |
* Serializes all field elements inputs Array into a query string.
|
jtulach@678
|
22607 |
* This method will return a string in the format: name1=value1&name2=value2
|
jtulach@678
|
22608 |
*
|
jtulach@678
|
22609 |
* The successful argument controls whether or not serialization is limited to
|
jtulach@678
|
22610 |
* 'successful' controls (per http://www.w3.org/TR/html4/interact/forms.html#successful-controls).
|
jtulach@678
|
22611 |
* The default value of the successful argument is true.
|
jtulach@678
|
22612 |
*
|
jtulach@678
|
22613 |
*
|
jtulach@678
|
22614 |
* @name fieldSerialize
|
jtulach@678
|
22615 |
* @param successful true if only successful controls should be serialized (default is true)
|
jtulach@678
|
22616 |
* @type String
|
jtulach@678
|
22617 |
*/
|
jtulach@678
|
22618 |
var __fieldSerialize__ = function(inputs, successful) {
|
jtulach@678
|
22619 |
var array = [],
|
jtulach@678
|
22620 |
input,
|
jtulach@678
|
22621 |
name,
|
jtulach@678
|
22622 |
value,
|
jtulach@678
|
22623 |
i,j, imax, jmax;
|
jtulach@678
|
22624 |
|
jtulach@678
|
22625 |
imax = inputs.length;
|
jtulach@678
|
22626 |
for(i=0; i<imax; i++){
|
jtulach@678
|
22627 |
input = inputs[i];
|
jtulach@678
|
22628 |
name = input.name;
|
jtulach@678
|
22629 |
if (!name) {
|
jtulach@678
|
22630 |
return '';
|
jtulach@678
|
22631 |
}
|
jtulach@678
|
22632 |
value = __fieldValue__(input, successful);
|
jtulach@678
|
22633 |
if (value && value.constructor == Array) {
|
jtulach@678
|
22634 |
jmax = value.length;
|
jtulach@678
|
22635 |
for (j=0; j < jmax; j++){
|
jtulach@678
|
22636 |
array.push({
|
jtulach@678
|
22637 |
name: name,
|
jtulach@678
|
22638 |
value: value[j]
|
jtulach@678
|
22639 |
});
|
jtulach@678
|
22640 |
}
|
jtulach@678
|
22641 |
}else if (value !== null && typeof value != 'undefined'){
|
jtulach@678
|
22642 |
array.push({
|
jtulach@678
|
22643 |
name: input.name,
|
jtulach@678
|
22644 |
value: value
|
jtulach@678
|
22645 |
});
|
jtulach@678
|
22646 |
}
|
jtulach@678
|
22647 |
}
|
jtulach@678
|
22648 |
|
jtulach@678
|
22649 |
//hand off for proper encoding
|
jtulach@678
|
22650 |
return __param__(array);
|
jtulach@678
|
22651 |
};
|
jtulach@678
|
22652 |
|
jtulach@678
|
22653 |
|
jtulach@678
|
22654 |
/**
|
jtulach@678
|
22655 |
* Returns the value(s) of the element in the matched set. For example, consider the following form:
|
jtulach@678
|
22656 |
*
|
jtulach@678
|
22657 |
*
|
jtulach@678
|
22658 |
* The successful argument controls whether or not the field element must be 'successful'
|
jtulach@678
|
22659 |
* (per http://www.w3.org/TR/html4/interact/forms.html#successful-controls).
|
jtulach@678
|
22660 |
* The default value of the successful argument is true. If this value is false the value(s)
|
jtulach@678
|
22661 |
* for each element is returned.
|
jtulach@678
|
22662 |
*
|
jtulach@678
|
22663 |
* Note: This method *always* returns an array. If no valid value can be determined the
|
jtulach@678
|
22664 |
* array will be empty, otherwise it will contain one or more values.
|
jtulach@678
|
22665 |
*
|
jtulach@678
|
22666 |
*
|
jtulach@678
|
22667 |
* @name fieldValue
|
jtulach@678
|
22668 |
* @param Boolean successful true if only the values for successful controls
|
jtulach@678
|
22669 |
* should be returned (default is true)
|
jtulach@678
|
22670 |
* @type Array<String>
|
jtulach@678
|
22671 |
*/
|
jtulach@678
|
22672 |
var __fieldValues__ = function(inputs, successful) {
|
jtulach@678
|
22673 |
var i,
|
jtulach@678
|
22674 |
imax = inputs.length,
|
jtulach@678
|
22675 |
element,
|
jtulach@678
|
22676 |
values = [],
|
jtulach@678
|
22677 |
value;
|
jtulach@678
|
22678 |
for (i=0; i < imax; i++) {
|
jtulach@678
|
22679 |
element = inputs[i];
|
jtulach@678
|
22680 |
value = __fieldValue__(element, successful);
|
jtulach@678
|
22681 |
if (value === null || typeof value == 'undefined' ||
|
jtulach@678
|
22682 |
(value.constructor == Array && !value.length)) {
|
jtulach@678
|
22683 |
continue;
|
jtulach@678
|
22684 |
}
|
jtulach@678
|
22685 |
if (value.constructor == Array) {
|
jtulach@678
|
22686 |
Array.prototype.push(values, value);
|
jtulach@678
|
22687 |
} else {
|
jtulach@678
|
22688 |
values.push(value);
|
jtulach@678
|
22689 |
}
|
jtulach@678
|
22690 |
}
|
jtulach@678
|
22691 |
return values;
|
jtulach@678
|
22692 |
};
|
jtulach@678
|
22693 |
|
jtulach@678
|
22694 |
/**
|
jtulach@678
|
22695 |
* Returns the value of the field element.
|
jtulach@678
|
22696 |
*
|
jtulach@678
|
22697 |
* The successful argument controls whether or not the field element must be 'successful'
|
jtulach@678
|
22698 |
* (per http://www.w3.org/TR/html4/interact/forms.html#successful-controls).
|
jtulach@678
|
22699 |
* The default value of the successful argument is true. If the given element is not
|
jtulach@678
|
22700 |
* successful and the successful arg is not false then the returned value will be null.
|
jtulach@678
|
22701 |
*
|
jtulach@678
|
22702 |
* Note: If the successful flag is true (default) but the element is not successful, the return will be null
|
jtulach@678
|
22703 |
* Note: The value returned for a successful select-multiple element will always be an array.
|
jtulach@678
|
22704 |
* Note: If the element has no value the return value will be undefined.
|
jtulach@678
|
22705 |
*
|
jtulach@678
|
22706 |
* @name fieldValue
|
jtulach@678
|
22707 |
* @param Element el The DOM element for which the value will be returned
|
jtulach@678
|
22708 |
* @param Boolean successful true if value returned must be for a successful controls (default is true)
|
jtulach@678
|
22709 |
* @type String or Array<String> or null or undefined
|
jtulach@678
|
22710 |
*/
|
jtulach@678
|
22711 |
var __fieldValue__ = function(element, successful) {
|
jtulach@678
|
22712 |
var name = element.name,
|
jtulach@678
|
22713 |
type = element.type,
|
jtulach@678
|
22714 |
tag = element.tagName.toLowerCase(),
|
jtulach@678
|
22715 |
index,
|
jtulach@678
|
22716 |
array,
|
jtulach@678
|
22717 |
options,
|
jtulach@678
|
22718 |
option,
|
jtulach@678
|
22719 |
one,
|
jtulach@678
|
22720 |
i, imax,
|
jtulach@678
|
22721 |
value;
|
jtulach@678
|
22722 |
|
jtulach@678
|
22723 |
if (typeof successful == 'undefined') {
|
jtulach@678
|
22724 |
successful = true;
|
jtulach@678
|
22725 |
}
|
jtulach@678
|
22726 |
|
jtulach@678
|
22727 |
if (successful && (!name || element.disabled || type == 'reset' || type == 'button' ||
|
jtulach@678
|
22728 |
(type == 'checkbox' || type == 'radio') && !element.checked ||
|
jtulach@678
|
22729 |
(type == 'submit' || type == 'image') &&
|
jtulach@678
|
22730 |
element.form && element.form.clk != element || tag === 'select' &&
|
jtulach@678
|
22731 |
element.selectedIndex === -1)) {
|
jtulach@678
|
22732 |
return null;
|
jtulach@678
|
22733 |
}
|
jtulach@678
|
22734 |
|
jtulach@678
|
22735 |
if (tag === 'select') {
|
jtulach@678
|
22736 |
index = element.selectedIndex;
|
jtulach@678
|
22737 |
if (index < 0) {
|
jtulach@678
|
22738 |
return null;
|
jtulach@678
|
22739 |
}
|
jtulach@678
|
22740 |
array = [];
|
jtulach@678
|
22741 |
options = element.options;
|
jtulach@678
|
22742 |
one = (type == 'select-one');
|
jtulach@678
|
22743 |
imax = (one ? index+1 : options.length);
|
jtulach@678
|
22744 |
i = (one ? index : 0);
|
jtulach@678
|
22745 |
for( i; i < imax; i++) {
|
jtulach@678
|
22746 |
option = options[i];
|
jtulach@678
|
22747 |
if (option.selected) {
|
jtulach@678
|
22748 |
value = option.value;
|
jtulach@678
|
22749 |
if (one) {
|
jtulach@678
|
22750 |
return value;
|
jtulach@678
|
22751 |
}
|
jtulach@678
|
22752 |
array.push(value);
|
jtulach@678
|
22753 |
}
|
jtulach@678
|
22754 |
}
|
jtulach@678
|
22755 |
return array;
|
jtulach@678
|
22756 |
}
|
jtulach@678
|
22757 |
return element.value;
|
jtulach@678
|
22758 |
};
|
jtulach@678
|
22759 |
|
jtulach@678
|
22760 |
|
jtulach@678
|
22761 |
/**
|
jtulach@678
|
22762 |
* Clears the form data. Takes the following actions on the form's input fields:
|
jtulach@678
|
22763 |
* - input text fields will have their 'value' property set to the empty string
|
jtulach@678
|
22764 |
* - select elements will have their 'selectedIndex' property set to -1
|
jtulach@678
|
22765 |
* - checkbox and radio inputs will have their 'checked' property set to false
|
jtulach@678
|
22766 |
* - inputs of type submit, button, reset, and hidden will *not* be effected
|
jtulach@678
|
22767 |
* - button elements will *not* be effected
|
jtulach@678
|
22768 |
*
|
jtulach@678
|
22769 |
*
|
jtulach@678
|
22770 |
* @name clearForm
|
jtulach@678
|
22771 |
*/
|
jtulach@678
|
22772 |
var __clearForm__ = function(form) {
|
jtulach@678
|
22773 |
var i,
|
jtulach@678
|
22774 |
j, jmax,
|
jtulach@678
|
22775 |
elements,
|
jtulach@678
|
22776 |
resetable = ['input','select','textarea'];
|
jtulach@678
|
22777 |
for(i=0; i<resetable.length; i++){
|
jtulach@678
|
22778 |
elements = form.getElementsByTagName(resetable[i]);
|
jtulach@678
|
22779 |
jmax = elements.length;
|
jtulach@678
|
22780 |
for(j=0;j<jmax;j++){
|
jtulach@678
|
22781 |
__clearField__(elements[j]);
|
jtulach@678
|
22782 |
}
|
jtulach@678
|
22783 |
}
|
jtulach@678
|
22784 |
};
|
jtulach@678
|
22785 |
|
jtulach@678
|
22786 |
/**
|
jtulach@678
|
22787 |
* Clears the selected form element. Takes the following actions on the element:
|
jtulach@678
|
22788 |
* - input text fields will have their 'value' property set to the empty string
|
jtulach@678
|
22789 |
* - select elements will have their 'selectedIndex' property set to -1
|
jtulach@678
|
22790 |
* - checkbox and radio inputs will have their 'checked' property set to false
|
jtulach@678
|
22791 |
* - inputs of type submit, button, reset, and hidden will *not* be effected
|
jtulach@678
|
22792 |
* - button elements will *not* be effected
|
jtulach@678
|
22793 |
*
|
jtulach@678
|
22794 |
* @name clearFields
|
jtulach@678
|
22795 |
*/
|
jtulach@678
|
22796 |
var __clearField__ = function(element) {
|
jtulach@678
|
22797 |
var type = element.type,
|
jtulach@678
|
22798 |
tag = element.tagName.toLowerCase();
|
jtulach@678
|
22799 |
if (type == 'text' || type == 'password' || tag === 'textarea') {
|
jtulach@678
|
22800 |
element.value = '';
|
jtulach@678
|
22801 |
} else if (type == 'checkbox' || type == 'radio') {
|
jtulach@678
|
22802 |
element.checked = false;
|
jtulach@678
|
22803 |
} else if (tag === 'select') {
|
jtulach@678
|
22804 |
element.selectedIndex = -1;
|
jtulach@678
|
22805 |
}
|
jtulach@678
|
22806 |
};
|
jtulach@678
|
22807 |
|
jtulach@678
|
22808 |
|
jtulach@678
|
22809 |
// Serialize an array of key/values into a query string
|
jtulach@678
|
22810 |
var __param__= function( array ) {
|
jtulach@678
|
22811 |
var i, serialized = [];
|
jtulach@678
|
22812 |
|
jtulach@678
|
22813 |
// Serialize the key/values
|
jtulach@678
|
22814 |
for(i=0; i<array.length; i++){
|
jtulach@678
|
22815 |
serialized[ serialized.length ] =
|
jtulach@678
|
22816 |
encodeURIComponent(array[i].name) + '=' +
|
jtulach@678
|
22817 |
encodeURIComponent(array[i].value);
|
jtulach@678
|
22818 |
}
|
jtulach@678
|
22819 |
|
jtulach@678
|
22820 |
// Return the resulting serialization
|
jtulach@678
|
22821 |
return serialized.join("&").replace(/%20/g, "+");
|
jtulach@678
|
22822 |
};
|
jtulach@678
|
22823 |
|
jtulach@678
|
22824 |
/**
|
jtulach@678
|
22825 |
* Location
|
jtulach@678
|
22826 |
*
|
jtulach@678
|
22827 |
* Mozilla MDC:
|
jtulach@678
|
22828 |
* https://developer.mozilla.org/En/DOM/Window.location
|
jtulach@678
|
22829 |
* https://developer.mozilla.org/en/DOM/document.location
|
jtulach@678
|
22830 |
*
|
jtulach@678
|
22831 |
* HTML5: 6.10.4 The Location interface
|
jtulach@678
|
22832 |
* http://dev.w3.org/html5/spec/Overview.html#location
|
jtulach@678
|
22833 |
*
|
jtulach@678
|
22834 |
* HTML5: 2.5.3 Interfaces for URL manipulation
|
jtulach@678
|
22835 |
* http://dev.w3.org/html5/spec/Overview.html#url-decomposition-idl-attributes
|
jtulach@678
|
22836 |
* All of section 2.5 is worth reading, but 2.5.3 contains very
|
jtulach@678
|
22837 |
* detailed information on how getters/setter should work
|
jtulach@678
|
22838 |
*
|
jtulach@678
|
22839 |
* NOT IMPLEMENTED:
|
jtulach@678
|
22840 |
* HTML5: Section 6.10.4.1 Security -- prevents scripts from another domain
|
jtulach@678
|
22841 |
* from accessing most of the 'Location'
|
jtulach@678
|
22842 |
* Not sure if anyone implements this in HTML4
|
jtulach@678
|
22843 |
*/
|
jtulach@678
|
22844 |
|
jtulach@678
|
22845 |
Location = function(url, doc, history) {
|
jtulach@678
|
22846 |
//console.log('Location url %s', url);
|
jtulach@678
|
22847 |
var $url = url,
|
jtulach@678
|
22848 |
$document = doc ? doc : null,
|
jtulach@678
|
22849 |
$history = history ? history : null;
|
jtulach@678
|
22850 |
|
jtulach@678
|
22851 |
var parts = Envjs.urlsplit($url);
|
jtulach@678
|
22852 |
|
jtulach@678
|
22853 |
return {
|
jtulach@678
|
22854 |
get hash() {
|
jtulach@678
|
22855 |
return parts.fragment ? '#' + parts.fragment : parts.fragment;
|
jtulach@678
|
22856 |
},
|
jtulach@678
|
22857 |
set hash(s) {
|
jtulach@678
|
22858 |
if (s[0] === '#') {
|
jtulach@678
|
22859 |
parts.fragment = s.substr(1);
|
jtulach@678
|
22860 |
} else {
|
jtulach@678
|
22861 |
parts.fragment = s;
|
jtulach@678
|
22862 |
}
|
jtulach@678
|
22863 |
$url = Envjs.urlunsplit(parts);
|
jtulach@678
|
22864 |
if ($history) {
|
jtulach@678
|
22865 |
$history.add($url, 'hash');
|
jtulach@678
|
22866 |
}
|
jtulach@678
|
22867 |
},
|
jtulach@678
|
22868 |
|
jtulach@678
|
22869 |
get host() {
|
jtulach@678
|
22870 |
return parts.netloc;
|
jtulach@678
|
22871 |
},
|
jtulach@678
|
22872 |
set host(s) {
|
jtulach@678
|
22873 |
if (!s || s === '') {
|
jtulach@678
|
22874 |
return;
|
jtulach@678
|
22875 |
}
|
jtulach@678
|
22876 |
|
jtulach@678
|
22877 |
parts.netloc = s;
|
jtulach@678
|
22878 |
$url = Envjs.urlunsplit(parts);
|
jtulach@678
|
22879 |
|
jtulach@678
|
22880 |
// this regenerates hostname & port
|
jtulach@678
|
22881 |
parts = Envjs.urlsplit($url);
|
jtulach@678
|
22882 |
|
jtulach@678
|
22883 |
if ($history) {
|
jtulach@678
|
22884 |
$history.add( $url, 'host');
|
jtulach@678
|
22885 |
}
|
jtulach@678
|
22886 |
this.assign($url);
|
jtulach@678
|
22887 |
},
|
jtulach@678
|
22888 |
|
jtulach@678
|
22889 |
get hostname() {
|
jtulach@678
|
22890 |
return parts.hostname;
|
jtulach@678
|
22891 |
},
|
jtulach@678
|
22892 |
set hostname(s) {
|
jtulach@678
|
22893 |
if (!s || s === '') {
|
jtulach@678
|
22894 |
return;
|
jtulach@678
|
22895 |
}
|
jtulach@678
|
22896 |
|
jtulach@678
|
22897 |
parts.netloc = s;
|
jtulach@678
|
22898 |
if (parts.port != '') {
|
jtulach@678
|
22899 |
parts.netloc += ':' + parts.port;
|
jtulach@678
|
22900 |
}
|
jtulach@678
|
22901 |
parts.hostname = s;
|
jtulach@678
|
22902 |
$url = Envjs.urlunsplit(parts);
|
jtulach@678
|
22903 |
if ($history) {
|
jtulach@678
|
22904 |
$history.add( $url, 'hostname');
|
jtulach@678
|
22905 |
}
|
jtulach@678
|
22906 |
this.assign($url);
|
jtulach@678
|
22907 |
},
|
jtulach@678
|
22908 |
|
jtulach@678
|
22909 |
get href() {
|
jtulach@678
|
22910 |
return $url;
|
jtulach@678
|
22911 |
},
|
jtulach@678
|
22912 |
set href(url) {
|
jtulach@678
|
22913 |
$url = url;
|
jtulach@678
|
22914 |
if ($history) {
|
jtulach@678
|
22915 |
$history.add($url, 'href');
|
jtulach@678
|
22916 |
}
|
jtulach@678
|
22917 |
this.assign($url);
|
jtulach@678
|
22918 |
},
|
jtulach@678
|
22919 |
|
jtulach@678
|
22920 |
get pathname() {
|
jtulach@678
|
22921 |
return parts.path;
|
jtulach@678
|
22922 |
},
|
jtulach@678
|
22923 |
set pathname(s) {
|
jtulach@678
|
22924 |
if (s[0] === '/') {
|
jtulach@678
|
22925 |
parts.path = s;
|
jtulach@678
|
22926 |
} else {
|
jtulach@678
|
22927 |
parts.path = '/' + s;
|
jtulach@678
|
22928 |
}
|
jtulach@678
|
22929 |
$url = Envjs.urlunsplit(parts);
|
jtulach@678
|
22930 |
|
jtulach@678
|
22931 |
if ($history) {
|
jtulach@678
|
22932 |
$history.add($url, 'pathname');
|
jtulach@678
|
22933 |
}
|
jtulach@678
|
22934 |
this.assign($url);
|
jtulach@678
|
22935 |
},
|
jtulach@678
|
22936 |
|
jtulach@678
|
22937 |
get port() {
|
jtulach@678
|
22938 |
// make sure it's a string
|
jtulach@678
|
22939 |
return '' + parts.port;
|
jtulach@678
|
22940 |
},
|
jtulach@678
|
22941 |
set port(p) {
|
jtulach@678
|
22942 |
// make a string
|
jtulach@678
|
22943 |
var s = '' + p;
|
jtulach@678
|
22944 |
parts.port = s;
|
jtulach@678
|
22945 |
parts.netloc = parts.hostname + ':' + parts.port;
|
jtulach@678
|
22946 |
$url = Envjs.urlunsplit(parts);
|
jtulach@678
|
22947 |
if ($history) {
|
jtulach@678
|
22948 |
$history.add( $url, 'port');
|
jtulach@678
|
22949 |
}
|
jtulach@678
|
22950 |
this.assign($url);
|
jtulach@678
|
22951 |
},
|
jtulach@678
|
22952 |
|
jtulach@678
|
22953 |
get protocol() {
|
jtulach@678
|
22954 |
return parts.scheme + ':';
|
jtulach@678
|
22955 |
},
|
jtulach@678
|
22956 |
set protocol(s) {
|
jtulach@678
|
22957 |
var i = s.indexOf(':');
|
jtulach@678
|
22958 |
if (i != -1) {
|
jtulach@678
|
22959 |
s = s.substr(0,i);
|
jtulach@678
|
22960 |
}
|
jtulach@678
|
22961 |
parts.scheme = s;
|
jtulach@678
|
22962 |
$url = Envjs.urlunsplit(parts);
|
jtulach@678
|
22963 |
if ($history) {
|
jtulach@678
|
22964 |
$history.add($url, 'protocol');
|
jtulach@678
|
22965 |
}
|
jtulach@678
|
22966 |
this.assign($url);
|
jtulach@678
|
22967 |
},
|
jtulach@678
|
22968 |
|
jtulach@678
|
22969 |
get search() {
|
jtulach@678
|
22970 |
return (parts.query) ? '?' + parts.query : parts.query;
|
jtulach@678
|
22971 |
},
|
jtulach@678
|
22972 |
set search(s) {
|
jtulach@678
|
22973 |
if (s[0] == '?') {
|
jtulach@678
|
22974 |
s = s.substr(1);
|
jtulach@678
|
22975 |
}
|
jtulach@678
|
22976 |
parts.query = s;
|
jtulach@678
|
22977 |
$url = Envjs.urlunsplit(parts);
|
jtulach@678
|
22978 |
if ($history) {
|
jtulach@678
|
22979 |
$history.add($url, 'search');
|
jtulach@678
|
22980 |
}
|
jtulach@678
|
22981 |
this.assign($url);
|
jtulach@678
|
22982 |
},
|
jtulach@678
|
22983 |
|
jtulach@678
|
22984 |
toString: function() {
|
jtulach@678
|
22985 |
return $url;
|
jtulach@678
|
22986 |
},
|
jtulach@678
|
22987 |
|
jtulach@678
|
22988 |
assign: function(url) {
|
jtulach@678
|
22989 |
var _this = this,
|
jtulach@678
|
22990 |
xhr,
|
jtulach@678
|
22991 |
event,
|
jtulach@678
|
22992 |
cookie;
|
jtulach@678
|
22993 |
|
jtulach@678
|
22994 |
//console.log('assigning %s',url);
|
jtulach@678
|
22995 |
|
jtulach@678
|
22996 |
// update closure upvars
|
jtulach@678
|
22997 |
$url = url;
|
jtulach@678
|
22998 |
parts = Envjs.urlsplit($url);
|
jtulach@678
|
22999 |
|
jtulach@678
|
23000 |
//we can only assign if this Location is associated with a document
|
jtulach@678
|
23001 |
if ($document) {
|
jtulach@678
|
23002 |
//console.log('fetching %s (async? %s)', url, $document.async);
|
jtulach@678
|
23003 |
xhr = new XMLHttpRequest();
|
jtulach@678
|
23004 |
|
jtulach@678
|
23005 |
// TODO: make async flag a Envjs paramter
|
jtulach@678
|
23006 |
xhr.open('GET', url, false);//$document.async);
|
jtulach@678
|
23007 |
|
jtulach@678
|
23008 |
// TODO: is there a better way to test if a node is an HTMLDocument?
|
jtulach@678
|
23009 |
if ($document.toString() === '[object HTMLDocument]') {
|
jtulach@678
|
23010 |
//tell the xhr to not parse the document as XML
|
jtulach@678
|
23011 |
//console.log('loading html document');
|
jtulach@678
|
23012 |
xhr.onreadystatechange = function() {
|
jtulach@678
|
23013 |
//console.log('readyState %s', xhr.readyState);
|
jtulach@678
|
23014 |
if (xhr.readyState === 4) {
|
jtulach@678
|
23015 |
$document.baseURI = new Location(url, $document);
|
jtulach@678
|
23016 |
//console.log('new document baseURI %s', $document.baseURI);
|
jtulach@678
|
23017 |
__exchangeHTMLDocument__($document, xhr.responseText, url);
|
jtulach@678
|
23018 |
}
|
jtulach@678
|
23019 |
};
|
jtulach@678
|
23020 |
xhr.send(null, false);
|
jtulach@678
|
23021 |
} else {
|
jtulach@678
|
23022 |
//Treat as an XMLDocument
|
jtulach@678
|
23023 |
xhr.onreadystatechange = function() {
|
jtulach@678
|
23024 |
if (xhr.readyState === 4) {
|
jtulach@678
|
23025 |
$document = xhr.responseXML;
|
jtulach@678
|
23026 |
$document.baseURI = $url;
|
jtulach@678
|
23027 |
if ($document.createEvent) {
|
jtulach@678
|
23028 |
event = $document.createEvent('Event');
|
jtulach@678
|
23029 |
event.initEvent('DOMContentLoaded');
|
jtulach@678
|
23030 |
$document.dispatchEvent( event, false );
|
jtulach@678
|
23031 |
}
|
jtulach@678
|
23032 |
}
|
jtulach@678
|
23033 |
};
|
jtulach@678
|
23034 |
xhr.send();
|
jtulach@678
|
23035 |
}
|
jtulach@678
|
23036 |
|
jtulach@678
|
23037 |
};
|
jtulach@678
|
23038 |
|
jtulach@678
|
23039 |
},
|
jtulach@678
|
23040 |
reload: function(forceget) {
|
jtulach@678
|
23041 |
//for now we have no caching so just proxy to assign
|
jtulach@678
|
23042 |
//console.log('reloading %s',$url);
|
jtulach@678
|
23043 |
this.assign($url);
|
jtulach@678
|
23044 |
},
|
jtulach@678
|
23045 |
replace: function(url) {
|
jtulach@678
|
23046 |
this.assign(url);
|
jtulach@678
|
23047 |
}
|
jtulach@678
|
23048 |
};
|
jtulach@678
|
23049 |
};
|
jtulach@678
|
23050 |
|
jtulach@678
|
23051 |
var __exchangeHTMLDocument__ = function(doc, text, url) {
|
jtulach@678
|
23052 |
var html, head, title, body, event, e;
|
jtulach@678
|
23053 |
// try {
|
jtulach@678
|
23054 |
doc.baseURI = url;
|
jtulach@678
|
23055 |
HTMLParser.parseDocument(text, doc);
|
jtulach@678
|
23056 |
Envjs.wait();
|
jtulach@678
|
23057 |
/* } catch (e) {
|
jtulach@678
|
23058 |
console.log('parsererror %s', e);
|
jtulach@678
|
23059 |
try {
|
jtulach@678
|
23060 |
console.log('document \n %s', doc.documentElement.outerHTML);
|
jtulach@678
|
23061 |
} catch (e) {
|
jtulach@678
|
23062 |
// swallow
|
jtulach@678
|
23063 |
}
|
jtulach@678
|
23064 |
doc = new HTMLDocument(new DOMImplementation(), doc.ownerWindow);
|
jtulach@678
|
23065 |
html = doc.createElement('html');
|
jtulach@678
|
23066 |
head = doc.createElement('head');
|
jtulach@678
|
23067 |
title = doc.createElement('title');
|
jtulach@678
|
23068 |
body = doc.createElement('body');
|
jtulach@678
|
23069 |
title.appendChild(doc.createTextNode('Error'));
|
jtulach@678
|
23070 |
body.appendChild(doc.createTextNode('' + e));
|
jtulach@678
|
23071 |
head.appendChild(title);
|
jtulach@678
|
23072 |
html.appendChild(head);
|
jtulach@678
|
23073 |
html.appendChild(body);
|
jtulach@678
|
23074 |
doc.appendChild(html);
|
jtulach@678
|
23075 |
//console.log('default error document \n %s', doc.documentElement.outerHTML);
|
jtulach@678
|
23076 |
|
jtulach@678
|
23077 |
//DOMContentLoaded event
|
jtulach@678
|
23078 |
if (doc.createEvent) {
|
jtulach@678
|
23079 |
event = doc.createEvent('Event');
|
jtulach@678
|
23080 |
event.initEvent('DOMContentLoaded', false, false);
|
jtulach@678
|
23081 |
doc.dispatchEvent( event, false );
|
jtulach@678
|
23082 |
|
jtulach@678
|
23083 |
event = doc.createEvent('HTMLEvents');
|
jtulach@678
|
23084 |
event.initEvent('load', false, false);
|
jtulach@678
|
23085 |
doc.dispatchEvent( event, false );
|
jtulach@678
|
23086 |
}
|
jtulach@678
|
23087 |
|
jtulach@678
|
23088 |
//finally fire the window.onload event
|
jtulach@678
|
23089 |
//TODO: this belongs in window.js which is a event
|
jtulach@678
|
23090 |
// event handler for DOMContentLoaded on document
|
jtulach@678
|
23091 |
|
jtulach@678
|
23092 |
try {
|
jtulach@678
|
23093 |
if (doc === window.document) {
|
jtulach@678
|
23094 |
console.log('triggering window.load');
|
jtulach@678
|
23095 |
event = doc.createEvent('HTMLEvents');
|
jtulach@678
|
23096 |
event.initEvent('load', false, false);
|
jtulach@678
|
23097 |
window.dispatchEvent( event, false );
|
jtulach@678
|
23098 |
}
|
jtulach@678
|
23099 |
} catch (e) {
|
jtulach@678
|
23100 |
//console.log('window load event failed %s', e);
|
jtulach@678
|
23101 |
//swallow
|
jtulach@678
|
23102 |
}
|
jtulach@678
|
23103 |
}; */ /* closes return {... */
|
jtulach@678
|
23104 |
};
|
jtulach@678
|
23105 |
|
jtulach@678
|
23106 |
/**
|
jtulach@678
|
23107 |
*
|
jtulach@678
|
23108 |
* @class XMLHttpRequest
|
jtulach@678
|
23109 |
* @author Originally implemented by Yehuda Katz
|
jtulach@678
|
23110 |
*
|
jtulach@678
|
23111 |
*/
|
jtulach@678
|
23112 |
|
jtulach@678
|
23113 |
// this implementation can be used without requiring a DOMParser
|
jtulach@678
|
23114 |
// assuming you dont try to use it to get xml/html documents
|
jtulach@678
|
23115 |
var domparser;
|
jtulach@678
|
23116 |
|
jtulach@678
|
23117 |
XMLHttpRequest = function(){
|
jtulach@678
|
23118 |
this.headers = {};
|
jtulach@678
|
23119 |
this.responseHeaders = {};
|
jtulach@678
|
23120 |
this.aborted = false;//non-standard
|
jtulach@678
|
23121 |
};
|
jtulach@678
|
23122 |
|
jtulach@678
|
23123 |
// defined by the standard: http://www.w3.org/TR/XMLHttpRequest/#xmlhttprequest
|
jtulach@678
|
23124 |
// but not provided by Firefox. Safari and others do define it.
|
jtulach@678
|
23125 |
XMLHttpRequest.UNSENT = 0;
|
jtulach@678
|
23126 |
XMLHttpRequest.OPEN = 1;
|
jtulach@678
|
23127 |
XMLHttpRequest.HEADERS_RECEIVED = 2;
|
jtulach@678
|
23128 |
XMLHttpRequest.LOADING = 3;
|
jtulach@678
|
23129 |
XMLHttpRequest.DONE = 4;
|
jtulach@678
|
23130 |
|
jtulach@678
|
23131 |
XMLHttpRequest.prototype = {
|
jtulach@678
|
23132 |
open: function(method, url, async, user, password){
|
jtulach@678
|
23133 |
//console.log('openning xhr %s %s %s', method, url, async);
|
jtulach@678
|
23134 |
this.readyState = 1;
|
jtulach@678
|
23135 |
this.async = (async === false)?false:true;
|
jtulach@678
|
23136 |
this.method = method || "GET";
|
jtulach@678
|
23137 |
this.url = Envjs.uri(url);
|
jtulach@678
|
23138 |
this.onreadystatechange();
|
jtulach@678
|
23139 |
},
|
jtulach@678
|
23140 |
setRequestHeader: function(header, value){
|
jtulach@678
|
23141 |
this.headers[header] = value;
|
jtulach@678
|
23142 |
},
|
jtulach@678
|
23143 |
send: function(data, parsedoc/*non-standard*/){
|
jtulach@678
|
23144 |
var _this = this;
|
jtulach@678
|
23145 |
parsedoc = (parsedoc === undefined)?true:!!parsedoc;
|
jtulach@678
|
23146 |
function makeRequest(){
|
jtulach@678
|
23147 |
var cookie = Envjs.getCookies(_this.url);
|
jtulach@678
|
23148 |
if(cookie){
|
jtulach@678
|
23149 |
_this.setRequestHeader('COOKIE', cookie);
|
jtulach@678
|
23150 |
}
|
jtulach@678
|
23151 |
Envjs.connection(_this, function(){
|
jtulach@678
|
23152 |
if (!_this.aborted){
|
jtulach@678
|
23153 |
var doc = null,
|
jtulach@678
|
23154 |
domparser,
|
jtulach@678
|
23155 |
cookie;
|
jtulach@678
|
23156 |
// try to parse the document if we havent explicitly set a
|
jtulach@678
|
23157 |
// flag saying not to and if we can assure the text at least
|
jtulach@678
|
23158 |
// starts with valid xml
|
jtulach@678
|
23159 |
if ( parsedoc && _this.responseText.match(/^\s*</) ) {
|
jtulach@678
|
23160 |
domparser = domparser||new DOMParser();
|
jtulach@678
|
23161 |
try {
|
jtulach@678
|
23162 |
//console.log("parsing response text into xml document");
|
jtulach@678
|
23163 |
doc = domparser.parseFromString(_this.responseText+"", 'text/xml');
|
jtulach@678
|
23164 |
} catch(e) {
|
jtulach@678
|
23165 |
//Envjs.error('response XML does not appear to be well formed xml', e);
|
jtulach@678
|
23166 |
console.warn('parseerror \n%s', e);
|
jtulach@678
|
23167 |
doc = document.implementation.createDocument('','error',null);
|
jtulach@678
|
23168 |
doc.appendChild(doc.createTextNode(e+''));
|
jtulach@678
|
23169 |
}
|
jtulach@678
|
23170 |
}else{
|
jtulach@678
|
23171 |
//Envjs.warn('response XML does not appear to be xml');
|
jtulach@678
|
23172 |
}
|
jtulach@678
|
23173 |
|
jtulach@678
|
23174 |
try{
|
jtulach@678
|
23175 |
cookie = _this.getResponseHeader('SET-COOKIE');
|
jtulach@678
|
23176 |
if(cookie){
|
jtulach@678
|
23177 |
Envjs.setCookie(_this.url, cookie);
|
jtulach@678
|
23178 |
}
|
jtulach@678
|
23179 |
}catch(e){
|
jtulach@678
|
23180 |
console.warn("Failed to set cookie");
|
jtulach@678
|
23181 |
}
|
jtulach@678
|
23182 |
_this.__defineGetter__("responseXML", function(){
|
jtulach@678
|
23183 |
return doc;
|
jtulach@678
|
23184 |
});
|
jtulach@678
|
23185 |
}
|
jtulach@678
|
23186 |
}, data);
|
jtulach@678
|
23187 |
|
jtulach@678
|
23188 |
if (!_this.aborted){
|
jtulach@678
|
23189 |
_this.onreadystatechange();
|
jtulach@678
|
23190 |
}
|
jtulach@678
|
23191 |
}
|
jtulach@678
|
23192 |
|
jtulach@678
|
23193 |
if (this.async){
|
jtulach@678
|
23194 |
//TODO: what we really need to do here is rejoin the
|
jtulach@678
|
23195 |
// current thread and call onreadystatechange via
|
jtulach@678
|
23196 |
// setTimeout so the callback is essentially applied
|
jtulach@678
|
23197 |
// at the end of the current callstack
|
jtulach@678
|
23198 |
//console.log('requesting async: %s', this.url);
|
jtulach@678
|
23199 |
Envjs.runAsync(makeRequest);
|
jtulach@678
|
23200 |
}else{
|
jtulach@678
|
23201 |
//console.log('requesting sync: %s', this.url);
|
jtulach@678
|
23202 |
makeRequest();
|
jtulach@678
|
23203 |
}
|
jtulach@678
|
23204 |
},
|
jtulach@678
|
23205 |
abort: function(){
|
jtulach@678
|
23206 |
this.aborted = true;
|
jtulach@678
|
23207 |
},
|
jtulach@678
|
23208 |
onreadystatechange: function(){
|
jtulach@678
|
23209 |
//Instance specific
|
jtulach@678
|
23210 |
},
|
jtulach@678
|
23211 |
getResponseHeader: function(header){
|
jtulach@678
|
23212 |
//$debug('GETTING RESPONSE HEADER '+header);
|
jtulach@678
|
23213 |
var rHeader, returnedHeaders;
|
jtulach@678
|
23214 |
if (this.readyState < 3){
|
jtulach@678
|
23215 |
throw new Error("INVALID_STATE_ERR");
|
jtulach@678
|
23216 |
} else {
|
jtulach@678
|
23217 |
returnedHeaders = [];
|
jtulach@678
|
23218 |
for (rHeader in this.responseHeaders) {
|
jtulach@678
|
23219 |
if (rHeader.match(new RegExp(header, "i"))) {
|
jtulach@678
|
23220 |
returnedHeaders.push(this.responseHeaders[rHeader]);
|
jtulach@678
|
23221 |
}
|
jtulach@678
|
23222 |
}
|
jtulach@678
|
23223 |
|
jtulach@678
|
23224 |
if (returnedHeaders.length){
|
jtulach@678
|
23225 |
//$debug('GOT RESPONSE HEADER '+returnedHeaders.join(", "));
|
jtulach@678
|
23226 |
return returnedHeaders.join(", ");
|
jtulach@678
|
23227 |
}
|
jtulach@678
|
23228 |
}
|
jtulach@678
|
23229 |
return null;
|
jtulach@678
|
23230 |
},
|
jtulach@678
|
23231 |
getAllResponseHeaders: function(){
|
jtulach@678
|
23232 |
var header, returnedHeaders = [];
|
jtulach@678
|
23233 |
if (this.readyState < 3){
|
jtulach@678
|
23234 |
throw new Error("INVALID_STATE_ERR");
|
jtulach@678
|
23235 |
} else {
|
jtulach@678
|
23236 |
for (header in this.responseHeaders) {
|
jtulach@678
|
23237 |
returnedHeaders.push( header + ": " + this.responseHeaders[header] );
|
jtulach@678
|
23238 |
}
|
jtulach@678
|
23239 |
}
|
jtulach@678
|
23240 |
return returnedHeaders.join("\r\n");
|
jtulach@678
|
23241 |
},
|
jtulach@678
|
23242 |
async: true,
|
jtulach@678
|
23243 |
readyState: 0,
|
jtulach@678
|
23244 |
responseText: "",
|
jtulach@678
|
23245 |
status: 0,
|
jtulach@678
|
23246 |
statusText: ""
|
jtulach@678
|
23247 |
};
|
jtulach@678
|
23248 |
|
jtulach@678
|
23249 |
/**
|
jtulach@678
|
23250 |
* @author john resig & the envjs team
|
jtulach@678
|
23251 |
* @uri http://www.envjs.com/
|
jtulach@678
|
23252 |
* @copyright 2008-2010
|
jtulach@678
|
23253 |
* @license MIT
|
jtulach@678
|
23254 |
*/
|
jtulach@678
|
23255 |
//CLOSURE_END
|
jtulach@678
|
23256 |
}());
|
jtulach@678
|
23257 |
|
jtulach@678
|
23258 |
/**
|
jtulach@678
|
23259 |
* @todo: document
|
jtulach@678
|
23260 |
*/
|
jtulach@678
|
23261 |
var Window,
|
jtulach@678
|
23262 |
Screen,
|
jtulach@678
|
23263 |
History,
|
jtulach@678
|
23264 |
Navigator;
|
jtulach@678
|
23265 |
|
jtulach@678
|
23266 |
|
jtulach@678
|
23267 |
/*
|
jtulach@678
|
23268 |
* Envjs window.1.2.13
|
jtulach@678
|
23269 |
* Pure JavaScript Browser Environment
|
jtulach@678
|
23270 |
* By John Resig <http://ejohn.org/> and the Envjs Team
|
jtulach@678
|
23271 |
* Copyright 2008-2010 John Resig, under the MIT License
|
jtulach@678
|
23272 |
*/
|
jtulach@678
|
23273 |
|
jtulach@678
|
23274 |
//CLOSURE_START
|
jtulach@678
|
23275 |
(function(){
|
jtulach@678
|
23276 |
|
jtulach@678
|
23277 |
|
jtulach@678
|
23278 |
|
jtulach@678
|
23279 |
|
jtulach@678
|
23280 |
|
jtulach@678
|
23281 |
/**
|
jtulach@678
|
23282 |
* @author john resig
|
jtulach@678
|
23283 |
*/
|
jtulach@678
|
23284 |
// Helper method for extending one object with another.
|
jtulach@678
|
23285 |
function __extend__(a,b) {
|
jtulach@678
|
23286 |
for ( var i in b ) {
|
jtulach@678
|
23287 |
var g = b.__lookupGetter__(i), s = b.__lookupSetter__(i);
|
jtulach@678
|
23288 |
if ( g || s ) {
|
jtulach@678
|
23289 |
if ( g ) { a.__defineGetter__(i, g); }
|
jtulach@678
|
23290 |
if ( s ) { a.__defineSetter__(i, s); }
|
jtulach@678
|
23291 |
} else {
|
jtulach@678
|
23292 |
a[i] = b[i];
|
jtulach@678
|
23293 |
}
|
jtulach@678
|
23294 |
} return a;
|
jtulach@678
|
23295 |
}
|
jtulach@678
|
23296 |
|
jtulach@678
|
23297 |
/**
|
jtulach@678
|
23298 |
* @todo: document
|
jtulach@678
|
23299 |
*/
|
jtulach@678
|
23300 |
|
jtulach@678
|
23301 |
__extend__(HTMLFrameElement.prototype,{
|
jtulach@678
|
23302 |
|
jtulach@678
|
23303 |
get contentDocument(){
|
jtulach@678
|
23304 |
return this.contentWindow?
|
jtulach@678
|
23305 |
this.contentWindow.document:
|
jtulach@678
|
23306 |
null;
|
jtulach@678
|
23307 |
},
|
jtulach@678
|
23308 |
set src(value){
|
jtulach@678
|
23309 |
var event;
|
jtulach@678
|
23310 |
this.setAttribute('src', value);
|
jtulach@678
|
23311 |
if (this.parentNode && value && value.length > 0){
|
jtulach@678
|
23312 |
//console.log('loading frame %s', value);
|
jtulach@678
|
23313 |
Envjs.loadFrame(this, Envjs.uri(value));
|
jtulach@678
|
23314 |
|
jtulach@678
|
23315 |
//console.log('event frame load %s', value);
|
jtulach@678
|
23316 |
event = this.ownerDocument.createEvent('HTMLEvents');
|
jtulach@678
|
23317 |
event.initEvent("load", false, false);
|
jtulach@678
|
23318 |
this.dispatchEvent( event, false );
|
jtulach@678
|
23319 |
}
|
jtulach@678
|
23320 |
}
|
jtulach@678
|
23321 |
|
jtulach@678
|
23322 |
});
|
jtulach@678
|
23323 |
|
jtulach@678
|
23324 |
/*
|
jtulach@678
|
23325 |
* history.js
|
jtulach@678
|
23326 |
*
|
jtulach@678
|
23327 |
*/
|
jtulach@678
|
23328 |
|
jtulach@678
|
23329 |
History = function(owner) {
|
jtulach@678
|
23330 |
var $current = 0,
|
jtulach@678
|
23331 |
$history = [null],
|
jtulach@678
|
23332 |
$owner = owner;
|
jtulach@678
|
23333 |
|
jtulach@678
|
23334 |
return {
|
jtulach@678
|
23335 |
go : function(target) {
|
jtulach@678
|
23336 |
if (typeof target === "number") {
|
jtulach@678
|
23337 |
target = $current + target;
|
jtulach@678
|
23338 |
if (target > -1 && target < $history.length){
|
jtulach@678
|
23339 |
if ($history[target].type === "hash") {
|
jtulach@678
|
23340 |
if ($owner.location) {
|
jtulach@678
|
23341 |
$owner.location.hash = $history[target].value;
|
jtulach@678
|
23342 |
}
|
jtulach@678
|
23343 |
} else {
|
jtulach@678
|
23344 |
if ($owner.location) {
|
jtulach@678
|
23345 |
$owner.location = $history[target].value;
|
jtulach@678
|
23346 |
}
|
jtulach@678
|
23347 |
}
|
jtulach@678
|
23348 |
$current = target;
|
jtulach@678
|
23349 |
}
|
jtulach@678
|
23350 |
} else {
|
jtulach@678
|
23351 |
//TODO: walk through the history and find the 'best match'?
|
jtulach@678
|
23352 |
}
|
jtulach@678
|
23353 |
},
|
jtulach@678
|
23354 |
|
jtulach@678
|
23355 |
get length() {
|
jtulach@678
|
23356 |
return $history.length;
|
jtulach@678
|
23357 |
},
|
jtulach@678
|
23358 |
|
jtulach@678
|
23359 |
back : function(count) {
|
jtulach@678
|
23360 |
if (count) {
|
jtulach@678
|
23361 |
this.go(-count);
|
jtulach@678
|
23362 |
} else {
|
jtulach@678
|
23363 |
this.go(-1);
|
jtulach@678
|
23364 |
}
|
jtulach@678
|
23365 |
},
|
jtulach@678
|
23366 |
|
jtulach@678
|
23367 |
get current() {
|
jtulach@678
|
23368 |
return this.item($current);
|
jtulach@678
|
23369 |
},
|
jtulach@678
|
23370 |
|
jtulach@678
|
23371 |
get previous() {
|
jtulach@678
|
23372 |
return this.item($current-1);
|
jtulach@678
|
23373 |
},
|
jtulach@678
|
23374 |
|
jtulach@678
|
23375 |
forward : function(count) {
|
jtulach@678
|
23376 |
if (count) {
|
jtulach@678
|
23377 |
this.go(count);
|
jtulach@678
|
23378 |
} else {
|
jtulach@678
|
23379 |
this.go(1);
|
jtulach@678
|
23380 |
}
|
jtulach@678
|
23381 |
},
|
jtulach@678
|
23382 |
|
jtulach@678
|
23383 |
item: function(idx) {
|
jtulach@678
|
23384 |
if (idx >= 0 && idx < $history.length) {
|
jtulach@678
|
23385 |
return $history[idx];
|
jtulach@678
|
23386 |
} else {
|
jtulach@678
|
23387 |
return null;
|
jtulach@678
|
23388 |
}
|
jtulach@678
|
23389 |
},
|
jtulach@678
|
23390 |
|
jtulach@678
|
23391 |
add: function(newLocation, type) {
|
jtulach@678
|
23392 |
//not a standard interface, we expose it to simplify
|
jtulach@678
|
23393 |
//history state modifications
|
jtulach@678
|
23394 |
if (newLocation !== $history[$current]) {
|
jtulach@678
|
23395 |
$history.slice(0, $current);
|
jtulach@678
|
23396 |
$history.push({
|
jtulach@678
|
23397 |
type: type || 'href',
|
jtulach@678
|
23398 |
value: newLocation
|
jtulach@678
|
23399 |
});
|
jtulach@678
|
23400 |
}
|
jtulach@678
|
23401 |
}
|
jtulach@678
|
23402 |
}; /* closes 'return {' */
|
jtulach@678
|
23403 |
};
|
jtulach@678
|
23404 |
|
jtulach@678
|
23405 |
|
jtulach@678
|
23406 |
/*
|
jtulach@678
|
23407 |
* navigator.js
|
jtulach@678
|
23408 |
* Browser Navigator
|
jtulach@678
|
23409 |
*/
|
jtulach@678
|
23410 |
Navigator = function(){
|
jtulach@678
|
23411 |
|
jtulach@678
|
23412 |
return {
|
jtulach@678
|
23413 |
get appCodeName(){
|
jtulach@678
|
23414 |
return Envjs.appCodeName;
|
jtulach@678
|
23415 |
},
|
jtulach@678
|
23416 |
get appName(){
|
jtulach@678
|
23417 |
return Envjs.appName;
|
jtulach@678
|
23418 |
},
|
jtulach@678
|
23419 |
get appVersion(){
|
jtulach@678
|
23420 |
return Envjs.version +" ("+
|
jtulach@678
|
23421 |
this.platform +"; "+
|
jtulach@678
|
23422 |
"U; "+//?
|
jtulach@678
|
23423 |
Envjs.os_name+" "+Envjs.os_arch+" "+Envjs.os_version+"; "+
|
jtulach@678
|
23424 |
(Envjs.lang?Envjs.lang:"en-US")+"; "+
|
jtulach@678
|
23425 |
"rv:"+Envjs.revision+
|
jtulach@678
|
23426 |
")";
|
jtulach@678
|
23427 |
},
|
jtulach@678
|
23428 |
get cookieEnabled(){
|
jtulach@678
|
23429 |
return true;
|
jtulach@678
|
23430 |
},
|
jtulach@678
|
23431 |
get mimeTypes(){
|
jtulach@678
|
23432 |
return [];
|
jtulach@678
|
23433 |
},
|
jtulach@678
|
23434 |
get platform(){
|
jtulach@678
|
23435 |
return Envjs.platform;
|
jtulach@678
|
23436 |
},
|
jtulach@678
|
23437 |
get plugins(){
|
jtulach@678
|
23438 |
return [];
|
jtulach@678
|
23439 |
},
|
jtulach@678
|
23440 |
get userAgent(){
|
jtulach@678
|
23441 |
return this.appCodeName + "/" + this.appVersion + " " + this.appName;
|
jtulach@678
|
23442 |
},
|
jtulach@678
|
23443 |
javaEnabled : function(){
|
jtulach@678
|
23444 |
return Envjs.javaEnabled;
|
jtulach@678
|
23445 |
}
|
jtulach@678
|
23446 |
};
|
jtulach@678
|
23447 |
};
|
jtulach@678
|
23448 |
|
jtulach@678
|
23449 |
|
jtulach@678
|
23450 |
/**
|
jtulach@678
|
23451 |
* Screen
|
jtulach@678
|
23452 |
* @param {Object} __window__
|
jtulach@678
|
23453 |
*/
|
jtulach@678
|
23454 |
|
jtulach@678
|
23455 |
Screen = function(__window__){
|
jtulach@678
|
23456 |
|
jtulach@678
|
23457 |
var $availHeight = 600,
|
jtulach@678
|
23458 |
$availWidth = 800,
|
jtulach@678
|
23459 |
$colorDepth = 16,
|
jtulach@678
|
23460 |
$pixelDepth = 24,
|
jtulach@678
|
23461 |
$height = 600,
|
jtulach@678
|
23462 |
$width = 800,
|
jtulach@678
|
23463 |
$top = 0,
|
jtulach@678
|
23464 |
$left = 0,
|
jtulach@678
|
23465 |
$availTop = 0,
|
jtulach@678
|
23466 |
$availLeft = 0;
|
jtulach@678
|
23467 |
|
jtulach@678
|
23468 |
__extend__( __window__, {
|
jtulach@678
|
23469 |
moveBy : function(dx,dy){
|
jtulach@678
|
23470 |
//TODO - modify $locals to reflect change
|
jtulach@678
|
23471 |
},
|
jtulach@678
|
23472 |
moveTo : function(x,y) {
|
jtulach@678
|
23473 |
//TODO - modify $locals to reflect change
|
jtulach@678
|
23474 |
},
|
jtulach@678
|
23475 |
/*print : function(){
|
jtulach@678
|
23476 |
//TODO - good global to modify to ensure print is not misused
|
jtulach@678
|
23477 |
};*/
|
jtulach@678
|
23478 |
resizeBy : function(dw, dh){
|
jtulach@678
|
23479 |
__window__resizeTo($width + dw, $height + dh);
|
jtulach@678
|
23480 |
},
|
jtulach@678
|
23481 |
resizeTo : function(width, height){
|
jtulach@678
|
23482 |
$width = (width <= $availWidth) ? width : $availWidth;
|
jtulach@678
|
23483 |
$height = (height <= $availHeight) ? height : $availHeight;
|
jtulach@678
|
23484 |
},
|
jtulach@678
|
23485 |
scroll : function(x,y){
|
jtulach@678
|
23486 |
//TODO - modify $locals to reflect change
|
jtulach@678
|
23487 |
},
|
jtulach@678
|
23488 |
scrollBy : function(dx, dy){
|
jtulach@678
|
23489 |
//TODO - modify $locals to reflect change
|
jtulach@678
|
23490 |
},
|
jtulach@678
|
23491 |
scrollTo : function(x,y){
|
jtulach@678
|
23492 |
//TODO - modify $locals to reflect change
|
jtulach@678
|
23493 |
}
|
jtulach@678
|
23494 |
});
|
jtulach@678
|
23495 |
|
jtulach@678
|
23496 |
return {
|
jtulach@678
|
23497 |
get top(){
|
jtulach@678
|
23498 |
return $top;
|
jtulach@678
|
23499 |
},
|
jtulach@678
|
23500 |
get left(){
|
jtulach@678
|
23501 |
return $left;
|
jtulach@678
|
23502 |
},
|
jtulach@678
|
23503 |
get availTop(){
|
jtulach@678
|
23504 |
return $availTop;
|
jtulach@678
|
23505 |
},
|
jtulach@678
|
23506 |
get availLeft(){
|
jtulach@678
|
23507 |
return $availLeft;
|
jtulach@678
|
23508 |
},
|
jtulach@678
|
23509 |
get availHeight(){
|
jtulach@678
|
23510 |
return $availHeight;
|
jtulach@678
|
23511 |
},
|
jtulach@678
|
23512 |
get availWidth(){
|
jtulach@678
|
23513 |
return $availWidth;
|
jtulach@678
|
23514 |
},
|
jtulach@678
|
23515 |
get colorDepth(){
|
jtulach@678
|
23516 |
return $colorDepth;
|
jtulach@678
|
23517 |
},
|
jtulach@678
|
23518 |
get pixelDepth(){
|
jtulach@678
|
23519 |
return $pixelDepth;
|
jtulach@678
|
23520 |
},
|
jtulach@678
|
23521 |
get height(){
|
jtulach@678
|
23522 |
return $height;
|
jtulach@678
|
23523 |
},
|
jtulach@678
|
23524 |
get width(){
|
jtulach@678
|
23525 |
return $width;
|
jtulach@678
|
23526 |
}
|
jtulach@678
|
23527 |
};
|
jtulach@678
|
23528 |
};
|
jtulach@678
|
23529 |
|
jtulach@678
|
23530 |
/*
|
jtulach@678
|
23531 |
* Copyright (c) 2010 Nick Galbreath
|
jtulach@678
|
23532 |
* http://code.google.com/p/stringencoders/source/browse/#svn/trunk/javascript
|
jtulach@678
|
23533 |
*
|
jtulach@678
|
23534 |
* Permission is hereby granted, free of charge, to any person
|
jtulach@678
|
23535 |
* obtaining a copy of this software and associated documentation
|
jtulach@678
|
23536 |
* files (the "Software"), to deal in the Software without
|
jtulach@678
|
23537 |
* restriction, including without limitation the rights to use,
|
jtulach@678
|
23538 |
* copy, modify, merge, publish, distribute, sublicense, and/or sell
|
jtulach@678
|
23539 |
* copies of the Software, and to permit persons to whom the
|
jtulach@678
|
23540 |
* Software is furnished to do so, subject to the following
|
jtulach@678
|
23541 |
* conditions:
|
jtulach@678
|
23542 |
*
|
jtulach@678
|
23543 |
* The above copyright notice and this permission notice shall be
|
jtulach@678
|
23544 |
* included in all copies or substantial portions of the Software.
|
jtulach@678
|
23545 |
*
|
jtulach@678
|
23546 |
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
jtulach@678
|
23547 |
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
|
jtulach@678
|
23548 |
* OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
jtulach@678
|
23549 |
* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
|
jtulach@678
|
23550 |
* HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
jtulach@678
|
23551 |
* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
jtulach@678
|
23552 |
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
jtulach@678
|
23553 |
* OTHER DEALINGS IN THE SOFTWARE.
|
jtulach@678
|
23554 |
*/
|
jtulach@678
|
23555 |
|
jtulach@678
|
23556 |
/* base64 encode/decode compatible with window.btoa/atob
|
jtulach@678
|
23557 |
*
|
jtulach@678
|
23558 |
* window.atob/btoa is a Firefox extension to convert binary data (the "b")
|
jtulach@678
|
23559 |
* to base64 (ascii, the "a").
|
jtulach@678
|
23560 |
*
|
jtulach@678
|
23561 |
* It is also found in Safari and Chrome. It is not available in IE.
|
jtulach@678
|
23562 |
*
|
jtulach@678
|
23563 |
* if (!window.btoa) window.btoa = base64.encode
|
jtulach@678
|
23564 |
* if (!window.atob) window.atob = base64.decode
|
jtulach@678
|
23565 |
*
|
jtulach@678
|
23566 |
* The original spec's for atob/btoa are a bit lacking
|
jtulach@678
|
23567 |
* https://developer.mozilla.org/en/DOM/window.atob
|
jtulach@678
|
23568 |
* https://developer.mozilla.org/en/DOM/window.btoa
|
jtulach@678
|
23569 |
*
|
jtulach@678
|
23570 |
* window.btoa and base64.encode takes a string where charCodeAt is [0,255]
|
jtulach@678
|
23571 |
* If any character is not [0,255], then an DOMException(5) is thrown.
|
jtulach@678
|
23572 |
*
|
jtulach@678
|
23573 |
* window.atob and base64.decode take a base64-encoded string
|
jtulach@678
|
23574 |
* If the input length is not a multiple of 4, or contains invalid characters
|
jtulach@678
|
23575 |
* then an DOMException(5) is thrown.
|
jtulach@678
|
23576 |
*/
|
jtulach@678
|
23577 |
var base64 = {};
|
jtulach@678
|
23578 |
base64.PADCHAR = '=';
|
jtulach@678
|
23579 |
base64.ALPHA = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';
|
jtulach@678
|
23580 |
|
jtulach@678
|
23581 |
base64.makeDOMException = function() {
|
jtulach@678
|
23582 |
// sadly in FF,Safari,Chrome you can't make a DOMException
|
jtulach@678
|
23583 |
var e, tmp;
|
jtulach@678
|
23584 |
|
jtulach@678
|
23585 |
try {
|
jtulach@678
|
23586 |
return new DOMException(DOMException.INVALID_CHARACTER_ERR);
|
jtulach@678
|
23587 |
} catch (tmp) {
|
jtulach@678
|
23588 |
// not available, just passback a duck-typed equiv
|
jtulach@678
|
23589 |
// https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Error
|
jtulach@678
|
23590 |
// https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Error/prototype
|
jtulach@678
|
23591 |
var ex = new Error("DOM Exception 5");
|
jtulach@678
|
23592 |
|
jtulach@678
|
23593 |
// ex.number and ex.description is IE-specific.
|
jtulach@678
|
23594 |
ex.code = ex.number = 5;
|
jtulach@678
|
23595 |
ex.name = ex.description = "INVALID_CHARACTER_ERR";
|
jtulach@678
|
23596 |
|
jtulach@678
|
23597 |
// Safari/Chrome output format
|
jtulach@678
|
23598 |
ex.toString = function() { return 'Error: ' + ex.name + ': ' + ex.message; };
|
jtulach@678
|
23599 |
return ex;
|
jtulach@678
|
23600 |
}
|
jtulach@678
|
23601 |
};
|
jtulach@678
|
23602 |
|
jtulach@678
|
23603 |
base64.getbyte64 = function(s,i) {
|
jtulach@678
|
23604 |
// This is oddly fast, except on Chrome/V8.
|
jtulach@678
|
23605 |
// Minimal or no improvement in performance by using a
|
jtulach@678
|
23606 |
// object with properties mapping chars to value (eg. 'A': 0)
|
jtulach@678
|
23607 |
var idx = base64.ALPHA.indexOf(s.charAt(i));
|
jtulach@678
|
23608 |
if (idx === -1) {
|
jtulach@678
|
23609 |
throw base64.makeDOMException();
|
jtulach@678
|
23610 |
}
|
jtulach@678
|
23611 |
return idx;
|
jtulach@678
|
23612 |
};
|
jtulach@678
|
23613 |
|
jtulach@678
|
23614 |
base64.decode = function(s) {
|
jtulach@678
|
23615 |
// convert to string
|
jtulach@678
|
23616 |
s = '' + s;
|
jtulach@678
|
23617 |
var getbyte64 = base64.getbyte64;
|
jtulach@678
|
23618 |
var pads, i, b10;
|
jtulach@678
|
23619 |
var imax = s.length;
|
jtulach@678
|
23620 |
if (imax === 0) {
|
jtulach@678
|
23621 |
return s;
|
jtulach@678
|
23622 |
}
|
jtulach@678
|
23623 |
|
jtulach@678
|
23624 |
if (imax % 4 !== 0) {
|
jtulach@678
|
23625 |
throw base64.makeDOMException();
|
jtulach@678
|
23626 |
}
|
jtulach@678
|
23627 |
|
jtulach@678
|
23628 |
pads = 0;
|
jtulach@678
|
23629 |
if (s.charAt(imax - 1) === base64.PADCHAR) {
|
jtulach@678
|
23630 |
pads = 1;
|
jtulach@678
|
23631 |
if (s.charAt(imax - 2) === base64.PADCHAR) {
|
jtulach@678
|
23632 |
pads = 2;
|
jtulach@678
|
23633 |
}
|
jtulach@678
|
23634 |
// either way, we want to ignore this last block
|
jtulach@678
|
23635 |
imax -= 4;
|
jtulach@678
|
23636 |
}
|
jtulach@678
|
23637 |
|
jtulach@678
|
23638 |
var x = [];
|
jtulach@678
|
23639 |
for (i = 0; i < imax; i += 4) {
|
jtulach@678
|
23640 |
b10 = (getbyte64(s,i) << 18) | (getbyte64(s,i+1) << 12) |
|
jtulach@678
|
23641 |
(getbyte64(s,i+2) << 6) | getbyte64(s,i+3);
|
jtulach@678
|
23642 |
x.push(String.fromCharCode(b10 >> 16, (b10 >> 8) & 0xff, b10 & 0xff));
|
jtulach@678
|
23643 |
}
|
jtulach@678
|
23644 |
|
jtulach@678
|
23645 |
switch (pads) {
|
jtulach@678
|
23646 |
case 1:
|
jtulach@678
|
23647 |
b10 = (getbyte64(s,i) << 18) | (getbyte64(s,i+1) << 12) | (getbyte64(s,i+2) << 6);
|
jtulach@678
|
23648 |
x.push(String.fromCharCode(b10 >> 16, (b10 >> 8) & 0xff));
|
jtulach@678
|
23649 |
break;
|
jtulach@678
|
23650 |
case 2:
|
jtulach@678
|
23651 |
b10 = (getbyte64(s,i) << 18) | (getbyte64(s,i+1) << 12);
|
jtulach@678
|
23652 |
x.push(String.fromCharCode(b10 >> 16));
|
jtulach@678
|
23653 |
break;
|
jtulach@678
|
23654 |
}
|
jtulach@678
|
23655 |
return x.join('');
|
jtulach@678
|
23656 |
};
|
jtulach@678
|
23657 |
|
jtulach@678
|
23658 |
base64.getbyte = function(s,i) {
|
jtulach@678
|
23659 |
var x = s.charCodeAt(i);
|
jtulach@678
|
23660 |
if (x > 255) {
|
jtulach@678
|
23661 |
throw base64.makeDOMException();
|
jtulach@678
|
23662 |
}
|
jtulach@678
|
23663 |
return x;
|
jtulach@678
|
23664 |
};
|
jtulach@678
|
23665 |
|
jtulach@678
|
23666 |
base64.encode = function(s) {
|
jtulach@678
|
23667 |
if (arguments.length !== 1) {
|
jtulach@678
|
23668 |
throw new SyntaxError("Not enough arguments");
|
jtulach@678
|
23669 |
}
|
jtulach@678
|
23670 |
var padchar = base64.PADCHAR;
|
jtulach@678
|
23671 |
var alpha = base64.ALPHA;
|
jtulach@678
|
23672 |
var getbyte = base64.getbyte;
|
jtulach@678
|
23673 |
|
jtulach@678
|
23674 |
var i, b10;
|
jtulach@678
|
23675 |
var x = [];
|
jtulach@678
|
23676 |
|
jtulach@678
|
23677 |
// convert to string
|
jtulach@678
|
23678 |
s = '' + s;
|
jtulach@678
|
23679 |
|
jtulach@678
|
23680 |
var imax = s.length - s.length % 3;
|
jtulach@678
|
23681 |
|
jtulach@678
|
23682 |
if (s.length === 0) {
|
jtulach@678
|
23683 |
return s;
|
jtulach@678
|
23684 |
}
|
jtulach@678
|
23685 |
for (i = 0; i < imax; i += 3) {
|
jtulach@678
|
23686 |
b10 = (getbyte(s,i) << 16) | (getbyte(s,i+1) << 8) | getbyte(s,i+2);
|
jtulach@678
|
23687 |
x.push(alpha.charAt(b10 >> 18));
|
jtulach@678
|
23688 |
x.push(alpha.charAt((b10 >> 12) & 0x3F));
|
jtulach@678
|
23689 |
x.push(alpha.charAt((b10 >> 6) & 0x3f));
|
jtulach@678
|
23690 |
x.push(alpha.charAt(b10 & 0x3f));
|
jtulach@678
|
23691 |
}
|
jtulach@678
|
23692 |
switch (s.length - imax) {
|
jtulach@678
|
23693 |
case 1:
|
jtulach@678
|
23694 |
b10 = getbyte(s,i) << 16;
|
jtulach@678
|
23695 |
x.push(alpha.charAt(b10 >> 18) + alpha.charAt((b10 >> 12) & 0x3F) +
|
jtulach@678
|
23696 |
padchar + padchar);
|
jtulach@678
|
23697 |
break;
|
jtulach@678
|
23698 |
case 2:
|
jtulach@678
|
23699 |
b10 = (getbyte(s,i) << 16) | (getbyte(s,i+1) << 8);
|
jtulach@678
|
23700 |
x.push(alpha.charAt(b10 >> 18) + alpha.charAt((b10 >> 12) & 0x3F) +
|
jtulach@678
|
23701 |
alpha.charAt((b10 >> 6) & 0x3f) + padchar);
|
jtulach@678
|
23702 |
break;
|
jtulach@678
|
23703 |
}
|
jtulach@678
|
23704 |
return x.join('');
|
jtulach@678
|
23705 |
};
|
jtulach@678
|
23706 |
//These descriptions of window properties are taken loosely David Flanagan's
|
jtulach@678
|
23707 |
//'JavaScript - The Definitive Guide' (O'Reilly)
|
jtulach@678
|
23708 |
|
jtulach@678
|
23709 |
var __windows__ = {};
|
jtulach@678
|
23710 |
|
jtulach@678
|
23711 |
var __top__ = function(_scope){
|
jtulach@678
|
23712 |
var _parent = _scope.parent;
|
jtulach@678
|
23713 |
while (_scope && _parent && _scope !== _parent) {
|
jtulach@678
|
23714 |
if (_parent === _parent.parent) {
|
jtulach@678
|
23715 |
break;
|
jtulach@678
|
23716 |
}
|
jtulach@678
|
23717 |
_parent = _parent.parent;
|
jtulach@678
|
23718 |
//console.log('scope %s _parent %s', scope, _parent);
|
jtulach@678
|
23719 |
}
|
jtulach@678
|
23720 |
return _parent || null;
|
jtulach@678
|
23721 |
};
|
jtulach@678
|
23722 |
|
jtulach@678
|
23723 |
/**
|
jtulach@678
|
23724 |
* Window
|
jtulach@678
|
23725 |
* @param {Object} scope
|
jtulach@678
|
23726 |
* @param {Object} parent
|
jtulach@678
|
23727 |
* @param {Object} opener
|
jtulach@678
|
23728 |
*/
|
jtulach@678
|
23729 |
Window = function(scope, parent, opener){
|
jtulach@678
|
23730 |
|
jtulach@678
|
23731 |
// the window property is identical to the self property and to this obj
|
jtulach@678
|
23732 |
//var proxy = new Envjs.proxy(scope, parent);
|
jtulach@678
|
23733 |
//scope.__proxy__ = proxy;
|
jtulach@678
|
23734 |
scope.__defineGetter__('window', function(){
|
jtulach@678
|
23735 |
return scope;
|
jtulach@678
|
23736 |
});
|
jtulach@678
|
23737 |
|
jtulach@678
|
23738 |
var $uuid = new Date().getTime()+'-'+Math.floor(Math.random()*1000000000000000);
|
jtulach@678
|
23739 |
__windows__[$uuid] = scope;
|
jtulach@678
|
23740 |
//console.log('opening window %s', $uuid);
|
jtulach@678
|
23741 |
|
jtulach@678
|
23742 |
// every window has one-and-only-one .document property which is always
|
jtulach@678
|
23743 |
// an [object HTMLDocument]. also, only window.document objects are
|
jtulach@678
|
23744 |
// html documents, all other documents created by the window.document are
|
jtulach@678
|
23745 |
// [object XMLDocument]
|
jtulach@678
|
23746 |
var $htmlImplementation = new DOMImplementation();
|
jtulach@678
|
23747 |
$htmlImplementation.namespaceAware = true;
|
jtulach@678
|
23748 |
$htmlImplementation.errorChecking = false;
|
jtulach@678
|
23749 |
|
jtulach@678
|
23750 |
// read only reference to the Document object
|
jtulach@678
|
23751 |
var $document = new HTMLDocument($htmlImplementation, scope);
|
jtulach@678
|
23752 |
|
jtulach@678
|
23753 |
// A read-only reference to the Window object that contains this window
|
jtulach@678
|
23754 |
// or frame. If the window is a top-level window, parent refers to
|
jtulach@678
|
23755 |
// the window itself. If this window is a frame, this property refers
|
jtulach@678
|
23756 |
// to the window or frame that contains it.
|
jtulach@678
|
23757 |
var $parent = parent;
|
jtulach@678
|
23758 |
|
jtulach@678
|
23759 |
/**> $cookies - see cookie.js <*/
|
jtulach@678
|
23760 |
// read only boolean specifies whether the window has been closed
|
jtulach@678
|
23761 |
var $closed = false;
|
jtulach@678
|
23762 |
|
jtulach@678
|
23763 |
// a read/write string that specifies the default message that
|
jtulach@678
|
23764 |
// appears in the status line
|
jtulach@678
|
23765 |
var $defaultStatus = "Done";
|
jtulach@678
|
23766 |
|
jtulach@678
|
23767 |
// IE only, refers to the most recent event object - this maybe be
|
jtulach@678
|
23768 |
// removed after review
|
jtulach@678
|
23769 |
var $event = null;
|
jtulach@678
|
23770 |
|
jtulach@678
|
23771 |
// a read-only reference to the History object
|
jtulach@678
|
23772 |
var $history = new History();
|
jtulach@678
|
23773 |
|
jtulach@678
|
23774 |
// a read-only reference to the Location object. the location object does
|
jtulach@678
|
23775 |
// expose read/write properties
|
jtulach@678
|
23776 |
var $location = new Location('about:blank', $document, $history);
|
jtulach@678
|
23777 |
|
jtulach@678
|
23778 |
// The name of window/frame. Set directly, when using open(), or in frameset.
|
jtulach@678
|
23779 |
// May be used when specifying the target attribute of links
|
jtulach@678
|
23780 |
var $name = null;
|
jtulach@678
|
23781 |
|
jtulach@678
|
23782 |
// a read-only reference to the Navigator object
|
jtulach@678
|
23783 |
var $navigator = new Navigator();
|
jtulach@678
|
23784 |
|
jtulach@678
|
23785 |
// a read/write reference to the Window object that contained the script
|
jtulach@678
|
23786 |
// that called open() to open this browser window. This property is valid
|
jtulach@678
|
23787 |
// only for top-level window objects.
|
jtulach@678
|
23788 |
var $opener = opener?opener:null;
|
jtulach@678
|
23789 |
|
jtulach@678
|
23790 |
// read-only properties that specify the height and width, in pixels
|
jtulach@678
|
23791 |
var $innerHeight = 600, $innerWidth = 800;
|
jtulach@678
|
23792 |
|
jtulach@678
|
23793 |
// Read-only properties that specify the total height and width, in pixels,
|
jtulach@678
|
23794 |
// of the browser window. These dimensions include the height and width of
|
jtulach@678
|
23795 |
// the menu bar, toolbars, scrollbars, window borders and so on. These
|
jtulach@678
|
23796 |
// properties are not supported by IE and IE offers no alternative
|
jtulach@678
|
23797 |
// properties;
|
jtulach@678
|
23798 |
var $outerHeight = $innerHeight,
|
jtulach@678
|
23799 |
$outerWidth = $innerWidth;
|
jtulach@678
|
23800 |
|
jtulach@678
|
23801 |
// Read-only properties that specify the number of pixels that the current
|
jtulach@678
|
23802 |
// document has been scrolled to the right and down. These are not
|
jtulach@678
|
23803 |
// supported by IE.
|
jtulach@678
|
23804 |
var $pageXOffset = 0, $pageYOffset = 0;
|
jtulach@678
|
23805 |
|
jtulach@678
|
23806 |
// a read-only reference to the Screen object that specifies information
|
jtulach@678
|
23807 |
// about the screen: the number of available pixels and the number of
|
jtulach@678
|
23808 |
// available colors.
|
jtulach@678
|
23809 |
var $screen = new Screen(scope);
|
jtulach@678
|
23810 |
|
jtulach@678
|
23811 |
// read only properties that specify the coordinates of the upper-left
|
jtulach@678
|
23812 |
// corner of the screen.
|
jtulach@678
|
23813 |
var $screenX = 1,
|
jtulach@678
|
23814 |
$screenY = 1;
|
jtulach@678
|
23815 |
var $screenLeft = $screenX,
|
jtulach@678
|
23816 |
$screenTop = $screenY;
|
jtulach@678
|
23817 |
|
jtulach@678
|
23818 |
// a read/write string that specifies the current status line.
|
jtulach@678
|
23819 |
var $status = '';
|
jtulach@678
|
23820 |
|
jtulach@678
|
23821 |
__extend__(scope, EventTarget.prototype);
|
jtulach@678
|
23822 |
|
jtulach@678
|
23823 |
return __extend__( scope, {
|
jtulach@678
|
23824 |
get closed(){
|
jtulach@678
|
23825 |
return $closed;
|
jtulach@678
|
23826 |
},
|
jtulach@678
|
23827 |
get defaultStatus(){
|
jtulach@678
|
23828 |
return $defaultStatus;
|
jtulach@678
|
23829 |
},
|
jtulach@678
|
23830 |
set defaultStatus(defaultStatus){
|
jtulach@678
|
23831 |
$defaultStatus = defaultStatus;
|
jtulach@678
|
23832 |
},
|
jtulach@678
|
23833 |
get document(){
|
jtulach@678
|
23834 |
return $document;
|
jtulach@678
|
23835 |
},
|
jtulach@678
|
23836 |
set document(doc){
|
jtulach@678
|
23837 |
$document = doc;
|
jtulach@678
|
23838 |
},
|
jtulach@678
|
23839 |
/*
|
jtulach@678
|
23840 |
deprecated ie specific property probably not good to support
|
jtulach@678
|
23841 |
get event(){
|
jtulach@678
|
23842 |
return $event;
|
jtulach@678
|
23843 |
},
|
jtulach@678
|
23844 |
*/
|
jtulach@678
|
23845 |
get frames(){
|
jtulach@678
|
23846 |
return new HTMLCollection($document.getElementsByTagName('frame'));
|
jtulach@678
|
23847 |
},
|
jtulach@678
|
23848 |
get length(){
|
jtulach@678
|
23849 |
// should be frames.length,
|
jtulach@678
|
23850 |
return this.frames.length;
|
jtulach@678
|
23851 |
},
|
jtulach@678
|
23852 |
get history(){
|
jtulach@678
|
23853 |
return $history;
|
jtulach@678
|
23854 |
},
|
jtulach@678
|
23855 |
get innerHeight(){
|
jtulach@678
|
23856 |
return $innerHeight;
|
jtulach@678
|
23857 |
},
|
jtulach@678
|
23858 |
get innerWidth(){
|
jtulach@678
|
23859 |
return $innerWidth;
|
jtulach@678
|
23860 |
},
|
jtulach@678
|
23861 |
get clientHeight(){
|
jtulach@678
|
23862 |
return $innerHeight;
|
jtulach@678
|
23863 |
},
|
jtulach@678
|
23864 |
get clientWidth(){
|
jtulach@678
|
23865 |
return $innerWidth;
|
jtulach@678
|
23866 |
},
|
jtulach@678
|
23867 |
get location(){
|
jtulach@678
|
23868 |
return $location;
|
jtulach@678
|
23869 |
},
|
jtulach@678
|
23870 |
set location(uri){
|
jtulach@678
|
23871 |
uri = Envjs.uri(uri);
|
jtulach@678
|
23872 |
//new Window(this, this.parent, this.opener);
|
jtulach@678
|
23873 |
if($location.href == uri){
|
jtulach@678
|
23874 |
$location.reload();
|
jtulach@678
|
23875 |
}else if($location.href == 'about:blank'){
|
jtulach@678
|
23876 |
$location.assign(uri);
|
jtulach@678
|
23877 |
}else{
|
jtulach@678
|
23878 |
$location.replace(uri);
|
jtulach@678
|
23879 |
}
|
jtulach@678
|
23880 |
},
|
jtulach@678
|
23881 |
get name(){
|
jtulach@678
|
23882 |
return $name;
|
jtulach@678
|
23883 |
},
|
jtulach@678
|
23884 |
set name(newName){
|
jtulach@678
|
23885 |
$name = newName;
|
jtulach@678
|
23886 |
},
|
jtulach@678
|
23887 |
get navigator(){
|
jtulach@678
|
23888 |
return $navigator;
|
jtulach@678
|
23889 |
},
|
jtulach@678
|
23890 |
get opener(){
|
jtulach@678
|
23891 |
return $opener;
|
jtulach@678
|
23892 |
},
|
jtulach@678
|
23893 |
get outerHeight(){
|
jtulach@678
|
23894 |
return $outerHeight;
|
jtulach@678
|
23895 |
},
|
jtulach@678
|
23896 |
get outerWidth(){
|
jtulach@678
|
23897 |
return $outerWidth;
|
jtulach@678
|
23898 |
},
|
jtulach@678
|
23899 |
get pageXOffest(){
|
jtulach@678
|
23900 |
return $pageXOffset;
|
jtulach@678
|
23901 |
},
|
jtulach@678
|
23902 |
get pageYOffset(){
|
jtulach@678
|
23903 |
return $pageYOffset;
|
jtulach@678
|
23904 |
},
|
jtulach@678
|
23905 |
get parent(){
|
jtulach@678
|
23906 |
return $parent;
|
jtulach@678
|
23907 |
},
|
jtulach@678
|
23908 |
get screen(){
|
jtulach@678
|
23909 |
return $screen;
|
jtulach@678
|
23910 |
},
|
jtulach@678
|
23911 |
get screenLeft(){
|
jtulach@678
|
23912 |
return $screenLeft;
|
jtulach@678
|
23913 |
},
|
jtulach@678
|
23914 |
get screenTop(){
|
jtulach@678
|
23915 |
return $screenTop;
|
jtulach@678
|
23916 |
},
|
jtulach@678
|
23917 |
get screenX(){
|
jtulach@678
|
23918 |
return $screenX;
|
jtulach@678
|
23919 |
},
|
jtulach@678
|
23920 |
get screenY(){
|
jtulach@678
|
23921 |
return $screenY;
|
jtulach@678
|
23922 |
},
|
jtulach@678
|
23923 |
get self(){
|
jtulach@678
|
23924 |
return scope;
|
jtulach@678
|
23925 |
},
|
jtulach@678
|
23926 |
get status(){
|
jtulach@678
|
23927 |
return $status;
|
jtulach@678
|
23928 |
},
|
jtulach@678
|
23929 |
set status(status){
|
jtulach@678
|
23930 |
$status = status;
|
jtulach@678
|
23931 |
},
|
jtulach@678
|
23932 |
// a read-only reference to the top-level window that contains this window.
|
jtulach@678
|
23933 |
// If this window is a top-level window it is simply a reference to itself.
|
jtulach@678
|
23934 |
// If this window is a frame, the top property refers to the top-level
|
jtulach@678
|
23935 |
// window that contains the frame.
|
jtulach@678
|
23936 |
get top(){
|
jtulach@678
|
23937 |
return __top__(scope);
|
jtulach@678
|
23938 |
},
|
jtulach@678
|
23939 |
get window(){
|
jtulach@678
|
23940 |
return this;
|
jtulach@678
|
23941 |
},
|
jtulach@678
|
23942 |
toString : function(){
|
jtulach@678
|
23943 |
return '[Window]';
|
jtulach@678
|
23944 |
},
|
jtulach@678
|
23945 |
|
jtulach@678
|
23946 |
/**
|
jtulach@678
|
23947 |
* getComputedStyle
|
jtulach@678
|
23948 |
*
|
jtulach@678
|
23949 |
* Firefox 3.6:
|
jtulach@678
|
23950 |
* - Requires both elements to be present else an
|
jtulach@678
|
23951 |
* exception is thrown.
|
jtulach@678
|
23952 |
* - Returns a 'ComputedCSSStyleDeclaration' object.
|
jtulach@678
|
23953 |
* while a raw element.style returns a 'CSSStyleDeclaration' object.
|
jtulach@678
|
23954 |
* - Bogus input also throws exception
|
jtulach@678
|
23955 |
*
|
jtulach@678
|
23956 |
* Safari 4:
|
jtulach@678
|
23957 |
* - Requires one argument (second can be MIA)
|
jtulach@678
|
23958 |
* - Returns a CSSStyleDeclaration object
|
jtulach@678
|
23959 |
* - if bad imput, returns null
|
jtulach@678
|
23960 |
*
|
jtulach@678
|
23961 |
* getComputedStyle should really be an "add on" from the css
|
jtulach@678
|
23962 |
* modules. Unfortunately, 'window' comes way after the 'css'
|
jtulach@678
|
23963 |
* so css can't add it.
|
jtulach@678
|
23964 |
*/
|
jtulach@678
|
23965 |
getComputedStyle: function(element, pseudoElement) {
|
jtulach@678
|
23966 |
return element.style;
|
jtulach@678
|
23967 |
},
|
jtulach@678
|
23968 |
|
jtulach@678
|
23969 |
open: function(url, name, features, replace){
|
jtulach@678
|
23970 |
if (features) {
|
jtulach@678
|
23971 |
console.log("'features argument not yet implemented");
|
jtulach@678
|
23972 |
}
|
jtulach@678
|
23973 |
var _window = Envjs.proxy({}),
|
jtulach@678
|
23974 |
open;
|
jtulach@678
|
23975 |
if(replace && name){
|
jtulach@678
|
23976 |
for(open in __windows__){
|
jtulach@678
|
23977 |
if(open.name === name) {
|
jtulach@678
|
23978 |
_window = open;
|
jtulach@678
|
23979 |
}
|
jtulach@678
|
23980 |
}
|
jtulach@678
|
23981 |
}
|
jtulach@678
|
23982 |
new Window(_window, _window, this);
|
jtulach@678
|
23983 |
if(name) {
|
jtulach@678
|
23984 |
_window.name = name;
|
jtulach@678
|
23985 |
}
|
jtulach@678
|
23986 |
_window.document.async = false;
|
jtulach@678
|
23987 |
_window.location.assign(Envjs.uri(url));
|
jtulach@678
|
23988 |
return _window;
|
jtulach@678
|
23989 |
},
|
jtulach@678
|
23990 |
close: function(){
|
jtulach@678
|
23991 |
//console.log('closing window %s', __windows__[$uuid]);
|
jtulach@678
|
23992 |
try{
|
jtulach@678
|
23993 |
delete __windows__[$uuid];
|
jtulach@678
|
23994 |
}catch(e){
|
jtulach@678
|
23995 |
console.log('%s',e);
|
jtulach@678
|
23996 |
}
|
jtulach@678
|
23997 |
},
|
jtulach@678
|
23998 |
alert : function(message){
|
jtulach@678
|
23999 |
Envjs.alert(message);
|
jtulach@678
|
24000 |
},
|
jtulach@678
|
24001 |
confirm : function(question){
|
jtulach@678
|
24002 |
Envjs.confirm(question);
|
jtulach@678
|
24003 |
},
|
jtulach@678
|
24004 |
prompt : function(message, defaultMsg){
|
jtulach@678
|
24005 |
Envjs.prompt(message, defaultMsg);
|
jtulach@678
|
24006 |
},
|
jtulach@678
|
24007 |
btoa: function(binary){
|
jtulach@678
|
24008 |
return base64.encode(binary);
|
jtulach@678
|
24009 |
},
|
jtulach@678
|
24010 |
atob: function(ascii){
|
jtulach@678
|
24011 |
return base64.decode(ascii);
|
jtulach@678
|
24012 |
},
|
jtulach@678
|
24013 |
onload: function(){},
|
jtulach@678
|
24014 |
onunload: function(){},
|
jtulach@678
|
24015 |
get guid(){
|
jtulach@678
|
24016 |
return $uuid;
|
jtulach@678
|
24017 |
}
|
jtulach@678
|
24018 |
});
|
jtulach@678
|
24019 |
|
jtulach@678
|
24020 |
};
|
jtulach@678
|
24021 |
|
jtulach@678
|
24022 |
|
jtulach@678
|
24023 |
//finally pre-supply the window with the window-like environment
|
jtulach@678
|
24024 |
//console.log('Default Window');
|
jtulach@678
|
24025 |
new Window(__this__, __this__);
|
jtulach@678
|
24026 |
console.log('[ %s ]',window.navigator.userAgent);
|
jtulach@678
|
24027 |
/**
|
jtulach@678
|
24028 |
*
|
jtulach@678
|
24029 |
* @param {Object} event
|
jtulach@678
|
24030 |
*/
|
jtulach@678
|
24031 |
__extend__(Envjs.defaultEventBehaviors,{
|
jtulach@678
|
24032 |
|
jtulach@678
|
24033 |
'submit': function(event) {
|
jtulach@678
|
24034 |
var target = event.target;
|
jtulach@678
|
24035 |
while (target && target.nodeName !== 'FORM') {
|
jtulach@678
|
24036 |
target = target.parentNode;
|
jtulach@678
|
24037 |
}
|
jtulach@678
|
24038 |
if (target && target.nodeName === 'FORM') {
|
jtulach@678
|
24039 |
target.submit();
|
jtulach@678
|
24040 |
}
|
jtulach@678
|
24041 |
},
|
jtulach@678
|
24042 |
'click': function(event) {
|
jtulach@678
|
24043 |
// console.log('handling event target default behavior for click');
|
jtulach@678
|
24044 |
}
|
jtulach@678
|
24045 |
|
jtulach@678
|
24046 |
});
|
jtulach@678
|
24047 |
/**
|
jtulach@678
|
24048 |
* @author john resig & the envjs team
|
jtulach@678
|
24049 |
* @uri http://www.envjs.com/
|
jtulach@678
|
24050 |
* @copyright 2008-2010
|
jtulach@678
|
24051 |
* @license MIT
|
jtulach@678
|
24052 |
*/
|
jtulach@678
|
24053 |
//CLOSURE_END
|
jtulach@678
|
24054 |
}());
|