Questions tagged [x-tag]

X-Tag is a small JavaScript library, created and supported by Mozilla, that enhances and simplifies development of Web Components.

X-Tag is a small JavaScript library, created and supported by Mozilla, that enhances and simplifies development of Web Components. It may help to think of it this way --> X-Tag : Web Components :: jQuery : DOM

For more information, docs, and downloads, see http://x-tags.org/

29 questions
55
votes
1 answer

Do Custom Elements require a dash in their name?

Is it possible to name your own custom elements , , or others without the use of a dash? Can use define elements without them?
addyo
  • 2,798
  • 1
  • 14
  • 21
29
votes
1 answer

If HTML Imports are dead/deprecated what's the best way to import your web component (X-Tag) template?

I'm working on my first X-Tag application and on it's page it says it's meant to work with Web Component API's such as 'Custom Elements, Shadow DOM, Templates, and HTML Imports'. I've started working on my templates, but what's the best option to…
Bob
  • 411
  • 1
  • 6
  • 12
12
votes
9 answers

Select tags that starts with "x-" in jQuery

How can I select nodes that begin with a "x-" tag name, here is an hierarchy DOM tree example:
jQuery does not allow me to query…
mateusmaso
  • 7,843
  • 6
  • 41
  • 54
6
votes
1 answer

Microsoft's X-Tag vs Mozilla's X-Tags

Recently, Microsoft started with a new X-Tag library to create custom elements. The website says, X-Tag is a Microsoft supported, open source, JavaScript library that wraps the W3C standard Web Components family of APIs to provide a compact,…
Pankaj Parashar
  • 9,762
  • 6
  • 35
  • 48
5
votes
1 answer

Why do we have to register a custom element

When we use polymer or x-tag, we have to register a new element. But why, if we can use plain es6 javascript to build a shady component without the registerElement. This works fine in the latest versions of Chrome, Firefox and Edge without a…
voscausa
  • 11,253
  • 2
  • 39
  • 67
4
votes
2 answers

comparison between polymer and x-tag and vanilla js

can any one give me some idea about difference between polymer,x-tag and vanilla js ? I have used polymer in my project, but i want comparison of polymer,x-tag and vanilla js.
Nirav Alagiya
  • 721
  • 1
  • 5
  • 19
3
votes
1 answer

Is the `extends` property deprecated in X-Tag?

The use-case for the extends property seems very straight-forward (http://www.x-tags.org/docs#custom-tag-registration-extends), however testing with the following, tag definition: (function () { xtag.register('dk-foo', { extends: 'b', …
thebjorn
  • 26,297
  • 11
  • 96
  • 138
2
votes
1 answer

Are Polymer and X-tag frontend frameworks compatible with a Content Management System ?

I would like to use a Java EE portlet based portal builder as uPortal or Liferay to deploy a web portal. Moreover, I have seen some new Frontend Frameworks (Polymer/X-tag) which seem to be really powerful and full of promises. So I wanted to know…
2
votes
2 answers

x-tag event delegation: accessing the root element

I need to delegate a 'tap' event to a close button in a custom element, and in turn call a close() method on the root element. Here is an example: xtag.register('settings-pane', { lifecycle: { created: function () { var tpl =…
jpec
  • 450
  • 4
  • 9
1
vote
1 answer

How to make a custom element post its value during form submit?

I'm creating a custom element that wraps a third-party control. For some reason, I have to apply this 3rd-party control on a
instead on an or else it will behave differently. I'm using x-tag to create the custom element.
eSPiYa
  • 882
  • 1
  • 12
  • 29
1
vote
2 answers

The right way to create custom sub-elements with X-Tag

So I know the x-tag web component library enables you create custom elements that appear in HTML like this: my content However, what if I wanted to create multiple custom sub-elements, like…
ObiHill
  • 11,448
  • 20
  • 86
  • 135
1
vote
3 answers

Extending every html element

With x-tag I am trying to find a way to extend every html element that I put is:"ajax-pop" attribute. What I want to do is when I click an element with is:"ajax-pop" attribute I will do some dynamic ajax loads. It will be a good starting point for…
Bahtiyar Özdere
  • 1,818
  • 17
  • 21
1
vote
2 answers

How to set inner text of tag in web component

I am making use of the x-tags. Here is the code that I am working on. I need to set the content of these div boxes with value of custom elements attribute value. Is it possible to do this? I tried setting it but I got error "undefined is not a…
Ajinkya Pisal
  • 551
  • 1
  • 6
  • 24
1
vote
1 answer

How to document an web component with jsdoc3

What would be the way to document a web component using jsdoc3 Here is an example of web component registered with x-tag. xtag.register('x-analytics', { lifecycle : { created : function(){ } }, accessors : { code…
krampstudio
  • 3,519
  • 2
  • 43
  • 63
1
vote
1 answer

How would you define the Typescript interface signature for an x-tag component

The x-tag spec has the following signature in pure JS - xtag.register('x-accordion', { // extend existing elements extends: 'div', mixins: ['superdefaults', 'otherdefaults'], lifecycle:{ created: function(){ //…
Dunco
  • 305
  • 1
  • 4
  • 6
1
2