News for hackers. Stuff that matters.
Re:Cool HTML elements nobody uses by statico on Monday October 03, 2022 @12:46PM (#33070059)
For some reason <object> makes me anxious. Is there some memory of the Flash/ActionScript days, or maybe ActiveX or something, that causes me to frown at seeing a mention of <object>?
Re:Cool HTML elements nobody uses by derefr on Monday October 03, 2022 @01:16PM (#33070573)
<object> is supposed to be for exposing modules from hosted runtimes into the host execution-context as, well, objects (in the OOP sense. Or the COM sense, I suppose.)

The original use-case would have been something like: imagine you code a game physics engine in Java, and deploy it as a Java applet. You can embed that physics engine into a page as an <object> — and then consume it as a local API using JavaScript embedded on the same page.

(And yes, this is almost certainly the real reason JavaScript is called "JavaScript." When it was created, it was precisely positioned as a glue language for consuming/driving Java-applet APIs!)

Java-applet-based APIs (and their Windows-proprietary ActiveX cousins) are dead, so there's no real reason to care about <object> any more. As long as the browser knows how to render the media if you navigate directly to its URL, you can just use an <iframe>.

Re:Cool HTML elements nobody uses by statico on Monday October 03, 2022 @01:38PM (#33070936)
Ah ha! It was Java applets that makes me dread seeing <object>/<embed> tags again. Gotta support IE, you know. Netscape will crash anyway.
Re:Cool HTML elements nobody uses by cantSpellSober on Monday October 03, 2022 @01:32PM (#33070839)
Probably, <object> to me will always be "the thing SWFObject used for rendering a Flash container"
Re:Cool HTML elements nobody uses by perilunar on Tuesday October 04, 2022 @03:32AM (#33077488)
<object> was often used for video and audio players as well as Flash, Shockwave, VRML and other plugins.

It's not needed anymore for audio or video — they have their own tags now — and plugins are dead.