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

New Operation: Meta #198

neocotic opened this issue May 17, 2013 · 2 comments

New Operation: Meta #198

neocotic opened this issue May 17, 2013 · 2 comments


Copy link

User Yuriy Zubarev has suggested that HTML meta tag information is accessible in templates. This is a great idea and I hope to include it in the next release.

The string that is passed into the new meta operation will be used to get the value of the content attribute for the element with a matching name or http-equiv attribute, since it should have exactly one of them according to the w3c HTML5 documentation (ignoring the charset attribute - the characterSet standard variable deals with that). The argument will not be case sensitive.



<meta name="description" content="The homepage for the Template browser extension">
<meta http-equiv="Refresh" content="5; url=">




The homepage for the Template browser extension
5; url=

Brain dump

Since this operation will need to interact with the DOM it probably makes sense for to return a key/value map (all keys in lower case) for all applicable meta tags and to then add the meta operation function to the data object which will still be in scope to access the map.

Also, since it's interacting with the content script, this operation will not run on protected pages.

@ghost ghost assigned neocotic May 17, 2013
Copy link
Member Author

I've decided that I'm also going to support the unofficial 'property' attribute for the meta element. This is in no way supported by W3C as far as I know, but a lot of libraries/frameworks use this so I thought I'd at least support it as the final fallback. It will be ignored if either a name or http-equiv attribute exists.

Copy link
Member Author

The new meta operation has been implemented by neocotic/template-chrome#3.

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

No branches or pull requests

1 participant