Skip to content
Skip to link menu
Trinity API Reference
Trinity API Reference
khtml
khtml
khtml
dom
dom_element.h
1
/*
2
* This file is part of the DOM implementation for KDE.
3
*
4
* (C) 1999 Lars Knoll (knoll@kde.org)
5
*
6
* This library is free software; you can redistribute it and/or
7
* modify it under the terms of the GNU Library General Public
8
* License as published by the Free Software Foundation; either
9
* version 2 of the License, or (at your option) any later version.
10
*
11
* This library is distributed in the hope that it will be useful,
12
* but WITHOUT ANY WARRANTY; without even the implied warranty of
13
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14
* Library General Public License for more details.
15
*
16
* You should have received a copy of the GNU Library General Public License
17
* along with this library; see the file COPYING.LIB. If not, write to
18
* the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
19
* Boston, MA 02110-1301, USA.
20
*
21
* This file includes excerpts from the Document Object Model (DOM)
22
* Level 1 Specification (Recommendation)
23
* http://www.w3.org/TR/REC-DOM-Level-1/
24
* Copyright © World Wide Web Consortium , (Massachusetts Institute of
25
* Technology , Institut National de Recherche en Informatique et en
26
* Automatique , Keio University ). All Rights Reserved.
27
*
28
*/
29
#ifndef _DOM_ELEMENT_h_
30
#define _DOM_ELEMENT_h_
31
32
#include <dom/dom_node.h>
33
#include <dom/css_value.h>
34
35
#include <kdelibs_export.h>
36
37
namespace
DOM {
38
39
class
DOMString;
40
class
AttrImpl;
41
class
Element;
42
class
ElementImpl;
43
class
NamedAttrMapImpl;
44
class
DocumentImpl;
45
89
class
KHTML_EXPORT
Attr
:
public
Node
90
{
91
friend
class
Element
;
92
friend
class
Document
;
93
friend
class
DocumentImpl;
94
friend
class
HTMLDocument
;
95
friend
class
ElementImpl;
96
friend
class
NamedAttrMapImpl;
97
friend
class
AttrImpl;
98
99
public
:
100
Attr
();
101
Attr
(
const
Node
&other) :
Node
()
102
{(*this)=other;}
103
Attr
(
const
Attr
&other);
104
105
Attr
& operator = (
const
Node
&other);
106
Attr
& operator = (
const
Attr
&other);
107
108
~
Attr
();
109
114
DOMString
name()
const
;
115
147
bool
specified()
const
;
148
158
DOMString
value()
const
;
159
163
void
setValue(
const
DOMString
& );
164
171
Element
ownerElement()
const
;
172
173
protected
:
174
175
Attr
( AttrImpl *_impl );
176
};
177
178
class
NodeList
;
179
class
Attr
;
180
class
DOMString
;
181
210
class
KHTML_EXPORT
Element
:
public
Node
211
{
212
friend
class
Document
;
213
friend
class
HTMLDocument
;
214
// friend class AttrImpl;
215
friend
class
Attr
;
216
217
public
:
218
Element
();
219
Element
(
const
Node
&other) :
Node
()
220
{(*this)=other;}
221
Element
(
const
Element
&other);
222
223
Element
& operator = (
const
Node
&other);
224
Element
& operator = (
const
Element
&other);
225
226
~
Element
();
227
238
DOMString
tagName()
const
;
239
250
DOMString
getAttribute (
const
DOMString
&name );
251
279
void
setAttribute (
const
DOMString
&name,
const
DOMString
&value );
280
293
void
removeAttribute (
const
DOMString
&name );
294
305
Attr
getAttributeNode (
const
DOMString
&name );
306
332
Attr
setAttributeNode (
const
Attr
&newAttr );
333
350
Attr
removeAttributeNode (
const
Attr
&oldAttr );
351
364
NodeList
getElementsByTagName (
const
DOMString
&name );
365
380
NodeList
getElementsByTagNameNS (
const
DOMString
&namespaceURI,
381
const
DOMString
&localName );
382
398
DOMString
getAttributeNS (
const
DOMString
&namespaceURI,
399
const
DOMString
&localName );
400
439
void
setAttributeNS (
const
DOMString
&namespaceURI,
440
const
DOMString
&qualifiedName,
441
const
DOMString
&value );
442
460
void
removeAttributeNS (
const
DOMString
&namespaceURI,
461
const
DOMString
&localName );
462
476
Attr
getAttributeNodeNS (
const
DOMString
&namespaceURI,
477
const
DOMString
&localName );
478
504
Attr
setAttributeNodeNS (
const
Attr
&newAttr );
505
516
bool
hasAttribute(
const
DOMString
& name );
517
532
bool
hasAttributeNS (
const
DOMString
&namespaceURI,
533
const
DOMString
&localName );
534
541
CSSStyleDeclaration
style ( );
542
555
bool
contentEditable()
const
;
556
573
void
setContentEditable(
bool
enabled);
574
579
bool
isHTMLElement()
const
;
580
587
Element
form()
const
;
588
589
static
bool
khtmlValidAttrName(
const
DOMString
&name);
590
static
bool
khtmlValidPrefix(
const
DOMString
&name);
591
static
bool
khtmlValidQualifiedName(
const
DOMString
&name);
592
593
static
bool
khtmlMalformedQualifiedName(
const
DOMString
&name);
594
static
bool
khtmlMalformedPrefix(
const
DOMString
&name);
595
protected
:
596
Element
(ElementImpl *_impl);
597
};
598
599
}
//namespace
600
#endif
khtml
Skip menu "khtml"
Main Page
Namespace List
Class Hierarchy
Alphabetical List
Class List
File List
Namespace Members
Class Members
Related Pages
khtml
Skip menu "khtml"
arts
dcop
dnssd
interfaces
interface
library
kspeech
ktexteditor
kabc
kate
kcmshell
kdecore
kded
kdefx
kdeprint
kdesu
kdeui
kdoctools
khtml
kimgio
kinit
kio
bookmarks
httpfilter
kfile
kio
kioexec
kpasswdserver
kssl
kioslave
http
kjs
kmdi
kmdi
knewstuff
kparts
krandr
kresources
kspell2
kunittest
kutils
kwallet
libkmid
libkscreensaver