4 ms·
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
by statico 4y ago
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>?
- derefr 4y ago<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>.
- statico 4y agoAh ha! It was Java applets that makes me dread seeing <object>/<embed> tags again. Gotta support IE, you know. Netscape will crash anyway.
- cantSpellSober 4y agoProbably, <object> to me will always be "the thing SWFObject used for rendering a Flash container"
- perilunar 4y ago<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.