fixed: hasAttribute would return true when cxt has default attribute -- such as input[type]