Closed Bug 67096 Opened 24 years ago Closed 23 years ago

RFE: API for getting document's TITLE

Categories

(Core :: DOM: Core & HTML, enhancement)

enhancement
Not set
normal

Tracking

()

VERIFIED WORKSFORME
Future

People

(Reporter: roland.mainz, Assigned: jst)

References

Details

RFE: There should be a _simple_ API (function) which returns the page title for
a HTML document (or "Subject" header for mail/news messages).
Added reference for bug 6810 ("UNIX printing should set the correct title").
Blocks: 6810
where does this belong? first try.. HTMLElement.. obviously I'm not sure so
please reassign if needed (in browser-general it's not likely to get any
attention anyway)
Component: Browser-General → HTML Element
Assignee: asa → jst
Component: HTML Element → DOM Level 1
QA Contact: doronr → janc
DOM 1 maybe.
document.title does give you the title of a HTML document, is that what you're
asking for or would you need some other api?

Either way, I don't have any time to spend on this now. --> Future.
Target Milestone: --- → Future
> document.title does give you the title of a HTML document, is that what you're
> asking for or would you need some other api?

I am looking for the "title" which appears in the window's title (e.g. X11
windows) - that means:
- HTML: <head><title>blah-blah</title></head>
- MIME message's "subject" header value.
...and every other way how Mozilla sets the window's title.

It's somehow possible to set the window's title - I'd like to "get" a simple API
for the "reverse" way - to obtain the window's title perviously set...
Sounds like you're looking for window.title, that should work for you with any
window. Are you accessing this from JS or C++?
I'd like to get a string via C++ API (see bug 6810 and X11 print systems... all
plain ANSI C/C++) - X11 COMPOUND_TEXT if possible... do you have any code
examples ?
I don't have a pointer to code that does this but you wanto call the GetTitle()
method on an nsIDOMWindowInternal, you'll get the string as unicode so you'll
haveto do the conversion to X11 COMPOUND_TEXT. Since the API you need exists I'm
closing this bug as WORKSFORME (or, EXISTSFORME :-). Feel free to contact me in
email if you need more help with this.
Status: NEW → RESOLVED
Closed: 24 years ago
Resolution: --- → WORKSFORME
Component: DOM Level 1 → DOM HTML
Why has the component be changed to "DOM HTML" ? This bug asks to get the
window's title - including browser, email, editor, xmlterm and _all_ other kinds
of windows...
QA contact Update
QA Contact: janc → desale
Updating QA contact to Shivakiran Tummala.
QA Contact: desale → stummala
johnny, 
i do not think this is that important but i looked at nsIDOMWindowInternal
interface and did not find any public method called getTitle(). 
is it some other interface which has this method.


Status: RESOLVED → REOPENED
Resolution: WORKSFORME → ---
GetTitle() can be found in nsIDOMNSDocument, which is implemented by all our
document classes.

WORKSFORME.
Status: REOPENED → RESOLVED
Closed: 24 years ago23 years ago
Resolution: --- → WORKSFORME
(and it is also in nsIDOMWindowInternal, line 81)
Yes, but the one in nsIDOMWindowInternal will be deprecated soon, so don't use that.
exists. verified
Status: RESOLVED → VERIFIED
Component: DOM: HTML → DOM: Core & HTML
QA Contact: stummala → general
You need to log in before you can comment on or make changes to this bug.