modify data attribute dynamically of object tag not working
See original GitHub issue<!DOCTYPE html>
<html>
<head>
<title></title>
<meta charset="utf-8" />
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.2.2/jquery.min.js"></script>
<script>
$(document).ready(function () {
$('#doc').prop('data', 'anotherDocument.pdf');
});
</script>
</head>
<body>
<object id="doc" type="application/pdf" data="document.pdf" width="500px" height="500px"></object>
</body>
</html>
Issue Analytics
- State:
- Created 7 years ago
- Reactions:1
- Comments:9 (6 by maintainers)
Top Results From Across the Web
data attribute of object tag in html is not updating the new url
Issue: I am trying to update the data ...
Read more >Changing <object> tag element's data property dynamically
Hi All, I am looking for a way to change and load a HTTP resource in a element. I have code like the...
Read more >HTMLElement.dataset - Web APIs | MDN
An HTML data-* attribute and its corresponding DOM dataset.property modify their shared name according to where they are read or written:.
Read more ><OBJECT> tag doesn't reload after change DATA param.
What steps will reproduce the problem? 1. Download the attachments to a folder; 2. Open main.html; 3. Click on button ' ...
Read more >How to specify URL of resource to be used by the object in ...
It can be done by setting the data attribute to the specified URL in the <object> tag. Syntax: <object data="URL">. Possible Values.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Here’s a simple example that reproduces the problem on Edge 38.14393.0.0, EdgeHTML 14.14393:
Plunkr
The Plunkr properly displays the PDF file on Chrome and FF, but on Edge the object element stays blank.
Duplicate of #881