w3c / apiary

Simple JS library to use the W3C API in a declarative way
MIT License
13 stars 8 forks source link

Allow multiple entity IDs in different subtrees of the DOM #3

Open tripu opened 9 years ago

tripu commented 9 years ago

…much in the same way that AngularJS allows to have multiple controllers applied to different sections in the same page.

An example:

<html>
  <head>...</head>
  <body>
    <div data-domain-id="123">
      Name of this domain: <span class="w3capi w3capi-name"></span>.
    </div>
    <main>
      <p data-group-id="456">
        The chairs of <span class="w3capi w3capi-name"></span> are:
        <div class="w3capi w3capi-chairs"></div>
      </p>
      <p data-group-id="789">
        The chairs of <span class="w3capi w3capi-name"></span> are:
        <div class="w3capi w3capi-chairs"></div>
      </p>
    </main>
  </body>
</html>