/*
 * Copyright (c) 2018, 2026, Oracle and/or its affiliates.
 * Licensed under The Universal Permissive License (UPL), Version 1.0
 * as shown at https://oss.oracle.com/licenses/upl/
 */
const RULE_NAME="oj-html-binding-attr";const SHORT_DESCRIPT="JET binding elements should not use global attributes";const LONG_DESCRIPT="The binding elements in JET (e.g. <b><i>oj-bind-for-each</i></b>, <b><i>oj-bind-if</i></b>, <b><i>oj-bind-slot</i></b>, <b><i>oj-bind-text</i></b>) are run through "+"a preprocessor and replaced with comment nodes when bindings are applied.  As a result, the global HTML "+"attributes which are typically supported on all elements (e.g. <i>style</i>, <i>id</i>, etc.) are meaningless when applied "+"to binding elements.";function getName(){return RULE_NAME};function getShortDescription(){return SHORT_DESCRIPT};function getDescription(){return LONG_DESCRIPT};function register(){return{bindingtag:_onBind}};function _onBind(ruleCtx,tagName){var attribs,attrib,issue,attrPos;attribs=ruleCtx.node.attribs;if(!attribs){return}for(attrib in attribs){if(ruleCtx.utils.DomUtils.isCommonAttr(attrib)||attrib.startsWith("aria")){issue=new ruleCtx.Issue(`Use of attribute '${attrib}' is meaningless for binding element <${tagName}>`);attrPos=ruleCtx.utils.DomUtils.getAttribPosition(ruleCtx.data,ruleCtx.node,attrib);issue.setPosition(attrPos.row,attrPos.col,attrPos.start,attrPos.end);ruleCtx.reporter.addIssue(issue,ruleCtx)}}};module.exports={getName,getDescription,getShortDescription,register};