Skip to content

Commit

Permalink
Remove usages of Prototype (#60)
Browse files Browse the repository at this point in the history
  • Loading branch information
basil authored Jul 19, 2023
1 parent 366c89c commit 3d1de89
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ Behaviour.register({"SELECT.staticCombobox": function(e) {
* Original behavior: Retrieves the contents whenever the value is updated.
* Changed behavior : Retrieves the contents only once in initializing.
*/
$A(e.getElementsByTagName("option")).each(function(o){
Array.from(e.getElementsByTagName("option")).forEach(function(o){
items.push(o.value);
});

Expand All @@ -44,7 +44,7 @@ Behaviour.register({"SELECT.staticCombobox": function(e) {
for(var i = 0; i < orig.attributes.length; ++i){
e.setAttribute(orig.attributes[i].name, orig.attributes[i].value);
}
e.setAttribute("value", $(orig).value);
e.setAttribute("value", orig.value);

orig.parentNode.insertBefore(e, orig);
orig.parentNode.removeChild(orig);
Expand All @@ -58,7 +58,7 @@ Behaviour.register({"SELECT.staticCombobox": function(e) {
var filter = function(value) {
return items;
};
if ($(e).hasClassName("editableType-Filter")) {
if (e.classList.contains("editableType-Filter")) {
// Show candidates that contain the current incomplete input.
filter = function(value) {
return items.filter(function (item) {
Expand Down

0 comments on commit 3d1de89

Please sign in to comment.