3 ms·
> Sure, you could put an <X3D> tag into a HTML document, but there's no `<img>` equivalent (like you can use with SVG) to load that content from another URI. Y
by dragonwriter 5y ago
> Sure, you could put an <X3D> tag into a HTML document, but there's no `<img>` equivalent (like you can use with SVG) to load that content from another URI.
Yes, there is, the HTML <object> tag.
https://www.web3d.org/x3d/content/HtmlObjectTagForX3d.html https://www.web3d.org/x3d/content/HtmlObjectTagForX3d.html
- bastawhiz 5y agoThe object tag is problematic because it has a single interface for every supported content type. Want to expose functionality? Can't, unless it's a param that is passed as a string. Having a dedicated element type enables it to be used in many ways (like drawing images to a canvas) that an object tag does not support. It's also hardly a case of NIH to update a spec with a more specific element than another one in the same spec. We've done this numerous times in the last decade. The object tag isn't an X3D concept.
- dragonwriter 5y ago> The object tag is problematic because it has a single interface for every supported content type. Want to expose functionality? Can't, unless it's a param that is passed as a string. On a markup level, that's true of any tag. On a functional level, it’s not true of <object>, as the tag expects supported functionality to be defined separately for every type. > Having a dedicated element type enables it to be used in many ways (like drawing images to a canvas) that an object tag does not support. There’d nothing preventing the handler for a media type from doing that.
- true_religion 5y agoYeah, if we all used object instead of image tags then you could just download an extension that filled in avif or webp and we could move forwards.
- shawnz 5y ago<object> is not a satisfactory equivalent for this <model> tag any more than it's a satisfactory equivalent for the <img> tag itself. <object> is semantically a superset of both.
- dragonwriter 5y ago> <object> is not a satisfactory equivalent for this <model> tag any more than it's a satisfactory equivalent for the <img> tag itself. The main reason for having both <img> and <object> is that <img> existed first, and removing tags is almost always a bad idea because it brraks existing sites. > <object> is semantically a superset of both. Yes, that's why given its existence, introducing new tags that offer a strict subset of its utility is unnecessary.
- shawnz 5y agoI think it's pretty clear that that is NOT the reason why <img> still exists. Otherwise, why not just discourage its use in favour of <object> while still retaining it for compatibility? But actually the opposite is true, <img> is encouraged because it is more semantically descriptive and provides image-specific features that couldn't reasonably be added to <object>. If this line of thinking actually matched what the W3C believed, then how can you explain the addition of ANY of the new tags, for example, in the HTML 5 specification, since we already have the most general cases covered with things like <object> and <div>? Following this to its logical conclusion, why not deprecate EVERY tag except those? Why have tags at all?