title: What parameters does shopify's 'OptionSelectors' actually need?
body: <p>I'm running circles here and I'm out of idea's/google searches. There are so many different examples but all seem to do something different or don't work. According to shopify, this is the <strong>only</strong> documentation I can find around using their API: <a href="https://shopify.dev/tutorials/customize-theme-use-products-with-multiple-options" rel="nofollow noreferrer">https://shopify.dev/tutorials/customize-theme-use-products-with-multiple-options</a></p>
  <p><a href="https://i.stack.imgur.com/nw1PA.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/nw1PA.png" alt="enter image description here" /></a></p>
  <p>A ghost object I see, no matter, more and more searches I still can't figure out what this parameter is supposed to be.</p>
  <p>I've attempted passing a json object of products as I've seen it done in various other theme examples:</p>
  <pre><code>  var product  = document.querySelector(&quot;[data-product-json]&quot;).innerHTML,
    product = JSON.parse(product || '{}');
    console.log(product);
    jQuery(function($) {
      new Shopify.OptionSelectors('productSelect-' + product.id, {
        product: product,
        onVariantSelected: selectCallback
        });
    });
  </code></pre>
  <p>The console log gives the correct object and json, nice.</p>
  <p>OptionSelectors errors out:</p>
  <pre><code>Uncaught TypeError: Cannot read property 'parentNode' of null
      at Shopify.OptionSelectors.replaceSelector (option_selection-fe6b72c2bbdd3369ac0bfefe8648e3c889efca213baefd4cfb0dd9363563831f.js:1)
      at new Shopify.OptionSelectors (option_selection-fe6b72c2bbdd3369ac0bfefe8648e3c889efca213baefd4cfb0dd9363563831f.js:1)
  </code></pre>
  <p>I've given it just the product.id and various other things.</p>
  <p>I'm going to out on a whim here and say the Shopify documentation is detailed, yes, but it is <strong>not</strong> developer-friendly in my opinion. They give you so much information but never what you really need.</p>