Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

User Settings Being Overridden by <template> settings #87

Closed
snuggs opened this issue Jul 6, 2017 · 5 comments
Closed

User Settings Being Overridden by <template> settings #87

snuggs opened this issue Jul 6, 2017 · 5 comments

Comments

@snuggs
Copy link
Member

snuggs commented Jul 6, 2017

TL;DR; User attribute settings should take prescedence over template defaults.

This issue effects Attributes defined on a custom element within the master document being overridden by template defaults.

Example

Master Document

<link rel=import href=foo-bar.html>

<foo-bar title='I want my title'></foo-bar>

Imported Document

<template title='This is the template title'></template>

<script>
Element `foo-bar`
  (class extends HTMLElement {})
</script>

Resulting Master Document

<link rel=import href=foo-bar.html>

<foo-bar title='This is the template title'></foo-bar>

Expected Master Document

<foo-bar title='I want my title'></foo-bar>
@brandondees
Copy link
Collaborator

we gotta have a test case covering this, it's super fundamentally important to preserve

@snuggs
Copy link
Member Author

snuggs commented Jul 6, 2017

Seems like this is going to be difficult @brandondees as there is no support...yet...

Had an issue closed down jsdom/jsdom#1900
And didn't realize already had an issue open. jsdom/jsdom#1030 (comment)
And currently a PR gaining some traction jsdom/jsdom#1872

@brandondees
Copy link
Collaborator

the test case is difficult, or the implementation? if JSDOM doesn't implement specs that's not our problem, we can test on headless chrome or whatever else.

@snuggs
Copy link
Member Author

snuggs commented Jul 6, 2017

You've got a point @brandondees ... 🤔

@snuggs
Copy link
Member Author

snuggs commented Jul 7, 2017

Fixed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants