Reputation: 15136
For example if I am doing a.setAttribute("begin", b+".focus");
it shows up in the HTML tab of the dev tool but it's completely ignored by the behavior (if I add begin="time1.focus"
directly in the html it works just fine).
How do you expose these dynamically-added attributes to the behavior?
Is there another way to add them? (createElement and document.write excluded)
PS: I have already tried using createAttribute + nodeValue + setAttributeNode to no avail.
Upvotes: 2
Views: 252
Reputation: 15136
The secret is the order: you need to set the attributes before adding the behavior's class or using addBehavior
.
Upvotes: 1