-
Notifications
You must be signed in to change notification settings - Fork 39
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
how to use init options usePlatformScripts
and usePlatformStyles
like vss-web-extension-sdk?
#30
Comments
This sdk doesn't support those options. (Disclaimer: I'm not affiliated with MS and this answer is only based on experimenting) |
Thanks, @FlexiGit . I got it when I know the new sdk more. It works in most case, But some case is not work very well. I encounter a question: how to use Bowtie font or others static resouces? Here is my temporary solution: async function loadBowtieFont() {
const origins = location.ancestorOrigins;
if (origins.length) {
const css = `@font-face {
font-family: 'Bowtie';
src: url('${origins[0]}/_static/tfs/Dev17.M153.5/_content/Fonts/Icons/bowtie.woff') format('woff');
}`,
head = document.head || document.getElementsByTagName('head')[0],
style = document.createElement('style');
head.appendChild(style);
style.type = 'text/css';
style.appendChild(document.createTextNode(css));
}
} Maybe CDN is better solution? |
Maybe you could have a look at azure-devops-extension-sample. |
I had learned azure-devops-extension-sample. It package static resources into extension, but I think it's overstaffed as common resources. Moreover, according to #17, it's impossible to develop dashboard widget with new sdk. So I decided to develop dashboard widget with old sdk. |
@yunsii checkout my comment over here: #22 (comment) Just opened a PR for the integration between both since it's a reoccurring problem. |
No description provided.
The text was updated successfully, but these errors were encountered: