vss-web-extension-sdk icon indicating copy to clipboard operation
vss-web-extension-sdk copied to clipboard

add 'export default VSS '

Open misaya opened this issue 4 years ago • 3 comments

export default VSS , for SPA using.

misaya avatar Aug 11 '20 11:08 misaya

so that you can use VSS in Vue.js SPA :

import Vue from 'vue';
import App from './App.vue';
import VueRouter from 'vue-router';
import RouterConfig from './router.config';
import './load.js';

import VSS from 'vss-web-extension-sdk/lib/VSS.SDK.js';

Vue.use(VueRouter);
Vue.config.productionTip = false;

new Vue({
  router: RouterConfig,
  render: (h) => h(App),
}).$mount('#app');

VSS.init();
VSS.ready(function() {
  var webContext = JSON.stringify(VSS.getWebContext());
  sessionStorage.setItem('vss_webcontext', webContext);
  console.log('getWebContext:', VSS.getWebContext());
});

misaya avatar Aug 11 '20 11:08 misaya

Man! That is what I need! :/ So bad there is no one to merge this! @misaya , it worked for u?

igormcsouza avatar Mar 10 '21 21:03 igormcsouza

Man! That is what I need! :/ So bad there is no one to merge this! @misaya , it worked for u?

yea , It worked , and used in one of microsoft mcs projects.

misaya avatar Mar 11 '21 01:03 misaya