mirror of
https://github.com/bigskysoftware/htmx.git
synced 2025-10-03 07:45:21 +00:00
Merge branch 'dev' into v2.0v2.0
This commit is contained in:
commit
f84b332d19
@ -827,7 +827,7 @@ return (function () {
|
|||||||
var oobSelects = getClosestAttributeValue(elt, "hx-select-oob");
|
var oobSelects = getClosestAttributeValue(elt, "hx-select-oob");
|
||||||
if (oobSelects) {
|
if (oobSelects) {
|
||||||
var oobSelectValues = oobSelects.split(",");
|
var oobSelectValues = oobSelects.split(",");
|
||||||
for (let i = 0; i < oobSelectValues.length; i++) {
|
for (var i = 0; i < oobSelectValues.length; i++) {
|
||||||
var oobSelectValue = oobSelectValues[i].split(":", 2);
|
var oobSelectValue = oobSelectValues[i].split(":", 2);
|
||||||
var id = oobSelectValue[0].trim();
|
var id = oobSelectValue[0].trim();
|
||||||
if (id.indexOf("#") === 0) {
|
if (id.indexOf("#") === 0) {
|
||||||
@ -934,7 +934,7 @@ return (function () {
|
|||||||
function deInitOnHandlers(elt) {
|
function deInitOnHandlers(elt) {
|
||||||
var internalData = getInternalData(elt);
|
var internalData = getInternalData(elt);
|
||||||
if (internalData.onHandlers) {
|
if (internalData.onHandlers) {
|
||||||
for (let i = 0; i < internalData.onHandlers.length; i++) {
|
for (var i = 0; i < internalData.onHandlers.length; i++) {
|
||||||
const handlerInfo = internalData.onHandlers[i];
|
const handlerInfo = internalData.onHandlers[i];
|
||||||
elt.removeEventListener(handlerInfo.event, handlerInfo.listener);
|
elt.removeEventListener(handlerInfo.event, handlerInfo.listener);
|
||||||
}
|
}
|
||||||
@ -1979,7 +1979,7 @@ return (function () {
|
|||||||
function countCurlies(line) {
|
function countCurlies(line) {
|
||||||
var tokens = tokenizeString(line);
|
var tokens = tokenizeString(line);
|
||||||
var netCurlies = 0;
|
var netCurlies = 0;
|
||||||
for (let i = 0; i < tokens.length; i++) {
|
for (var i = 0; i < tokens.length; i++) {
|
||||||
const token = tokens[i];
|
const token = tokens[i];
|
||||||
if (token === "{") {
|
if (token === "{") {
|
||||||
netCurlies++;
|
netCurlies++;
|
||||||
@ -2019,7 +2019,7 @@ return (function () {
|
|||||||
var afterOnPosition = name.indexOf("-on") + 3;
|
var afterOnPosition = name.indexOf("-on") + 3;
|
||||||
var nextChar = name.slice(afterOnPosition, afterOnPosition + 1);
|
var nextChar = name.slice(afterOnPosition, afterOnPosition + 1);
|
||||||
if (nextChar === "-" || nextChar === ":") {
|
if (nextChar === "-" || nextChar === ":") {
|
||||||
let eventName = name.slice(afterOnPosition + 1);
|
var eventName = name.slice(afterOnPosition + 1);
|
||||||
// if the eventName starts with a colon or dash, prepend "htmx" for shorthand support
|
// if the eventName starts with a colon or dash, prepend "htmx" for shorthand support
|
||||||
if (startsWith(eventName, ":")) {
|
if (startsWith(eventName, ":")) {
|
||||||
eventName = "htmx" + eventName
|
eventName = "htmx" + eventName
|
||||||
|
Loading…
x
Reference in New Issue
Block a user