Skip to content

Commit 6e8ae0d

Browse files
gnijuohzdevongovett
authored andcommitted
add support for data attr of object element (#1069)
1 parent 39e4f7a commit 6e8ae0d

4 files changed

Lines changed: 23 additions & 1 deletion

File tree

ā€Žsrc/assets/HTMLAsset.jsā€Ž

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,8 @@ const ATTRS = {
2424
srcset: ['img', 'source'],
2525
poster: ['video'],
2626
'xlink:href': ['use'],
27-
content: ['meta']
27+
content: ['meta'],
28+
data: ['object']
2829
};
2930

3031
// A list of metadata that should produce a dependency

ā€Žtest/html.jsā€Ž

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -534,4 +534,20 @@ describe('html', function() {
534534
]
535535
});
536536
});
537+
538+
it('should support data attribute of object element', async function() {
539+
let b = await bundle(__dirname + '/integration/html-object/index.html');
540+
541+
assertBundleTree(b, {
542+
name: 'index.html',
543+
assets: ['index.html'],
544+
childBundles: [
545+
{
546+
type: 'svg',
547+
assets: ['file.svg'],
548+
childBundles: []
549+
}
550+
]
551+
});
552+
});
537553
});
Lines changed: 3 additions & 0 deletions
Loading
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
<!DOCTYPE html>
2+
<object data="file.svg" type="image/svg+xml"></object>

0 commit comments

Comments
Ā (0)
⚔