-
Notifications
You must be signed in to change notification settings - Fork 1
docs on how you use a rhelement #7
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
|
|
||
| <p>Each RHElement ships with an ES5 UMD (Universal Module Definition) version of | ||
| the component. If you need to support IE11 and you are using a module loader | ||
| like require.js, loading a RHElement is pretty simple. Just use the module |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
" If you need to support IE11 and you are using a module loader like require.js, loading a RHElement is pretty simple" - redundant to the page title and the link i just clicked to get to this page @kylebuch8
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
are there other module loaders besides require.js?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm going to leave the first part because you may not be navigating from the Getting Started page to this page. That's just one path to get here.
| <h1 id="use-a-rhelement-vanilla-js-es5-without-a-module-loader">Use a RHElement: Vanilla JS ES5 without a Module Loader</h1> | ||
|
|
||
| <p>If you need to support IE11 and you are not using a module loader, this method | ||
| works, but it’s a bit cumbersome.</p> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
better than Cumberbatch. But for real, why is is Cumbersome? Is it because I have to load these files everywhere and they are large?
| <span class="nt"><script </span><span class="na">src=</span><span class="s">"/@webcomponents/webcomponentsjs/custom-elements-es5-adapter.js"</span><span class="nt">></script></span> | ||
|
|
||
| <span class="c"><!-- load the web component polyfills --></span> | ||
| <span class="nt"><script </span><span class="na">src=</span><span class="s">"/@webcomponents/webcomponentsjs/webcomponents-loader.js"</span><span class="nt">></script></span> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you tell me more about webcomponents-loader.js and custom-elements-es5-adapter.js?
What are they? Where do i go get these files? Who's supporting them?
|
|
||
| Each RHElement ships with an ES6 version of the component. This method is your | ||
| best option if you don't have to support IE11. You can just use | ||
| `<script type="module">` to include a RHElement. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we add a link to this page: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/script#Attributes
| <li> | ||
| <span class="header">Create a RHElement</span> | ||
| <ul> | ||
| <li><a href="/docs/get-started.html">Get Started</a></li> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@kylebuch8 should this be "Use a RHElement"?
because get started could mean "create a RHElement" or "use a RHElement in your site"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we add a page about using NPM to include RHElements as a dependency? Even if there are other ways to do it, its nice to list out one of the easiest ways for newbs.
No description provided.