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

add 'export default VSS ' #154

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

add 'export default VSS ' #154

wants to merge 1 commit into from

Conversation

misaya
Copy link

@misaya misaya commented Aug 11, 2020

export default VSS , for SPA using.

export default VSS , for SPA using.
@misaya
Copy link
Author

misaya commented Aug 11, 2020

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());
});

@igormcsouza
Copy link

igormcsouza commented Mar 10, 2021

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

@misaya
Copy link
Author

misaya commented Mar 11, 2021

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.

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.

2 participants