Closed
Bug 67096
Opened 24 years ago
Closed 23 years ago
RFE: API for getting document's TITLE
Categories
(Core :: DOM: Core & HTML, enhancement)
Core
DOM: Core & HTML
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).
Reporter | ||
Comment 1•24 years ago
|
||
Added reference for bug 6810 ("UNIX printing should set the correct title").
Blocks: 6810
Comment 2•24 years ago
|
||
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
Updated•24 years ago
|
Assignee: asa → jst
Component: HTML Element → DOM Level 1
QA Contact: doronr → janc
Comment 3•24 years ago
|
||
DOM 1 maybe.
Assignee | ||
Comment 4•24 years ago
|
||
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
Reporter | ||
Comment 5•24 years ago
|
||
> 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...
Assignee | ||
Comment 6•24 years ago
|
||
Sounds like you're looking for window.title, that should work for you with any window. Are you accessing this from JS or C++?
Reporter | ||
Comment 7•24 years ago
|
||
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 ?
Assignee | ||
Comment 8•24 years ago
|
||
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
Updated•24 years ago
|
Component: DOM Level 1 → DOM HTML
Reporter | ||
Comment 9•24 years ago
|
||
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...
Comment 12•23 years ago
|
||
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 → ---
Assignee | ||
Comment 13•23 years ago
|
||
GetTitle() can be found in nsIDOMNSDocument, which is implemented by all our document classes. WORKSFORME.
Status: REOPENED → RESOLVED
Closed: 24 years ago → 23 years ago
Resolution: --- → WORKSFORME
Comment 14•23 years ago
|
||
(and it is also in nsIDOMWindowInternal, line 81)
Assignee | ||
Comment 15•23 years ago
|
||
Yes, but the one in nsIDOMWindowInternal will be deprecated soon, so don't use that.
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.
Description
•