Closed Bug 164979 Opened 22 years ago Closed 12 years ago

Implement declare attribute for object tag

Categories

(Core Graveyard :: Plug-ins, defect, P4)

defect

Tracking

(Not tracked)

RESOLVED WONTFIX
Future

People

(Reporter: anthonyd, Unassigned)

References

()

Details

(Keywords: html4, Whiteboard: [PL2:P4])

from the spec:
declare = "declare"
When present, this boolean attribute makes the current object element a
declaration only - not one that is to be executed until after the document has
completed loading.
 

To use this, you give the object tag an ID attribute, and then reference the ID
from an Anchor tag (or something) to turn the plugin 'on' and begin displaying
content.

There are probably several ways we can implement this, like we do the Hidden
attribute, or maybe block the plugin in layout and not laod it.  I am open to
suggestions on this about the best way to go.
Priority: -- → P4
Whiteboard: [PL2:P4]
Target Milestone: --- → mozilla1.2beta
Not an enhancement, as this blocks HTML4 conformance.
Blocks: html4.01
Severity: enhancement → normal
Keywords: html4
When, exactly, is the plugin supposed to turn "on"? After onLoad fires? Is the
anchor tag the only thing that can trigger this? What is the syntax for the
anchor tag? Does it happen on the achor's onClick event or when else?

The way it works now is that a plugin is started before onLoad fires and
therefore is scriptable from onLoad. Would a plugin only not be visible with
'declare' or would it be not be scriptable too (or play sound) until it was
turned 'on'?

One possible idea is to do this with style rules. Perhaps something like:
object[declare],[id] {
   display: none;  /* no scriptability, no sound, no plugin */
}
object[declare],[id] {
   visibility: hidden; /* started, but invisible */
   width: 0px;
   height: 0px;
}
Regrettably, this part of the HTML spec is pretty vague.

> When, exactly, is the plugin supposed to turn "on"? After onLoad fires?

At instantiation time, I think.

> Is the anchor tag the only thing that can trigger this?

No:

  An object defined with the declare attribute is instantiated
  every time an element that refers to that object requires it
  to be rendered (e.g., a link that refers to it is activated,
  an object that refers to it is activated, etc.).

So I suppose that means A, LINK, OBJECT, APPLET (for applets) and IMG (for images).

> What is the syntax for the anchor tag?

Again from the spec:

  <P><OBJECT declare
        id="earth.declaration" 
        data="TheEarth.mpeg" 
        type="application/mpeg">
   The <STRONG>Earth</STRONG> as seen from space.
  </OBJECT>
  ...later in the document...
  <P>A neat <A href="#earth.declaration"> animation of The Earth!</A>

> Does it happen on the achor's onClick event or when else?

I think that's the suggestion from the example. As I interpret it (and I
appreciate that a good deal is being left open to interpretation here), clicking
the link in that example would cause the browser to proceed to an animation. The
functional difference between the example and simply linking to a URI reference
to an MPEG is that the OBJECT-declare usage causes the resource to be pre-loaded.
Oh, and I think declared OBJECTs should not be scriptable at all; just
individual instantiations should be scriptable.
Braden is exactly correct on his interpretation of the spec. That is exactly how
declare is supposed to work.
moving to future
Target Milestone: mozilla1.2beta → Future
--->peterl
Assignee: anthonyd → peterlubczynski
I recommend WONTFIX; declare="" is being dropped fomr HTML5 and is woefully
underspecified in HTML4.
Assignee: peterlubczynski-bugs → nobody
QA Contact: shrir → plugins
This is dropped in HTML5 and isn't going to happen
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → WONTFIX
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.