Documentation
Feedback
Guides
VTEX IO Apps

VTEX IO Apps
Advanced components
VTEX IO Sandbox Component
Official extension
Version: 0.5.1
Latest version: 0.5.1

{"base64":"  ","img":{"width":110,"height":20,"type":"svg","mime":"image/svg+xml","wUnits":"px","hUnits":"px","url":"https://img.shields.io/badge/all_contributors-0-orange.svg?style=flat-square"}}

Allows mounting arbitrary HTML content in extension points from the comfort and safety of an iframe.

Example block


_33
"sandbox.product": {
_33
"props": {
_33
"width": "200px",
_33
"height": "60px",
_33
"initialContent": "<script src='https://unpkg.com/jquery@3.3.1/dist/jquery.min.js'></script><h1 id='test'>initial</h1><script>function render(){ current = window.props.productQuery.product.items.findIndex(function(p){ return p.itemId === window.props.query.skuId }); if (current === -1) {current = 0}; $('#test').html(window.props.productQuery.product.items[current].sellers[0].commertialOffer.ListPrice)}; window.addEventListener('message', function(e){ console.log('got message in product', e.data, window.props); render();});</script>",
_33
"allowCookies": true
_33
}
_33
},
_33
"sandbox.order": {
_33
"props": {
_33
"width": "200px",
_33
"height": "60px",
_33
"initialContent": "<script>console.log('Current orderForm: ', window.props.orderForm)</script>",
_33
"allowCookies": true
_33
}
_33
},
_33
"sandbox#home": {
_33
"props": {
_33
"width": "200px",
_33
"height": "60px",
_33
"initialContent": "<h1 id='test'>home</h1><script>console.log(props, document.cookie); window.addEventListener('message', function(e){ console.log('got message in home', window.props) });</script>",
_33
"allowCookies": true
_33
}
_33
},
_33
"store.home": {
_33
"blocks": ["carousel#home", "shelf#home", "sandbox#home"]
_33
},
_33
"store.product": {
_33
"blocks": [
_33
"product-details#default",
_33
"sandbox#product"
_33
]
_33
},

See also
VTEX App Store
VTEX IO Apps