Skip to content
This repository has been archived by the owner on Jun 24, 2023. It is now read-only.

New metaquery api #25

Merged
merged 5 commits into from Jul 19, 2014
Merged

Conversation

CaseyLeask
Copy link
Contributor

Currently a work in progress

template = el.getAttribute( 'data-mq-src' );

if ( template ) {
el.src = template.replace( '[breakpoint]', matches.join('-') );
Copy link
Owner

Choose a reason for hiding this comment

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

What order will the matches be returned in? Order of <meta> source order appearance? Hmmm…

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 believe so? It's the same as the old version, but the answer might differ between browsers.

Currently going through https://developer.mozilla.org/en-US/docs/Web/API/document.getElementsByTagName and seeing if I can work it out.

Copy link
Owner

Choose a reason for hiding this comment

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

Sounds reasonable…

@benschwarz
Copy link
Owner

Hmm. This is just a collection of the other PRs, right?

@CaseyLeask
Copy link
Contributor Author

Nope. I've rebased the PR to show the changes a little more clearly.

At the moment the changes are

  • Using ES5 to simplify the code a little
  • Adding metaquery-images.js to the minify process
  • Some minor refactoring

@benschwarz benschwarz merged commit d35ae31 into benschwarz:master Jul 19, 2014
@CaseyLeask CaseyLeask deleted the new-metaquery-api branch July 20, 2014 00:44
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants