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

core(artifacts): add property attribute to MetaElements #9978

Merged
merged 5 commits into from
Nov 20, 2019
Merged

core(artifacts): add property attribute to MetaElements #9978

merged 5 commits into from
Nov 20, 2019

Conversation

roelfjan
Copy link
Contributor

Summary
The MetaElements artifacts contains now also de meta element attribute property. Now only the name attribute was present. The property attribute is often use by Open Graph meta tags. More information about property: https://stackoverflow.com/questions/22350105/whats-the-difference-between-meta-name-and-meta-property

Related Issues/PRs
Fixes #9964

@connorjclark
Copy link
Collaborator

looks good, thanks!

could you also add a meta element to one of our smoke tests (dbw is fine)? and then in dbw-expectatiosn, an assertion on MetaElements

@roelfjan
Copy link
Contributor Author

@connorjclark Thanks for the tip, fixed it!

Copy link
Collaborator

@connorjclark connorjclark left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

one last thing then we can merge. thanks for the pr!

@@ -25,6 +25,7 @@ class MetaElements extends Gatherer {
return {
name: meta.name.toLowerCase(),
content: meta.content,
property: meta.attributes.property ? meta.attributes.property.value : '',
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this should be undefined instead of '' when not found

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was in doubt about this, because content is '', also if it's not defined. So I kept it in line. But since property isn't in the HTML5 spec, I understand your comment as well.

@connorjclark connorjclark changed the title core: added property attribute to MetaElements core(artifacts): add property attribute to MetaElements Nov 20, 2019
@connorjclark connorjclark merged commit d268381 into GoogleChrome:master Nov 20, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add all element attributes for the MetaElements artifacts
3 participants