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

fix(constant): remove dependency on $sniffer #9875

Merged
merged 1 commit into from Oct 21, 2016

Conversation

crisbeto
Copy link
Member

The $mdConstant service uses Angular's $sniffer service to determine the browser's prefix via the vendorPrefix.
vendorPrefix was removed with angular/angular.js@35482ba.
These changes provide the same functionality, without depending on $sniffer. They also fix the current CI failures.


var vendorPrefix = $sniffer.vendorPrefix;
var prefixTestEl = document.createElement('div');
var vendorPrefix = getVendorPrefix();
Copy link
Contributor

Choose a reason for hiding this comment

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

Plz use getVendorPrefix( prefixTestEl );

Copy link
Member Author

Choose a reason for hiding this comment

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

Done. Also added it to hasStyleProperty.

The `$mdConstant` service uses Angular's `$sniffer` service to determine the browser's prefix via the `vendorPrefix`.
`vendorPrefix` was removed with angular/angular.js@35482ba.
These changes provide the same functionality, without depending on `$sniffer`. They also fix the current CI failures.
@crisbeto crisbeto added the needs: review This PR is waiting on review from the team label Oct 20, 2016
return match[0];
}
}
}
Copy link
Contributor

Choose a reason for hiding this comment

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

what is returned if not a match? "" ?

Copy link
Member Author

Choose a reason for hiding this comment

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

It's undefined. That's what got returned before as well.

@ThomasBurleson ThomasBurleson added needs: presubmit and removed needs: review This PR is waiting on review from the team labels Oct 20, 2016
@ThomasBurleson ThomasBurleson added this to the 1.1.2 milestone Oct 20, 2016
@jelbourn jelbourn merged commit c1eceaf into angular:master Oct 21, 2016
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

3 participants