3 |
MDOM:DOMHTML |
MDOM:DOMHTML |
4 |
@Namespace: |
@Namespace: |
5 |
http://suika.fam.cx/~wakaba/archive/2004/dom/html# |
http://suika.fam.cx/~wakaba/archive/2004/dom/html# |
6 |
|
|
7 |
@AppName: |
@AppName: |
8 |
@@@: html |
@@@: html |
9 |
@@ContentType: |
@@ContentType: |
18 |
@@prefix: dom.w3c.org |
@@prefix: dom.w3c.org |
19 |
@@For: |
@@For: |
20 |
ManakaiDOM:IDL ManakaiDOM:DOM2 |
ManakaiDOM:IDL ManakaiDOM:DOM2 |
21 |
|
|
22 |
@FullName: |
@FullName: |
23 |
@@lang:en |
@@lang:en |
24 |
@@@: DOM HTML Module |
@@@: DOM HTML Module |
27 |
@@lang:en |
@@lang:en |
28 |
@@@: |
@@@: |
29 |
The DOM HTML Module provides objects and methods specific |
The DOM HTML Module provides objects and methods specific |
30 |
to HTML 4 documents and XHTML 1.0 documents. THe HTML |
to HTML 4 documents and XHTML 1.0 documents. The HTML |
31 |
DOM exposes a number of convinience methods and attributes |
DOM exposes a number of convinience methods and attributes |
32 |
that are more appropriate to script writers. These |
that are more appropriate to script writers. These |
33 |
enhancements rely on transitional or frameset DTDs |
enhancements rely on transitional or frameset DTDs |
34 |
of HTML 4.0 <SRC:DOM Level 1 HTML> or HTML 4.01 |
of HTML 4.0 <SRC::DOM Level 1 HTML> or HTML 4.01 |
35 |
<SRC:DOM Level 2 HTML> and XHTML 1.0 <SRC:DOM Level 2 HTML>. |
<SRC::DOM Level 2 HTML> and XHTML 1.0 <SRC::DOM Level 2 HTML>. |
36 |
|
\ |
37 |
|
Form related interfaces are provided by a separate |
38 |
|
module, <Module::DOMWebForms>. |
39 |
|
|
40 |
@Author: |
@Author: |
41 |
@@FullName: Wakaba |
@@FullName: Wakaba |
53 |
|
|
54 |
@Require: |
@Require: |
55 |
@@Module: |
@@Module: |
56 |
@@@Name: DISMarkup |
@@@QName: |
57 |
@@@For: |
DISlib:DISMarkup |
58 |
=ManakaiDOM:all |
@@@WithFor: |
59 |
|
ManakaiDOM:all |
60 |
@@Module: |
@@Module: |
61 |
@@@Name: DOMXML |
@@@Name: DOMXML |
62 |
@@@For: |
@@@WithFor: |
63 |
ManakaiDOM:DOM |
ManakaiDOM:ManakaiDOMLatest |
64 |
@@Module: |
@@Module: |
65 |
@@@Name: DOMWebForms |
@@@Name: DOMWebForms |
66 |
@@Module: |
@@Module: |
97 |
http://suika.fam.cx/~wakaba/archive/2004/8/18/lang#dis-- |
http://suika.fam.cx/~wakaba/archive/2004/8/18/lang#dis-- |
98 |
@dis2pm: |
@dis2pm: |
99 |
http://suika.fam.cx/~wakaba/archive/2004/11/8/dis2pm# |
http://suika.fam.cx/~wakaba/archive/2004/11/8/dis2pm# |
100 |
|
@DISlib: |
101 |
|
http://suika.fam.cx/~wakaba/archive/2004/dis/ |
102 |
@DOMHTML: |
@DOMHTML: |
103 |
http://suika.fam.cx/~wakaba/archive/2004/dom/html# |
http://suika.fam.cx/~wakaba/archive/2004/dom/html# |
104 |
@DOMMain: |
@DOMMain: |
132 |
@TreeCore:\ |
@TreeCore:\ |
133 |
@xhtml1: |
@xhtml1: |
134 |
http://www.w3.org/1999/xhtml |
http://www.w3.org/1999/xhtml |
135 |
|
@xml: |
136 |
|
http://www.w3.org/XML/1998/namespace |
137 |
|
@xmlns: |
138 |
|
http://www.w3.org/2000/xmlns/ |
139 |
|
|
140 |
|
ImplNote: |
141 |
|
@lang:en |
142 |
|
@@: |
143 |
|
{TODO:: Lowercase'ize Perl method/attribute names. |
144 |
|
\ |
145 |
|
ISSUE: Should createTHead be createThead? |
146 |
|
\ |
147 |
|
} |
148 |
|
|
149 |
## -- "For HTML" |
## -- "For HTML" |
150 |
|
|
156 |
@FullName: |
@FullName: |
157 |
@@lang:en |
@@lang:en |
158 |
@@@: |
@@@: |
159 |
For Hypertext Markup Language (HTML) |
For Hypertext Markup Language (HTML), any version |
160 |
|
|
161 |
ForDef: |
ForDef: |
162 |
@QName: |
@QName: |
166 |
@FullName: |
@FullName: |
167 |
@@lang:en |
@@lang:en |
168 |
@@@: |
@@@: |
169 |
For non-XML HTML |
For non-XML-based HTML, any version |
170 |
|
|
171 |
ForDef: |
ForDef: |
172 |
@QName: |
@QName: |
223 |
@FullName: |
@FullName: |
224 |
@@lang:en |
@@lang:en |
225 |
@@@: |
@@@: |
226 |
For XHTML |
For XHTML, compatible with W3C XHTML 1, any version |
227 |
|
|
228 |
ForDef: |
ForDef: |
229 |
@QName: |
@QName: |
293 |
@ShadowContent: |
@ShadowContent: |
294 |
@@rdf:type: |
@@rdf:type: |
295 |
DOMMain:DOMFeature |
DOMMain:DOMFeature |
296 |
@@AliasFor: |
@@ForCheck: |
297 |
@@@@: |
ManakaiDOM:all |
298 |
::ManakaiDOM:all |
|
|
@@@For: |
|
|
!=ManakaiDOM:all |
|
299 |
ElementTypeBinding: |
ElementTypeBinding: |
300 |
@Name: FeatureVerDef |
@Name: FeatureVerDef |
301 |
@ElementType: |
@ElementType: |
318 |
@FeatureVerDef: |
@FeatureVerDef: |
319 |
@@Version:1.0 |
@@Version:1.0 |
320 |
@@QName: HTMLFeature10 |
@@QName: HTMLFeature10 |
321 |
@@ISA: HTMLFeature |
@@DOMMetaImpl:instanceFeatureOf: HTMLFeature |
322 |
@@FullName: DOM Level 1 HTML |
@@FullName: |
323 |
|
@@@@: DOM Level 1 HTML |
324 |
|
@@@lang:en |
325 |
@@ImplNote: |
@@ImplNote: |
326 |
@@@lang:en |
@@@lang:en |
327 |
@@@@: |
@@@@: |
333 |
@FeatureVerDef: |
@FeatureVerDef: |
334 |
@@Version:2.0 |
@@Version:2.0 |
335 |
@@QName: HTMLFeature20 |
@@QName: HTMLFeature20 |
336 |
@@ISA: HTMLFeature |
@@DOMMetaImpl:instanceFeatureOf: HTMLFeature |
337 |
@@FullName: DOM Level 2 HTML |
@@FullName: |
338 |
|
@@@@: DOM Level 2 HTML |
339 |
|
@@@lang:en |
340 |
@@DOMMain:requireFeature: |
@@DOMMain:requireFeature: |
341 |
DOMCore:CoreFeature20 |
DOMCore:CoreFeature20 |
342 |
|
|
345 |
@QName: XHTMLFeature |
@QName: XHTMLFeature |
346 |
@FeatureVerDef: |
@FeatureVerDef: |
347 |
@@Version:2.0 |
@@Version:2.0 |
348 |
@@FullName: DOM Level 2 HTML (with XHTML support) |
@@FullName: |
349 |
|
@@@@: DOM Level 2 HTML (with XHTML support) |
350 |
|
@@@lang:en |
351 |
@@QName: XHTMLFeature20 |
@@QName: XHTMLFeature20 |
352 |
@@ISA: XHTMLFeature |
@@DOMMetaImpl:instanceFeatureOf: XHTMLFeature |
353 |
@@ISA: HTMLFeature20 |
@@DOMMain:extendFeature: HTMLFeature20 |
354 |
@@ISA: |
@@DOMMain:extendFeature: |
355 |
DOMXML:XMLFeature20 |
DOMXML:XMLFeature20 |
356 |
@@Description: |
@@Description: |
357 |
@@@lang:en |
@@@lang:en |
384 |
lang:dis |
lang:dis |
385 |
@@DISLang:dataTypeAliasFor: |
@@DISLang:dataTypeAliasFor: |
386 |
DOMMain:DOMString |
DOMMain:DOMString |
387 |
|
|
388 |
DataTypeAlias: |
DataTypeAlias: |
389 |
@Name: Node |
@Name: Node |
390 |
@AliasFor: |
@AliasFor: |
399 |
lang:dis |
lang:dis |
400 |
@@DISLang:dataTypeAliasFor: |
@@DISLang:dataTypeAliasFor: |
401 |
DOMCore:Node |
DOMCore:Node |
402 |
|
|
403 |
DataTypeAlias: |
DataTypeAlias: |
404 |
@Name: Document |
@Name: Document |
405 |
@AliasFor: |
@AliasFor: |
414 |
lang:dis |
lang:dis |
415 |
@@DISLang:dataTypeAliasFor: |
@@DISLang:dataTypeAliasFor: |
416 |
DOMCore:Document |
DOMCore:Document |
417 |
|
|
418 |
DataTypeAlias: |
DataTypeAlias: |
419 |
@Name: NodeList |
@Name: NodeList |
420 |
@AliasFor: |
@AliasFor: |
429 |
lang:dis |
lang:dis |
430 |
@@DISLang:dataTypeAliasFor: |
@@DISLang:dataTypeAliasFor: |
431 |
DOMCore:NodeList |
DOMCore:NodeList |
432 |
|
|
433 |
DataTypeAlias: |
DataTypeAlias: |
434 |
@Name: Element |
@Name: Element |
435 |
@AliasFor: |
@AliasFor: |
497 |
ManakaiDOM:DOM1 |
ManakaiDOM:DOM1 |
498 |
@@For: |
@@For: |
499 |
=ManakaiDOM:ManakaiDOM |
=ManakaiDOM:ManakaiDOM |
500 |
|
@@For: ForHTML |
501 |
|
|
502 |
ElementTypeBinding: |
ElementTypeBinding: |
503 |
@Name: L2 |
@Name: L2 |
521 |
ManakaiDOM:DOM2 |
ManakaiDOM:DOM2 |
522 |
@@For: |
@@For: |
523 |
=ManakaiDOM:ManakaiDOM |
=ManakaiDOM:ManakaiDOM |
524 |
|
@@For: ForHTML |
525 |
|
|
526 |
ElementTypeBinding: |
ElementTypeBinding: |
527 |
@Name: PerlDef |
@Name: PerlDef |
574 |
@@@@: |
@@@@: |
575 |
::ManakaiDOM:ManakaiDOM |
::ManakaiDOM:ManakaiDOM |
576 |
@@@ForCheck: |
@@@ForCheck: |
577 |
ManakaiDOM:ForIF |
ManakaiDOM:ForIF ManakaiDOM:ManakaiDOM1 |
|
@@@For: |
|
|
ManakaiDOM:ManakaiDOM2 |
|
578 |
|
|
579 |
ElementTypeBinding: |
ElementTypeBinding: |
580 |
@Name: ET |
@Name: ET |
626 |
@@@@: |
@@@@: |
627 |
::ManakaiDOM:ManakaiDOM |
::ManakaiDOM:ManakaiDOM |
628 |
@@@ForCheck: |
@@@ForCheck: |
629 |
ManakaiDOM:ForIF |
ManakaiDOM:ForIF ManakaiDOM:ManakaiDOM1 |
|
@@@For: |
|
|
ManakaiDOM:ManakaiDOM2 |
|
630 |
@@DISMarkup:elementType: |
@@DISMarkup:elementType: |
631 |
@@@@: |
@@@@: |
632 |
::ForHTML40SE |
::ForHTML40SE |
638 |
DOM Level 1 First Edition refers the latest version of |
DOM Level 1 First Edition refers the latest version of |
639 |
HTML 4.0 while Second Edition refers the second edition of |
HTML 4.0 while Second Edition refers the second edition of |
640 |
HTML 4.0. |
HTML 4.0. |
641 |
|
@@@DISCore:stopISARecursive:1 |
642 |
@@DISMarkup:elementType: |
@@DISMarkup:elementType: |
643 |
@@@@: |
@@@@: |
644 |
::ForHTML401 |
::ForHTML401 |
649 |
::ForXHTML10SE |
::ForXHTML10SE |
650 |
@@@ForCheck: |
@@@ForCheck: |
651 |
ManakaiDOM:DOM2 |
ManakaiDOM:DOM2 |
652 |
|
@@@DISCore:stopISARecursive:1 |
653 |
|
|
654 |
ElementTypeBinding: |
ElementTypeBinding: |
655 |
@Name: Method |
@Name: Method |
834 |
ManakaiDOM:ForClass |
ManakaiDOM:ForClass |
835 |
@ISA: |
@ISA: |
836 |
@@@: |
@@@: |
837 |
ManakaiDOM:ManakaiDOMNodeReference |
ManakaiDOM:ManakaiDOMNodeReference::ManakaiDOM:Perl |
838 |
@@ForCheck: |
@@ForCheck: |
839 |
ManakaiDOM:ForClass |
ManakaiDOM:ForClass |
840 |
@ISA: |
@ISA: |
962 |
-><M::ManakaiDOMCore:ManakaiDOMNodeObjectNode |
-><M::ManakaiDOMCore:ManakaiDOMNodeObjectNode |
963 |
.getElementBy> |
.getElementBy> |
964 |
(sub ($) { |
(sub ($) { |
965 |
#line 1 "DOMHTML.ManakaiDOMHTMLCollection.namedItem.#1" |
\#line 1 "DOMHTML.ManakaiDOMHTMLCollection.namedItem.#1" |
966 |
my $node = shift; |
my $node = shift; |
967 |
if ($self->{<Q::ManakaiDOMCore:nodeMatch>}->($node)) { |
if ($self->{<Q::ManakaiDOMCore:nodeMatch>}->($node)) { |
968 |
my $attr = $node->{<Q::infoset:attributes>} |
my $attr = $node->{<Q::infoset:attributes>} |
969 |
->{<Q::null:>}->{name} || |
->{<Q::null:>}->{name} || |
970 |
$node->{<Q::infoset:attributes>} |
$node->{<Q::infoset:attributes>} |
971 |
->{<Q::ManakaiDOM:noNS>}->{name}; |
->{<Q::ManakaiDOM:noNS>}->{name}; |
972 |
if ($attr and |
if ($attr) { |
973 |
$attr-> |
my $attrn; |
974 |
<AG::ManakaiDOMCore:ManakaiDOMNodeObjectNode |
__CODE{ManakaiNode:getWeakReference |
975 |
.textContent> eq $name) { |
||ManakaiDOM:Perl:: |
976 |
return true; |
$object => $attr, $ref => $attrn, |
977 |
|
$class => {<ClassName::DOMCore:ManakaiDOMAttr>}, |
978 |
|
}__; |
979 |
|
__FOR{ManakaiDOM:DOM3:: |
980 |
|
if ($attrn-><AG::DOMCore:Node.textContent> |
981 |
|
eq $name) { |
982 |
|
return true; |
983 |
|
} |
984 |
|
}__; |
985 |
|
__FOR{!ManakaiDOM:DOM3:: |
986 |
|
if ($attrn-><AG::DOMCore:ManakaiDOMNode |
987 |
|
.textContent> eq $name) { |
988 |
|
return true; |
989 |
|
} |
990 |
|
}__; |
991 |
} |
} |
992 |
} |
} |
993 |
return false; |
return false; |
994 |
#line 1 "DOMHTML.ManakaiDOMHTMLCollection.namedItem.#2" |
\#line 1 "DOMHTML.ManakaiDOMHTMLCollection.namedItem.#2" |
995 |
}, \$index); |
}, \$index); |
996 |
} |
} |
997 |
$index = 0; |
$index = 0; |
999 |
-><M::ManakaiDOMCore:ManakaiDOMNodeObjectNode |
-><M::ManakaiDOMCore:ManakaiDOMNodeObjectNode |
1000 |
.getElementBy> |
.getElementBy> |
1001 |
(sub ($) { |
(sub ($) { |
1002 |
#line 1 "DOMHTML.ManakaiDOMHTMLCollection.namedItem.#3" |
\#line 1 "DOMHTML.ManakaiDOMHTMLCollection.namedItem.#3" |
1003 |
my $node = shift; |
my $node = shift; |
1004 |
if ($self->{<Q::ManakaiDOMCore:nodeMatch>}->($node)) { |
if ($self->{<Q::ManakaiDOMCore:nodeMatch>}->($node)) { |
1005 |
my $attr = $node->{<Q::infoset:attributes>} |
my $attr = $node->{<Q::infoset:attributes>} |
1006 |
->{<Q::null:>}->{id} || |
->{<Q::null:>}->{id} || |
1007 |
$node->{<Q::infoset:attributes>} |
$node->{<Q::infoset:attributes>} |
1008 |
->{<Q::ManakaiDOM:noNS>}->{id}; |
->{<Q::ManakaiDOM:noNS>}->{id}; |
1009 |
if ($attr and |
if ($attr) { |
1010 |
$attr-> |
my $attrn; |
1011 |
<AG::ManakaiDOMCore:ManakaiDOMNodeObjectNode |
__CODE{ManakaiNode:getWeakReference |
1012 |
.textContent> eq $name) { |
||ManakaiDOM:Perl:: |
1013 |
return true; |
$object => $attr, $ref => $attrn, |
1014 |
|
$class => {<ClassName::DOMCore:ManakaiDOMAttr>}, |
1015 |
|
}__; |
1016 |
|
__FOR{ManakaiDOM:DOM3:: |
1017 |
|
if ($attrn-><AG::DOMCore:Node.textContent> |
1018 |
|
eq $name) { |
1019 |
|
return true; |
1020 |
|
} |
1021 |
|
}__; |
1022 |
|
__FOR{!ManakaiDOM:DOM3:: |
1023 |
|
if ($attrn-><AG::DOMCore:ManakaiDOMNode |
1024 |
|
.textContent> eq $name) { |
1025 |
|
return true; |
1026 |
|
} |
1027 |
|
}__; |
1028 |
} |
} |
1029 |
} |
} |
1030 |
return false; |
return false; |
1031 |
#line 1 "DOMHTML.ManakaiDOMHTMLCollection.namedItem.#4" |
\#line 1 "DOMHTML.ManakaiDOMHTMLCollection.namedItem.#4" |
1032 |
}, \$index); |
}, \$index); |
1033 |
if (defined $r) { |
if (defined $r) { |
1034 |
$r = <ClassM::DOMCore:ManakaiDOMNode.getNodeReference> ($r, $self); |
$r = <ClassM::DOMCore:ManakaiDOMNode.getNodeReference> ($r, $self); |
1041 |
|
|
1042 |
IF: |
IF: |
1043 |
@Name: |
@Name: |
1044 |
@@@: HTMLDOMImplementation |
@@@: ManakaiDOMHTMLDOMImplementationIF |
1045 |
@@ForCheck: |
@@ForCheck: |
1046 |
ManakaiDOM:ForIF |
ManakaiDOM:ForIF |
1047 |
@ISA: |
@ISA: |
1066 |
=ManakaiDOM:ManakaiDOM |
=ManakaiDOM:ManakaiDOM |
1067 |
@DOMMain:implementFeature: HTMLFeature20 |
@DOMMain:implementFeature: HTMLFeature20 |
1068 |
|
|
1069 |
|
@DOMMetaImpl:provideFeature: HTMLFeature20 |
1070 |
|
|
1071 |
@Description: |
@Description: |
1072 |
@@lang:en |
@@lang:en |
1073 |
@@@: |
@@@: |
1145 |
($r-><M::DOMCore:Document.createElement> |
($r-><M::DOMCore:Document.createElement> |
1146 |
('BODY')); |
('BODY')); |
1147 |
|
|
1148 |
|
|
1149 |
|
@Method: |
1150 |
|
@@Name: createXHTMLDocument |
1151 |
|
@@Description: |
1152 |
|
@@@lang:en |
1153 |
|
@@@@: |
1154 |
|
Creates an <IF::HTMLDocument> object with the minimal tree |
1155 |
|
made of <HE::html>, <HE::head>, <HE::title> and <HE::body> elements |
1156 |
|
and with the <Feature::XHTML> feature. |
1157 |
|
\ |
1158 |
|
{NOTE:: This method is <EM::manakai extension>. |
1159 |
|
\ |
1160 |
|
} |
1161 |
|
|
1162 |
|
@@For: |
1163 |
|
ManakaiDOM:ManakaiDOMLatest |
1164 |
|
|
1165 |
|
@@Param: |
1166 |
|
@@@Name:title |
1167 |
|
@@@Type: |
1168 |
|
DOMMain:DOMString |
1169 |
|
@@@Description: |
1170 |
|
@@@@lang:en |
1171 |
|
@@@@@: |
1172 |
|
The title of the document to create. It is set as the content of |
1173 |
|
the <HE::title> element, through a child <IF::DOMCore:Text> node. |
1174 |
|
@@Return: |
1175 |
|
@@@Type: HTMLDocument |
1176 |
|
@@@actualType: ManakaiDOMHTMLDocument |
1177 |
|
@@@Description: |
1178 |
|
@@@@lang:en |
1179 |
|
@@@@@: |
1180 |
|
A newly created HTML document. |
1181 |
|
@@@PerlDef: |
1182 |
|
__DEEP{ |
1183 |
|
my $node = $r-><M::DOMCore:ManakaiDOMDocument.newObject>; |
1184 |
|
$node->{<Q::DOMCore:implementation>} = $self; |
1185 |
|
$node->{<Q::ManakaiDOM:implID>} |
1186 |
|
= $self->{<Q::TreeCore:node>}->{<Q::ManakaiDOM:implID>}; |
1187 |
|
$node->{<Q::DOMCore:hasFeature>}->{HTML} = 1; |
1188 |
|
$node->{<Q::DOMCore:hasFeature>}->{XML} = 1; |
1189 |
|
$r = <ClassM::DOMCore:ManakaiDOMNode.getNodeReference> ($node); |
1190 |
|
$r-><M::DOMCore:Node.appendChild> |
1191 |
|
(my $html = $r-><M::DOMCore:Document.createElementNS> |
1192 |
|
(<Q::xhtml1:>, 'html')); |
1193 |
|
$html-><M::DOMCore:Element.setAttributeNS> |
1194 |
|
(<Q::xmlns:>, 'xmlns', <Q::xhtml1:>); |
1195 |
|
$html-><M::DOMCore:Node.appendChild> |
1196 |
|
(my $head = $r-><M::DOMCore:Document.createElementNS> |
1197 |
|
(<Q::xhtml1:>, 'head')); |
1198 |
|
$head-><M::DOMCore:Node.appendChild> |
1199 |
|
(my $titleEl = $r-><M::DOMCore:Document.createElementNS> |
1200 |
|
(<Q::xhtml1:>, 'title')); |
1201 |
|
if (length $title) { |
1202 |
|
$titleEl-><M::DOMCore:Node.appendChild> |
1203 |
|
($r-><M::DOMCore:Document.createTextNode> ($title)); |
1204 |
|
} |
1205 |
|
$html-><M::DOMCore:Node.appendChild> |
1206 |
|
($r-><M::DOMCore:Document.createElementNS> |
1207 |
|
(<Q::xhtml1:>, 'body')); |
1208 |
|
}__; |
1209 |
|
|
1210 |
IF: |
IF: |
1211 |
@Name: |
@Name: |
1212 |
@@@: HTMLDocument |
@@@: HTMLDocument |
1271 |
@@Description: |
@@Description: |
1272 |
@@@lang:en |
@@@lang:en |
1273 |
@@@@: |
@@@@: |
1274 |
The title of a document, as specified by the <HE:tile> element. |
The title of a document, as specified by the <HE::title> element. |
1275 |
@@Get: |
@@Get: |
1276 |
@@@Type: DOMString |
@@@Type: DOMString |
1277 |
|
@@@PerlDef: |
1278 |
|
__DEEP{ |
1279 |
|
DOC: for my $child (@{$self-><AG::DOMCore:Node.childNodes>}) { |
1280 |
|
if ($child-><AG::DOMCore:Node.nodeType> == |
1281 |
|
<C::DOMCore:Node.ELEMENT_NODE> and |
1282 |
|
<Code::isHTMLElement:: $elementNode = $child, |
1283 |
|
$elementType = 'html'>) { |
1284 |
|
for my $child (@{$child-><AG::DOMCore:Node.childNodes>}) { |
1285 |
|
if ($child-><AG::DOMCore:Node.nodeType> == |
1286 |
|
<C::DOMCore:Node.ELEMENT_NODE> and |
1287 |
|
<Code::isHTMLElement:: $elementNode = $child, |
1288 |
|
$elementType = 'head'>) { |
1289 |
|
for my $child (@{$child-><AG::DOMCore:Node.childNodes>}) { |
1290 |
|
if ($child-><AG::DOMCore:Node.nodeType> == |
1291 |
|
<C::DOMCore:Node.ELEMENT_NODE> and |
1292 |
|
<Code::isHTMLElement:: $elementNode = $child, |
1293 |
|
$elementType = 'title'>) { |
1294 |
|
__CODE{DOMCore:getNodeTextContent:: |
1295 |
|
$node => $child, |
1296 |
|
$result => $r}__; |
1297 |
|
last DOC; |
1298 |
|
} |
1299 |
|
} |
1300 |
|
last DOC; # xhtml1:title not found |
1301 |
|
} |
1302 |
|
} |
1303 |
|
last DOC; # xhtml1:head not found |
1304 |
|
} |
1305 |
|
} |
1306 |
|
}__; |
1307 |
@@Set: |
@@Set: |
1308 |
|
@@@Exception: |
1309 |
|
@@@@@: |
1310 |
|
DOMCore:DOMException.NO_MODIFICATION_ALLOWED_ERR |
1311 |
|
@@@@enDesc: |
1312 |
|
Either the <HE::title> element is read-only, |
1313 |
|
there is no <HE::title> element and the <HE::head> |
1314 |
|
element is read-only, there is no <HE::head> |
1315 |
|
element and the <HE::html> element is read-only, |
1316 |
|
or there is no <HE::html> element and the document |
1317 |
|
node is read-only. |
1318 |
|
@@@@ForCheck: |
1319 |
|
ManakaiDOM:ManakaiDOM |
1320 |
|
@@@Exception: |
1321 |
|
@@@@@: |
1322 |
|
MDOMX:MDOM_SECOND_DOC_ELEMENT |
1323 |
|
@@@@enDesc: |
1324 |
|
The document element (root element) of the document |
1325 |
|
is not an <HE::html> element. |
1326 |
|
@@@@ForCheck: |
1327 |
|
ManakaiDOM:ManakaiDOM |
1328 |
|
@@@ImplNote: |
1329 |
|
@@@@lang:en |
1330 |
|
@@@@@: |
1331 |
|
The Spec. does not specify what has occured if |
1332 |
|
there is no <HE::title> element. |
1333 |
@@@Type: DOMString |
@@@Type: DOMString |
1334 |
|
@@@PerlDef: |
1335 |
|
__DEEP{ |
1336 |
|
my $html; |
1337 |
|
for my $child (@{$self-><AG::DOMCore:Node.childNodes>}) { |
1338 |
|
if ($child-><AG::DOMCore:Node.nodeType> == |
1339 |
|
<C::DOMCore:Node.ELEMENT_NODE> and |
1340 |
|
<Code::isHTMLElement:: $elementNode = $child, |
1341 |
|
$elementType = 'html'>) { |
1342 |
|
$html = $child; |
1343 |
|
last; |
1344 |
|
} |
1345 |
|
} |
1346 |
|
unless ($html) { |
1347 |
|
$html = $self-><M::DOMCore:Node.appendChild> |
1348 |
|
($self-><M::DOMCore:Document.createElementNS> |
1349 |
|
(<Q::xhtml1:>, 'html')); |
1350 |
|
} |
1351 |
|
|
1352 |
|
my $head; |
1353 |
|
for my $child (@{$html-><AG::DOMCore:Node.childNodes>}) { |
1354 |
|
if ($child-><AG::DOMCore:Node.nodeType> == |
1355 |
|
<C::DOMCore:Node.ELEMENT_NODE> and |
1356 |
|
<Code::isHTMLElement:: $elementNode = $child, |
1357 |
|
$elementType = 'head'>) { |
1358 |
|
$head = $child; |
1359 |
|
last; |
1360 |
|
} |
1361 |
|
} |
1362 |
|
unless ($head) { |
1363 |
|
$head = $html-><M::DOMCore:Node.appendChild> |
1364 |
|
($self-><M::DOMCore:Document.createElementNS> |
1365 |
|
(<Q::xhtml1:>, 'head')); |
1366 |
|
} |
1367 |
|
|
1368 |
|
my $title; |
1369 |
|
for my $child (@{$head-><AG::DOMCore:Node.childNodes>}) { |
1370 |
|
if ($child-><AG::DOMCore:Node.nodeType> == |
1371 |
|
<C::DOMCore:Node.ELEMENT_NODE> and |
1372 |
|
<Code::isHTMLElement:: $elementNode = $child, |
1373 |
|
$elementType = 'title'>) { |
1374 |
|
$title = $child; |
1375 |
|
last; |
1376 |
|
} |
1377 |
|
} |
1378 |
|
unless ($title) { |
1379 |
|
$title = $head-><M::DOMCore:Node.appendChild> |
1380 |
|
($self-><M::DOMCore:Document.createElementNS> |
1381 |
|
(<Q::xhtml1:>, 'title')); |
1382 |
|
} |
1383 |
|
|
1384 |
|
__CODE{DOMCore:setNodeTextContent:: |
1385 |
|
$node => $title, $given => $given}__; |
1386 |
|
}__; |
1387 |
@Attr: |
@Attr: |
1388 |
@@Name: referrer |
@@Name: referrer |
1389 |
@@Description: |
@@Description: |
1477 |
@@@@lang:en |
@@@@lang:en |
1478 |
@@@@@: |
@@@@@: |
1479 |
The <HA:body> element or the outermost <HA:frameset> element. |
The <HA:body> element or the outermost <HA:frameset> element. |
1480 |
|
@@@nullCase: |
1481 |
|
@@@@enDesc: |
1482 |
|
The document does not have the <HA::body> element |
1483 |
|
nor a <HA::frameset> element. |
1484 |
|
@@@PerlDef: |
1485 |
|
__DEEP{ |
1486 |
|
DOC: for my $child (@{$self-><AG::DOMCore:Node.childNodes>}) { |
1487 |
|
if ($child-><AG::DOMCore:Node.nodeType> == |
1488 |
|
<C::DOMCore:Node.ELEMENT_NODE> and |
1489 |
|
<Code::isHTMLElement:: $elementNode = $child, |
1490 |
|
$elementType = 'html'>) { |
1491 |
|
for my $child (@{$child-><AG::DOMCore:Node.childNodes>}) { |
1492 |
|
if ($child-><AG::DOMCore:Node.nodeType> == |
1493 |
|
<C::DOMCore:Node.ELEMENT_NODE>) { |
1494 |
|
if (<Code::isHTMLElement:: $elementNode = $child, |
1495 |
|
$elementType = 'body'> or |
1496 |
|
<Code::isHTMLElement:: $elementNode = $child, |
1497 |
|
$elementType = 'frameset'>) { |
1498 |
|
$r = $child; |
1499 |
|
last DOC; |
1500 |
|
} |
1501 |
|
} |
1502 |
|
} |
1503 |
|
last DOC; # xhtml1:html not found |
1504 |
|
} |
1505 |
|
} |
1506 |
|
}__; |
1507 |
@@Set: |
@@Set: |
1508 |
@@@Type: HTMLElement |
@@@Type: HTMLElement |
1509 |
@@@ImplNote: |
@@@ImplNote: |
1510 |
@@@@lang:en |
@@@@lang:en |
1511 |
@@@@@: |
@@@@@: |
1512 |
ISSUE: Why this attribute is writable? No exception? |
ISSUE: Why this attribute is writable? No exception? |
1513 |
|
@@@ImplNote: |
1514 |
|
@@@@lang:en |
1515 |
|
@@@@@: |
1516 |
|
What should be happen if non-<HE::body> and non-<HE::frameset> |
1517 |
|
element is attempted to set? A <C::DOMCore:DOMException |
1518 |
|
.HIERARCHY_ERR>? The current implementation |
1519 |
|
does no check. |
1520 |
|
@@@Exception: |
1521 |
|
@@@@@: |
1522 |
|
DOMCore:DOMException.NO_MODIFICATION_ALLOWED_ERR |
1523 |
|
@@@@enDesc: |
1524 |
|
Either the <HE::html> element is read-only, |
1525 |
|
or there is no <HE::html> element and the document |
1526 |
|
node is read-only. |
1527 |
|
@@@@ForCheck: |
1528 |
|
ManakaiDOM:ManakaiDOM |
1529 |
|
@@@Exception: |
1530 |
|
@@@@@: |
1531 |
|
MDOMX:MDOM_SECOND_DOC_ELEMENT |
1532 |
|
@@@@enDesc: |
1533 |
|
The document element (root element) of the document |
1534 |
|
is not an <HE::html> element. |
1535 |
|
@@@@ForCheck: |
1536 |
|
ManakaiDOM:ManakaiDOM |
1537 |
|
@@@ImplNote: |
1538 |
|
@@@@lang:en |
1539 |
|
@@@@@: |
1540 |
|
The Spec. does not specify what has occured if |
1541 |
|
there is no <HE::html> element. |
1542 |
|
@@@PerlDef: |
1543 |
|
__DEEP{ |
1544 |
|
my $html; |
1545 |
|
for my $child (@{$self-><AG::DOMCore:Node.childNodes>}) { |
1546 |
|
if ($child-><AG::DOMCore:Node.nodeType> == |
1547 |
|
<C::DOMCore:Node.ELEMENT_NODE> and |
1548 |
|
<Code::isHTMLElement:: $elementNode = $child, |
1549 |
|
$elementType = 'html'>) { |
1550 |
|
$html = $child; |
1551 |
|
last; |
1552 |
|
} |
1553 |
|
} |
1554 |
|
unless ($html) { |
1555 |
|
$html = $self-><M::DOMCore:Node.appendChild> |
1556 |
|
($self-><M::DOMCore:Document.createElementNS> |
1557 |
|
(<Q::xhtml1:>, 'html')); |
1558 |
|
} |
1559 |
|
|
1560 |
|
my $body; |
1561 |
|
for my $child (@{$html-><AG::DOMCore:Node.childNodes>}) { |
1562 |
|
if ($child-><AG::DOMCore:Node.nodeType> == |
1563 |
|
<C::DOMCore:Node.ELEMENT_NODE>) { |
1564 |
|
if (<Code::isHTMLElement:: $elementNode = $child, |
1565 |
|
$elementType = 'body'> or |
1566 |
|
<Code::isHTMLElement:: $elementNode = $child, |
1567 |
|
$elementType = 'frameset'>) { |
1568 |
|
$body = $child; |
1569 |
|
last; |
1570 |
|
} |
1571 |
|
} |
1572 |
|
if ($body) { |
1573 |
|
$html-><M::DOMCore:Node.replaceChild> ($body => $given); |
1574 |
|
} else { |
1575 |
|
$html-><M::DOMCore:Node.appendChild> ($given); |
1576 |
|
} |
1577 |
|
}__; |
1578 |
@Attr: |
@Attr: |
1579 |
@@Name: images |
@@Name: images |
1580 |
@@Description: |
@@Description: |
1591 |
@@@actualType: |
@@@actualType: |
1592 |
ManakaiDOMHTMLCollection |
ManakaiDOMHTMLCollection |
1593 |
@@@PerlDef: |
@@@PerlDef: |
|
my $node = $self->{<Q::TreeCore:node>}; |
|
|
my $cis = $node->{<Q::DOMCore:ownerDocument>} |
|
|
->{<Q::DOMCore:hasFeature>}->{XML} |
|
|
? false |
|
|
: $node->{<Q::DOMCore:ownerDocument>} |
|
|
->{<Q::DOMCore:hasFeature>}->{HTML} |
|
|
? true : false; |
|
1594 |
my $chk; |
my $chk; |
1595 |
$chk = sub { |
$chk = sub { |
1596 |
#line 1 "DOMHTML.ManakaiDOMHTMLElement.getImages.#1" |
\#line 1 "DOMHTML.ManakaiDOMHTMLElement.getImages.#1" |
1597 |
my ($self) = @_; |
my ($self) = @_; |
1598 |
if (defined $self->{<Q::infoset:localName>}) { |
if (<Code::isHTMLElemento:: $elementNodeo = $self, |
1599 |
if (defined $self->{<Q::infoset:namespaceName>}) { |
$elementType = 'img'>) { |
1600 |
if ($self->{<Q::infoset:namespaceName>} eq <Q::xhtml1:> and |
return true; |
|
$self->{<Q::infoset:localName>} eq 'img') { |
|
|
return true; |
|
|
} |
|
|
} else { ## Null namespace |
|
|
if ($self->{<Q::infoset:localName>} eq 'img') { |
|
|
return true; |
|
|
} |
|
|
} |
|
1601 |
} else { |
} else { |
1602 |
if ($self->{<Q::DOMCore:name>} eq 'img' or |
return false; |
|
($cis and lc ($self->{<Q::DOMCore:name>}) eq 'img')) { |
|
|
return true; |
|
|
} |
|
1603 |
} |
} |
1604 |
return false; |
\#line 1 "DOMHTML.ManakaiDOMHTMLElement.getImages.#2" |
|
#line 1 "DOMHTML.ManakaiDOMHTMLElement.getImages.#2" |
|
1605 |
}; |
}; |
1606 |
__DEEP{ |
__DEEP{ |
1607 |
$r = $node-><M::ManakaiDOM:ManakaiDOMNodeObject.newReference> |
$r = $self->{<Q::TreeCore:node>} |
1608 |
|
-><M::ManakaiDOM:ManakaiDOMNodeObject |
1609 |
|
::ManakaiDOM:Perl.newReference> |
1610 |
(<ClassName::ManakaiDOMHTMLCollection>); |
(<ClassName::ManakaiDOMHTMLCollection>); |
1611 |
}__; |
}__; |
1612 |
$r->{<Q::ManakaiDOMCore:nodeMatch>} = $chk; |
$r->{<Q::ManakaiDOMCore:nodeMatch>} = $chk; |
1630 |
@@@actualType: |
@@@actualType: |
1631 |
ManakaiDOMHTMLCollection |
ManakaiDOMHTMLCollection |
1632 |
@@@PerlDef: |
@@@PerlDef: |
|
my $node = $self->{<Q::TreeCore:node>}; |
|
|
my $cis = $node->{<Q::DOMCore:ownerDocument>} |
|
|
->{<Q::DOMCore:hasFeature>}->{XML} |
|
|
? false |
|
|
: $node->{<Q::DOMCore:ownerDocument>} |
|
|
->{<Q::DOMCore:hasFeature>}->{HTML} |
|
|
? true : false; |
|
1633 |
my $chk; |
my $chk; |
1634 |
$chk = sub { |
$chk = sub { |
1635 |
|
\#line 1 "DOMHTML.ManakaiDOMHTMLElement.getApplets.#1" |
1636 |
my ($self) = @_; |
my ($self) = @_; |
1637 |
if (defined $self->{<Q::infoset:localName>}) { |
if (<Code::isHTMLElemento:: $elementNodeo = $self, |
1638 |
if (defined $self->{<Q::infoset:namespaceName>}) { |
$elementType = 'applet'>) { |
1639 |
if ($self->{<Q::infoset:namespaceName>} eq <Q::xhtml1:> and |
return true; |
1640 |
($self->{<Q::infoset:localName>} eq 'applet' or |
} elsif (<Code::isHTMLElemento:: $elementNodeo = $self, |
1641 |
($self->{<Q::infoset:localName>} eq 'object' and |
$elementType = 'object'> and |
1642 |
$self->{<Q::DOMHTML:isApplet>}))) { |
$self->{<Q::DOMHTML:isApplet>}) { |
1643 |
return true; |
return true; |
|
} |
|
|
} else { ## Null namespace |
|
|
if ($self->{<Q::infoset:localName>} eq 'applet' or |
|
|
($self->{<Q::infoset:localName>} eq 'object' and |
|
|
$self->{<Q::DOMHTML:isApplet>})) { |
|
|
return true; |
|
|
} |
|
|
} |
|
1644 |
} else { |
} else { |
1645 |
if ($self->{<Q::DOMCore:name>} eq 'applet' or |
return false; |
|
($cis and lc ($self->{<Q::DOMCore:name>}) eq 'applet') or |
|
|
($self->{<Q::DOMHTML:isApplet>} and |
|
|
($self->{<Q::DOMCore:name>} eq 'object' or |
|
|
($cis and lc ($self->{<Q::DOMCore:name>}) eq 'object')))) { |
|
|
return true; |
|
|
} |
|
1646 |
} |
} |
1647 |
return false; |
\#line 1 "DOMHTML.ManakaiDOMHTMLElement.getApplets.#2" |
1648 |
}; |
}; |
1649 |
__DEEP{ |
__DEEP{ |
1650 |
$r = $node-><M::ManakaiDOM:ManakaiDOMNodeObject.newReference> |
$r = $self->{<Q::TreeCore:node>} |
1651 |
|
-><M::ManakaiDOM:ManakaiDOMNodeObject |
1652 |
|
::ManakaiDOM:Perl.newReference> |
1653 |
(<ClassName::ManakaiDOMHTMLCollection>); |
(<ClassName::ManakaiDOMHTMLCollection>); |
1654 |
}__; |
}__; |
1655 |
$r->{<Q::ManakaiDOMCore:nodeMatch>} = $chk; |
$r->{<Q::ManakaiDOMCore:nodeMatch>} = $chk; |
1656 |
|
|
1657 |
@Attr: |
@Attr: |
1658 |
@@Name: links |
@@Name: links |
1659 |
@@Description: |
@@Description: |
1666 |
@@@actualType: |
@@@actualType: |
1667 |
ManakaiDOMHTMLCollection |
ManakaiDOMHTMLCollection |
1668 |
@@@PerlDef: |
@@@PerlDef: |
|
my $node = $self->{<Q::TreeCore:node>}; |
|
|
my $cis = $node->{<Q::DOMCore:ownerDocument>} |
|
|
->{<Q::DOMCore:hasFeature>}->{XML} |
|
|
? false |
|
|
: $node->{<Q::DOMCore:ownerDocument>} |
|
|
->{<Q::DOMCore:hasFeature>}->{HTML} |
|
|
? true : false; |
|
1669 |
my $chk; |
my $chk; |
1670 |
$chk = sub { |
$chk = sub { |
1671 |
|
\#line 1 "DOMHTML.ManakaiDOMHTMLElement.getLinks.#1" |
1672 |
my ($self) = @_; |
my ($self) = @_; |
1673 |
if (defined $self->{<Q::infoset:localName>}) { |
if (<Code::isHTMLElemento:: $elementNodeo = $self, |
1674 |
if (defined $self->{<Q::infoset:namespaceName>}) { |
$elementType = 'a'>) { |
1675 |
if ($self->{<Q::infoset:namespaceName>} eq <Q::xhtml1:> and |
return true |
|
{a => 1, area => 1}->{$self->{<Q::infoset:localName>}}) { |
|
|
return true |
|
1676 |
if $self->{<Q::infoset:attributes>} |
if $self->{<Q::infoset:attributes>} |
1677 |
->{<Q::null:>}->{href} or |
->{<Q::null:>}->{href} or |
1678 |
$self->{<Q::infoset:attributes>} |
$self->{<Q::infoset:attributes>} |
1679 |
->{<Q::ManakaiDOM:noNS>}->{href}; |
->{<Q::ManakaiDOM:noNS>}->{href}; |
1680 |
} |
} elsif (<Code::isHTMLElemento:: $elementNodeo = $self, |
1681 |
} else { ## Null namespace |
$elementType = 'area'>) { |
1682 |
if ({a => 1, area => 1}->{$self->{<Q::infoset:localName>}}) { |
return true |
|
return true |
|
1683 |
if $self->{<Q::infoset:attributes>} |
if $self->{<Q::infoset:attributes>} |
1684 |
->{<Q::null:>}->{href} or |
->{<Q::null:>}->{href} or |
1685 |
$self->{<Q::infoset:attributes>} |
$self->{<Q::infoset:attributes>} |
1686 |
->{<Q::ManakaiDOM:noNS>}->{href}; |
->{<Q::ManakaiDOM:noNS>}->{href}; |
|
} |
|
|
} |
|
|
} else { |
|
|
if ({a => 1, area => 1}->{$self->{<Q::DOMCore:name>}} or |
|
|
($cis and {a => 1, area => 1} |
|
|
->{lc $self->{<Q::DOMCore:name>}})) { |
|
|
return true |
|
|
if $self->{<Q::infoset:attributes>} |
|
|
->{<Q::ManakaiDOM:noNS>}->{href} or |
|
|
$self->{<Q::infoset:attributes>} |
|
|
->{<Q::null:>}->{href}; |
|
|
} |
|
1687 |
} |
} |
1688 |
return false; |
return false; |
1689 |
}; |
\#line 1 "DOMHTML.ManakaiDOMHTMLElement.getLinks.#2" |
1690 |
|
}; |
1691 |
__DEEP{ |
__DEEP{ |
1692 |
$r = $node-><M::ManakaiDOM:ManakaiDOMNodeObject.newReference> |
$r = $self->{<Q::TreeCore:node>} |
1693 |
|
-><M::ManakaiDOM:ManakaiDOMNodeObject |
1694 |
|
::ManakaiDOM:Perl.newReference> |
1695 |
(<ClassName::ManakaiDOMHTMLCollection>); |
(<ClassName::ManakaiDOMHTMLCollection>); |
1696 |
}__; |
}__; |
1697 |
$r->{<Q::ManakaiDOMCore:nodeMatch>} = $chk; |
$r->{<Q::ManakaiDOMCore:nodeMatch>} = $chk; |
1698 |
|
|
1699 |
@Attr: |
@Attr: |
1700 |
@@Name: forms |
@@Name: forms |
1701 |
@@Description: |
@@Description: |
1713 |
@@@actualType: |
@@@actualType: |
1714 |
ManakaiDOMHTMLCollection |
ManakaiDOMHTMLCollection |
1715 |
@@@PerlDef: |
@@@PerlDef: |
|
my $node = $self->{<Q::TreeCore:node>}; |
|
|
my $cis = $node->{<Q::DOMCore:ownerDocument>} |
|
|
->{<Q::DOMCore:hasFeature>}->{XML} |
|
|
? false |
|
|
: $node->{<Q::DOMCore:ownerDocument>} |
|
|
->{<Q::DOMCore:hasFeature>}->{HTML} |
|
|
? true : false; |
|
1716 |
my $chk; |
my $chk; |
1717 |
$chk = sub { |
$chk = sub { |
1718 |
|
\#line 1 "DOMHTML.ManakaiDOMHTMLElement.getForms.#1" |
1719 |
my ($self) = @_; |
my ($self) = @_; |
1720 |
if (defined $self->{<Q::infoset:localName>}) { |
if (<Code::isHTMLElemento:: $elementNodeo = $self, |
1721 |
if (defined $self->{<Q::infoset:namespaceName>}) { |
$elementType = 'form'>) { |
1722 |
if ($self->{<Q::infoset:namespaceName>} eq <Q::xhtml1:> and |
return true; |
|
$self->{<Q::infoset:localName>} eq 'form') { |
|
|
return true; |
|
|
} |
|
|
} else { ## Null namespace |
|
|
if ($self->{<Q::infoset:localName>} eq 'form') { |
|
|
return true; |
|
|
} |
|
|
} |
|
1723 |
} else { |
} else { |
1724 |
if ($self->{<Q::DOMCore:name>} eq 'form' or |
return false; |
|
($cis and lc ($self->{<Q::DOMCore:name>}) eq 'form')) { |
|
|
return true; |
|
|
} |
|
1725 |
} |
} |
1726 |
return false; |
\#line 1 "DOMHTML.ManakaiDOMHTMLElement.getForms.#2" |
1727 |
}; |
}; |
|
|
|
1728 |
__DEEP{ |
__DEEP{ |
1729 |
$r = $node-><M::ManakaiDOM:ManakaiDOMNodeObject.newReference> |
$r = $self->{<Q::TreeCore:node>} |
1730 |
|
-><M::ManakaiDOM:ManakaiDOMNodeObject |
1731 |
|
::ManakaiDOM:Perl.newReference> |
1732 |
(<ClassName::ManakaiDOMHTMLCollection>); |
(<ClassName::ManakaiDOMHTMLCollection>); |
1733 |
}__; |
}__; |
1734 |
$r->{<Q::ManakaiDOMCore:nodeMatch>} = $chk; |
$r->{<Q::ManakaiDOMCore:nodeMatch>} = $chk; |
1752 |
@@@actualType: |
@@@actualType: |
1753 |
ManakaiDOMHTMLCollection |
ManakaiDOMHTMLCollection |
1754 |
@@@PerlDef: |
@@@PerlDef: |
|
my $node = $self->{<Q::TreeCore:node>}; |
|
|
my $cis = $node->{<Q::DOMCore:ownerDocument>} |
|
|
->{<Q::DOMCore:hasFeature>}->{XML} |
|
|
? false |
|
|
: $node->{<Q::DOMCore:ownerDocument>} |
|
|
->{<Q::DOMCore:hasFeature>}->{HTML} |
|
|
? true : false; |
|
1755 |
my $chk; |
my $chk; |
1756 |
$chk = sub { |
$chk = sub { |
1757 |
|
\#line 1 "DOMHTML.ManakaiDOMHTMLElement.getAnchors.#1" |
1758 |
my ($self) = @_; |
my ($self) = @_; |
1759 |
if (defined $self->{<Q::infoset:localName>}) { |
if (<Code::isHTMLElemento:: $elementNodeo = $self, |
1760 |
if (defined $self->{<Q::infoset:namespaceName>}) { |
$elementType = 'a'>) { |
1761 |
if ($self->{<Q::infoset:namespaceName>} eq <Q::xhtml1:> and |
return true |
|
$self->{<Q::infoset:localName>} eq 'a') { |
|
|
return true |
|
1762 |
if $self->{<Q::infoset:attributes>} |
if $self->{<Q::infoset:attributes>} |
1763 |
->{<Q::null:>}->{name} or |
->{<Q::null:>}->{name} or |
1764 |
$self->{<Q::infoset:attributes>} |
$self->{<Q::infoset:attributes>} |
1765 |
->{<Q::ManakaiDOM:noNS>}->{name}; |
->{<Q::ManakaiDOM:noNS>}->{name}; |
|
} |
|
|
} else { ## Null namespace |
|
|
if ($self->{<Q::infoset:localName>} eq 'a') { |
|
|
return true |
|
|
if $self->{<Q::infoset:attributes>} |
|
|
->{<Q::null:>}->{name} or |
|
|
$self->{<Q::infoset:attributes>} |
|
|
->{<Q::ManakaiDOM:noNS>}->{name}; |
|
|
} |
|
|
} |
|
|
} else { |
|
|
if ($self->{<Q::DOMCore:name>} eq 'a' or |
|
|
($cis and lc ($self->{<Q::DOMCore:name>}) eq 'a')) { |
|
|
return true |
|
|
if $self->{<Q::infoset:attributes>} |
|
|
->{<Q::ManakaiDOM:noNS>}->{name} or |
|
|
$self->{<Q::infoset:attributes>} |
|
|
->{<Q::null:>}->{name}; |
|
|
} |
|
1766 |
} |
} |
1767 |
return false; |
return false; |
1768 |
}; |
\#line 1 "DOMHTML.ManakaiDOMHTMLElement.getAnchors.#2" |
1769 |
|
}; |
1770 |
__DEEP{ |
__DEEP{ |
1771 |
$r = $node-><M::ManakaiDOM:ManakaiDOMNodeObject.newReference> |
$r = $self->{<Q::TreeCore:node>} |
1772 |
|
-><M::ManakaiDOM:ManakaiDOMNodeObject |
1773 |
|
::ManakaiDOM:Perl.newReference> |
1774 |
(<ClassName::ManakaiDOMHTMLCollection>); |
(<ClassName::ManakaiDOMHTMLCollection>); |
1775 |
}__; |
}__; |
1776 |
$r->{<Q::ManakaiDOMCore:nodeMatch>} = $chk; |
$r->{<Q::ManakaiDOMCore:nodeMatch>} = $chk; |
1777 |
|
|
1778 |
@Attr: |
@Attr: |
1779 |
@@Name: cookie |
@@Name: cookie |
1780 |
@@Description: |
@@Description: |
1942 |
@@@Description: |
@@@Description: |
1943 |
@@@@lang:en |
@@@@lang:en |
1944 |
@@@@@:The matching element. |
@@@@@:The matching element. |
1945 |
|
@@@disDef: |
1946 |
|
@@@@DISPerl:cloneCode: |
1947 |
|
DOMCore:ManakaiDOMElement::ManakaiDOM:ManakaiDOMLatest.getElementById |
1948 |
@@DOMMain:implementFeature: |
@@DOMMain:implementFeature: |
1949 |
HTMLFeature10 |
HTMLFeature10 |
1950 |
@@For: |
@@For: |
2082 |
An HTML element. All specific HTML element interfaces |
An HTML element. All specific HTML element interfaces |
2083 |
are derived from this interface. |
are derived from this interface. |
2084 |
|
|
2085 |
@@ElementType: |
@s:elementType: |
2086 |
|
@@@: |
2087 |
|
AnyHTMLElement::ForHTML40SE |
2088 |
|
@@ForCheck: |
2089 |
|
ManakaiDOM:DOM1 !ManakaiDOM:DOM2 |
2090 |
|
@s:elementType: |
2091 |
|
@@@: |
2092 |
|
AnyHTMLElement::ForHTML401 |
2093 |
|
@@ForCheck: |
2094 |
|
ManakaiDOM:DOM2 |
2095 |
|
@s:elementType: |
2096 |
|
@@@: |
2097 |
|
AnyHTMLElement::ForXHTML10SE |
2098 |
|
@@ForCheck: |
2099 |
|
ManakaiDOM:DOM2 |
2100 |
|
|
2101 |
|
@ImplNote: |
2102 |
@@QName: |
@@QName: |
2103 |
xhtml1:sub |
xhtml1:sub |
2104 |
\##TODO: rewrite this |
\##TODO: rewrite this |
2129 |
@@html-element-type:noscript |
@@html-element-type:noscript |
2130 |
@@html-element-type:address |
@@html-element-type:address |
2131 |
@@html-element-type:center |
@@html-element-type:center |
2132 |
@@ElementType: |
|
|
@@QName: |
|
|
xhtml1:* |
|
2133 |
@ImplNote: |
@ImplNote: |
2134 |
@@lang:en |
@@lang:en |
2135 |
@@@: |
@@@: |
2139 |
|
|
2140 |
@Attr: |
@Attr: |
2141 |
@@Name: id |
@@Name: id |
2142 |
@@DocAttr: |
@@DocAttr1: |
2143 |
@@@QName:id |
id::HTML40SE |
2144 |
@@@ElementType: |
@@DocAttr2S: |
2145 |
xhtml1:* |
id::HTML401 |
2146 |
|
@@DocAttr2X: |
2147 |
|
id::XHTML10SE |
2148 |
@@Get: |
@@Get: |
2149 |
@@@Type: DOMString |
@@@Type: DOMString |
2150 |
@@Set: |
@@Set: |
2155 |
Some element in HTML 4/XHTML 1.0 does not have <HA:class> attribute. |
Some element in HTML 4/XHTML 1.0 does not have <HA:class> attribute. |
2156 |
@Attr: |
@Attr: |
2157 |
@@Name: title |
@@Name: title |
2158 |
@@DocAttr: |
@@DocAttr1: |
2159 |
@@@QName:title |
title::HTML40SE |
2160 |
@@@ElementType: |
@@DocAttr2S: |
2161 |
xhtml1:* |
title::HTML401 |
2162 |
|
@@DocAttr2X: |
2163 |
|
title::XHTML10SE |
2164 |
@@Get: |
@@Get: |
2165 |
@@@Type: DOMString |
@@@Type: DOMString |
2166 |
@@Set: |
@@Set: |
2171 |
Some element in HTML 4/XHTML 1.0 does not have <HA:class> attribute. |
Some element in HTML 4/XHTML 1.0 does not have <HA:class> attribute. |
2172 |
@Attr: |
@Attr: |
2173 |
@@Name: lang |
@@Name: lang |
2174 |
@@DocAttr: |
@@DocAttr1: |
2175 |
@@@QName:lang |
lang::HTML40SE |
2176 |
@@@ElementType: |
@@DocAttr2S: |
2177 |
xhtml1:* |
lang::HTML401 |
2178 |
@@@DeprecatedBy: |
@@DocAttr2X: |
2179 |
DOMHTML:XHTML1.0 |
lang::XHTML10SE |
2180 |
@@Get: |
@@Get: |
2181 |
@@@Type: DOMString |
@@@Type: DOMString |
2182 |
@@Set: |
@@Set: |
2187 |
Some element in HTML 4/XHTML 1.0 does not have <HA:class> attribute. |
Some element in HTML 4/XHTML 1.0 does not have <HA:class> attribute. |
2188 |
@Attr: |
@Attr: |
2189 |
@@Name: dir |
@@Name: dir |
2190 |
@@DocAttr: |
@@DocAttr1: |
2191 |
@@@ElementType: |
dir::HTML40SE |
2192 |
xhtml1:* |
@@DocAttr2S: |
2193 |
@@@QName:dir |
dir::HTML401 |
2194 |
|
@@DocAttr2X: |
2195 |
|
dir::XHTML10SE |
2196 |
@@Get: |
@@Get: |
2197 |
@@@Type: DOMString |
@@@Type: DOMString |
2198 |
@@Set: |
@@Set: |
2203 |
Some element in HTML 4/XHTML 1.0 does not have <HA:class> attribute. |
Some element in HTML 4/XHTML 1.0 does not have <HA:class> attribute. |
2204 |
@Attr: |
@Attr: |
2205 |
@@Name: className |
@@Name: className |
2206 |
@@DocAttr: |
@@DocAttr1: |
2207 |
@@@ElementType: |
class::HTML40SE |
2208 |
xhtml1:* |
@@DocAttr2S: |
2209 |
@@@QName:class |
class::HTML401 |
2210 |
|
@@DocAttr2X: |
2211 |
|
class::XHTML10SE |
2212 |
@@Get: |
@@Get: |
2213 |
@@@Type: DOMString |
@@@Type: DOMString |
2214 |
@@Set: |
@@Set: |
2225 |
for future use. It is used later in DOM Level 2 CSS Module. |
for future use. It is used later in DOM Level 2 CSS Module. |
2226 |
##IF:HTMLElement |
##IF:HTMLElement |
2227 |
|
|
2228 |
|
ElementTypeBinding: |
2229 |
|
@Name: DocAttr1 |
2230 |
|
@ElementType: |
2231 |
|
dis:DocAttr |
2232 |
|
@ShadowContent: |
2233 |
|
@@ForCheck: |
2234 |
|
ManakaiDOM:DOM1 !ManakaiDOM:DOM2 |
2235 |
|
ElementTypeBinding: |
2236 |
|
@Name: DocAttr2S |
2237 |
|
@ElementType: |
2238 |
|
dis:DocAttr |
2239 |
|
@ShadowContent: |
2240 |
|
@@ForCheck: |
2241 |
|
ManakaiDOM:DOM2 |
2242 |
|
ElementTypeBinding: |
2243 |
|
@Name: DocAttr2X |
2244 |
|
@ElementType: |
2245 |
|
dis:DocAttr |
2246 |
|
@ShadowContent: |
2247 |
|
@@ForCheck: |
2248 |
|
ManakaiDOM:DOM2 |
2249 |
|
|
2250 |
|
ResourceDef: |
2251 |
|
@QName: AnyHTMLElement |
2252 |
|
@enDesc: |
2253 |
|
Any HTML element types. |
2254 |
|
@rdf:type: |
2255 |
|
s:AnyElementInNS |
2256 |
|
@AppName: |
2257 |
|
@@@: |
2258 |
|
xhtml1:* |
2259 |
|
@@ContentType: |
2260 |
|
dis:TypeQName |
2261 |
|
@ForCheck: ForHTML |
2262 |
|
|
2263 |
|
## TODO: Move to attribute set |
2264 |
|
|
2265 |
|
@AttrDef: |
2266 |
|
@@QName: dir |
2267 |
|
@AttrDef: |
2268 |
|
@@QName: id |
2269 |
|
@AttrDef: |
2270 |
|
@@QName: lang |
2271 |
|
@@DeprecatedBy: |
2272 |
|
DOMHTML:XHTML1.0 |
2273 |
|
@AttrDef: |
2274 |
|
@@QName: class |
2275 |
|
@AttrDef: |
2276 |
|
@@QName: title |
2277 |
|
|
2278 |
|
ElementTypeBinding: |
2279 |
|
@Name: AttrDef |
2280 |
|
@ElementType: |
2281 |
|
dis:ResourceDef |
2282 |
|
@ShadowContent: |
2283 |
|
@@rdf:type: |
2284 |
|
s:Attribute |
2285 |
|
|
2286 |
|
ResourceDef: |
2287 |
|
@QName: isHTMLElement |
2288 |
|
@rdf:type: |
2289 |
|
dis2pm:InlineCode |
2290 |
|
@enDesc: |
2291 |
|
Tests whether this is an HTML element of the given type or not. |
2292 |
|
@Param: |
2293 |
|
@@Name: elementNode |
2294 |
|
@@Type: |
2295 |
|
DOMCore:Element |
2296 |
|
@@enDesc: |
2297 |
|
The element node to test. |
2298 |
|
@Param: |
2299 |
|
@@Name: elementType |
2300 |
|
@@Type: |
2301 |
|
DOMMain:DOMString |
2302 |
|
@@enDesc: |
2303 |
|
The element type name to test. |
2304 |
|
@PerlDef: |
2305 |
|
do { |
2306 |
|
my $__ln = $elementNode->{<Q::TreeCore:node>} |
2307 |
|
->{<Q::infoset:localName>}; |
2308 |
|
if (defined $__ln) { ## Namespace-aware node |
2309 |
|
my $__ns = $elementNode->{<Q::TreeCore:node>} |
2310 |
|
->{<Q::infoset:namespaceName>}; |
2311 |
|
if ($__ns eq <Q::xhtml1:> or |
2312 |
|
(not defined $__ns and |
2313 |
|
$elementNode->{<Q::TreeCore:node>}->{<Q::DOMCore:hasFeature>} |
2314 |
|
->{HTML})) { |
2315 |
|
$elementType eq $__ln ? true : false; |
2316 |
|
} else { |
2317 |
|
false; |
2318 |
|
} |
2319 |
|
} elsif ($elementNode->{<Q::TreeCore:node>}->{<Q::DOMCore:hasFeature>} |
2320 |
|
->{HTML}) { |
2321 |
|
if ($elementNode->{<Q::TreeCore:node>}->{<Q::DOMCore:hasFeature>} |
2322 |
|
->{XML}) { |
2323 |
|
$elementType eq $elementNode-><AG::DOMCore:Node.nodeName> |
2324 |
|
? true : false; |
2325 |
|
} else { |
2326 |
|
$elementType eq lc ($elementNode-><AG::DOMCore:Node.nodeName>) |
2327 |
|
? true : false; |
2328 |
|
} |
2329 |
|
} else { |
2330 |
|
false; |
2331 |
|
} |
2332 |
|
} |
2333 |
|
|
2334 |
|
ResourceDef: |
2335 |
|
@QName: isHTMLElemento |
2336 |
|
@rdf:type: |
2337 |
|
dis2pm:InlineCode |
2338 |
|
@enDesc: |
2339 |
|
Tests whether this is an HTML element of the given type or not. |
2340 |
|
@Param: |
2341 |
|
@@Name: elementNodeo |
2342 |
|
@@Type: |
2343 |
|
ManakaiDOM:ManakaiDOMNodeObject::ManakaiDOM:Perl |
2344 |
|
@@enDesc: |
2345 |
|
The element node to test. |
2346 |
|
@Param: |
2347 |
|
@@Name: elementType |
2348 |
|
@@Type: |
2349 |
|
DOMMain:DOMString |
2350 |
|
@@enDesc: |
2351 |
|
The element type name to test. |
2352 |
|
@PerlDef: |
2353 |
|
do { |
2354 |
|
my $__ln = $elementNodeo->{<Q::infoset:localName>}; |
2355 |
|
if (defined $__ln) { ## Namespace-aware node |
2356 |
|
my $__ns = $elementNodeo->{<Q::infoset:namespaceName>}; |
2357 |
|
if ($__ns eq <Q::xhtml1:> or |
2358 |
|
(not defined $__ns and |
2359 |
|
$elementNodeo->{<Q::DOMCore:hasFeature>} |
2360 |
|
->{HTML})) { |
2361 |
|
$elementType eq $__ln ? true : false; |
2362 |
|
} else { |
2363 |
|
false; |
2364 |
|
} |
2365 |
|
} elsif ($elementNodeo->{<Q::DOMCore:hasFeature>} |
2366 |
|
->{HTML}) { |
2367 |
|
my $elClass = <ClassName::DOMCore:ManakaiDOMElement>; |
2368 |
|
my $elementNode = <Code::ManakaiNode:getWeakRef |
2369 |
|
||ManakaiDOM:Perl:: |
2370 |
|
$object = $elementNodeo, |
2371 |
|
$class = $elClass, |
2372 |
|
>; |
2373 |
|
if ($elementNodeo->{<Q::DOMCore:hasFeature>} |
2374 |
|
->{XML}) { |
2375 |
|
$elementType eq $elementNode-><AG::DOMCore:Node.nodeName> |
2376 |
|
? true : false; |
2377 |
|
} else { |
2378 |
|
$elementType eq lc ($elementNode-><AG::DOMCore:Node.nodeName>) |
2379 |
|
? true : false; |
2380 |
|
} |
2381 |
|
} else { |
2382 |
|
false; |
2383 |
|
} |
2384 |
|
} |
2385 |
|
|
2386 |
|
|
2387 |
|
ElementTypeBinding: |
2388 |
|
@Name: enDesc |
2389 |
|
@ElementType: |
2390 |
|
dis:Description |
2391 |
|
@ShadowContent: |
2392 |
|
@@lang:en |
2393 |
|
|
2394 |
ET: |
ET: |
2395 |
@ETQName: |
@ETQName: |
2396 |
xhtml1:html |
xhtml1:html |
2561 |
@@@@ContentType: |
@@@@ContentType: |
2562 |
lang:dis |
lang:dis |
2563 |
@@@@DISPerl:cloneCode: |
@@@@DISPerl:cloneCode: |
2564 |
DOMCore:ManakaiDOMNode::ManakaiDOM:ManakaiDOMLatest.getTextContent |
DOMCore:ManakaiDOMNode::ManakaiDOM:ManakaiDOMLatest.textContent.get |
2565 |
@@Set: |
@@Set: |
2566 |
@@@Type: DOMString |
@@@Type: DOMString |
2567 |
@@@Def: |
@@@Def: |
2568 |
@@@@ContentType: |
@@@@ContentType: |
2569 |
lang:dis |
lang:dis |
2570 |
@@@@DISPerl:cloneCode: |
@@@@DISPerl:cloneCode: |
2571 |
DOMCore:ManakaiDOMNode::ManakaiDOM:ManakaiDOMLatest.setTextContent |
DOMCore:ManakaiDOMNode::ManakaiDOM:ManakaiDOMLatest.textContent.set |
2572 |
##IF:HTMLTitleElement |
##IF:HTMLTitleElement |
2573 |
|
|
2574 |
ET: |
ET: |
2679 |
@@@@@lang:en |
@@@@@lang:en |
2680 |
@@@@@@: |
@@@@@@: |
2681 |
This element is not within the context of a form. |
This element is not within the context of a form. |
2682 |
|
@@@disDef: |
2683 |
|
@@@@DISLang:nop: |
2684 |
@ATTR: |
@ATTR: |
2685 |
@@Name: prompt |
@@Name: prompt |
2686 |
@@Deprecated: |
@@Deprecated: |
2690 |
@@@Type: DOMString |
@@@Type: DOMString |
2691 |
|
|
2692 |
ElementTypeBinding: |
ElementTypeBinding: |
2693 |
|
@Name: disDef |
2694 |
|
@ElementType: |
2695 |
|
dis:Def |
2696 |
|
@ShadowContent: |
2697 |
|
@@ContentType: |
2698 |
|
lang:dis |
2699 |
|
|
2700 |
|
ElementTypeBinding: |
2701 |
@Name: ETQName |
@Name: ETQName |
2702 |
@ElementType: |
@ElementType: |
2703 |
dis:QName |
dis:AppName |
2704 |
@ShadowContent: |
@ShadowContent: |
2705 |
@@ForCheck: |
@@ForCheck: |
2706 |
s:ForML |
s:ForML |
2707 |
|
@@ContentType: |
2708 |
|
dis:TypeQName |
2709 |
|
|
2710 |
ElementTypeBinding: |
ElementTypeBinding: |
2711 |
@Name: IFQName |
@Name: IFQName |
2712 |
@ElementType: |
@ElementType: |
2785 |
@@Set: |
@@Set: |
2786 |
@@@Type: DOMString |
@@@Type: DOMString |
2787 |
|
|
2788 |
|
PropDef: |
2789 |
|
@QName: disabled |
2790 |
|
@enDesc: |
2791 |
|
<A::.disabled>. |
2792 |
|
|
2793 |
ElementTypeBinding: |
ElementTypeBinding: |
2794 |
@Name: DOMAName |
@Name: DOMAName |
2795 |
@ElementType: |
@ElementType: |
3186 |
IFDef: |
IFDef: |
3187 |
@Name:HTMLBlockquoteElement |
@Name:HTMLBlockquoteElement |
3188 |
@ISA:HTMLElement |
@ISA:HTMLElement |
3189 |
@ElementType: |
@s:elementType: |
3190 |
xhtml1:blockquote::ForHTML40SE |
xhtml1:blockquote::ForHTML40SE |
3191 |
@Description: |
@Description: |
3192 |
@@lang:en |
@@lang:en |
3304 |
@@@Type: DOMString |
@@@Type: DOMString |
3305 |
@@Set: |
@@Set: |
3306 |
@@@Type: DOMString |
@@@Type: DOMString |
3307 |
@Attr: |
@ATTR: |
3308 |
@@Name: face |
@@Name: face |
3309 |
@@Deprecated: |
@@Deprecated: |
|
@@DocAttr: |
|
3310 |
@@Get: |
@@Get: |
3311 |
@@@Type: DOMString |
@@@Type: DOMString |
3312 |
@@Set: |
@@Set: |
3362 |
@@@Type: DOMString |
@@@Type: DOMString |
3363 |
@@Set: |
@@Set: |
3364 |
@@@Type: DOMString |
@@@Type: DOMString |
3365 |
@Attr: |
@ATTR: |
3366 |
@@Name: face |
@@Name: face |
3367 |
@@Deprecated: |
@@Deprecated: |
3368 |
@@Get: |
@@Get: |
3369 |
@@@Type: DOMString |
@@@Type: DOMString |
3370 |
@@Set: |
@@Set: |
3371 |
@@@Type: DOMString |
@@@Type: DOMString |
3372 |
@Attr: |
@ATTR: |
3373 |
@@Name: size |
@@Name: size |
3374 |
@@Deprecated: |
@@Deprecated: |
3375 |
@@ImplNote: |
@@ImplNote: |
3972 |
##IF:HTMLObjectElement |
##IF:HTMLObjectElement |
3973 |
|
|
3974 |
PropDef: |
PropDef: |
3975 |
|
@QName: referrer |
3976 |
|
@enDesc: |
3977 |
|
<A::HTMLDocument.referrer>. |
3978 |
|
|
3979 |
|
PropDef: |
3980 |
@QName: contentDocument |
@QName: contentDocument |
3981 |
@Type: |
@Type: |
3982 |
ManakaiDOMCore:ManakaiDOMNodeObjectNode::ManakaiDOM:ManakaiDOMCommon |
ManakaiDOMCore:ManakaiDOMNodeObjectNode::ManakaiDOM:ManakaiDOMCommon |
4151 |
@@@Type: DOMString |
@@@Type: DOMString |
4152 |
##IF:HTMLAppletElement |
##IF:HTMLAppletElement |
4153 |
|
|
4154 |
|
ResourceDef: |
4155 |
|
@QName: |
4156 |
|
DOMMain:long |
4157 |
|
@AliasFor: |
4158 |
|
DOMMain:long::ManakaiDOM:all |
4159 |
|
@ForCheck: |
4160 |
|
!=ManakaiDOM:all |
4161 |
|
|
4162 |
ET: |
ET: |
4163 |
@ETQName: |
@ETQName: |
4164 |
xhtml1:map |
xhtml1:map |