jquery mobile not working with google app script - jquery-mobile

When I've linked jQuery Mobile in my HTML Frontend in Google App Script, the following error will pop up in chrome debug tool.
Could not create the property 'jQuery110204039543210528791': USELESS is not extensible. 702029031-maestro_htmlapp_bin_maestro_htmlapp.js?lib=MT0FjXL5Y7sJYLE797XdNlumjcy0VxvZE:62
jquery.mobile-1.3.2.min.js:2: Could not create the property 'jQuery110204039543210528791': USELESS is not extensible.
More looks likely the Caja in Google App Script is not supporting jQuery Mobile?
Any idears?

Caja sanitation prevents jQuery mobile markup. This is an issue addressed in the Issue Tracker.
I'm not sure how long it would take to have jQuery added to Caja's list...

Related

Why does Google lighthouse see jquery ui vulnerability on my website even though i am no longer using jquery ui

I used to use jquery ui on my website www.iusefaith.com but have stopped yet Google lighthouse still sees Jquery Ui on my website. Here is a link to the lighthouse report. Lighthouse says I have jquery ui meanwhile i have removed it.
Why does Google lighthouse see jquery ui vulnerability on my website even though i am no longer using jquery ui ?
Line 69 of: https://res.cloudinary.com/iusefaith/raw/upload/v1606174446/iusefaith_general_jquery_scripts_light_compressed.js
A few hundred characters along (after what looks like Modernizr) I see:
(function(e,t){function i(t,i){var a,n,r,o=t.nodeName.toLowerCase();return"area"===o?(a=t.parentNode,n=a.name,t.href&&n&&"map"
compare it to jQuery-ui 1.10.3
(function(t,e){function i(e,i){var n,o,a,r=e.nodeName.toLowerCase();return"area"===r?(n=e.parentNode,o=n.name,e.href&&o&&"map"
It looks like jQuery-ui from the first few characters there. You need to clear any cache plugins you have and ensure whatever builds the file I linked above doesn't include jQuery-ui anymore.

Issue with multi-page navigation using jQuery Mobile Framework in IBM Worklight [duplicate]

This question already has an answer here:
How to change between pages using Jquery Mobile in Worklight
(1 answer)
Closed 8 years ago.
I am developing a sample mobile banking app in IBM Worklight V6.2 using the jQuery Mobile Framework. I read the Getting Started Documentation on IBM Worklight and it mentions a way to implement multi-page navigation using fragments. However, it also states that if you are using a JavaScript UI Framework, use its API's instead.
I read up on the jQuery Mobile pagecontainer method and am implementing it as below:
<li>Branch Locations</li>
However, I get the issue that the linked page loads after clicking the link but the original page then reloads. Could someone explain to me why this is happening? Is this a known issue?
I found the problem. I had a link to the
<script src="jqueryMobile/jquery.mobile-1.4.3.js"></script>
In the linked pages. That is the reason it was reinitializing the original index page.
See this project for a Worklight 6.2-based app using jQuery Mobile 1.4.3's Pagecontainer widget.
In the app, you click on a button to transition from index.html to page1.html by using:
HTML
load page1
JavaScript
function changeToPage1() {
$(':mobile-pagecontainer').pagecontainer('change','page1.html');
}
You may also take a look at the following questions that are answered with explanation and project examples for using changePage.
Note that the projects may be from Worklight 6.0 and 6.1 rather than 6.2 but that does not matter as here it's about the JavaScript, simply review it.
How to change between pages using Jquery Mobile in Worklight
IBM Workligt Single HTML file containing all application pages: How to load new page?
IBM Worklight 6.1 - Why is Cordova code not working when placed in a sub-page?
IBM Worklight - Page fragmentation
IBM Worklight - Navigation errors in a multipage app
In all of them, the idea is that Worklight is a Single Page Application. Thus you cannot load another HTML file and expect the application to continue functioning. By doing so you lose the "context" of the Worklight framework - the references to the included JS files, etc.
Instead, you can use jQuery's load or jQuery Mobile's changePage (deprecated in v1.4, to be removed in v5), to load different "pages". Ample examples are provided above.

Meteor + jQuery Mobile + Phonegap

How to connect jQuery Mobile (meteor add ...)? I understand that you can connect by adding the head, but I do not want to.
I know about how to use Meteor + Phonegap, however, advise which option is better?
Outdated information:
jQuery-Mobile Meteor sample integration and/or integration guidelines
I created a new jQuery mobile (jqm) demo app at jqmdemo.meteor.com
because the "old" demo app (jqm.meteor.com) wasn't working as expected.
You can create a package in your local lib folder to use jqm in meteor (see source code on bitbucket, link is on the demo page).
There's no meteorite package for this at atmosphere yet (mrt add ...). I haven't created one, because I think there are still many things that can be improved in the demo (e.g. popups are not working in the demo).
Also event binding needs to be re-checked because I added the event to the rendered function of the templates with jQuery.on(...).
Attaching the jquery mobile events to the template.[yourtemplate].events({}) handler would be better, but I don't know how to do this.
I can not say anything to phonegap at the moment. Because I haven't tested it.
But at the moment I think that jqm and meteor is a bit slow in performance. If you have a look at the fontawesome-demo inside of the jqm demo you'll notice that it takes quite long to render the >300 icons. Maybe a server side rendering would be better, but I think that's not ready in meteor.

Twitter Bootstrap for mobile

If I want to develop an web application on mobile, so should I use Twitter Bootstrap or Jquery Mobile? Twitter Bootstrap good for mobile or not?
As of version 2.0, Bootstrap is fully mobile compatible. There actually has been another question about it.
One thing you may want to keep in mind, is the purpose they're build for. jQuery mobile was created and is maintained with mobile compatibility in mind whereas Bootstrap offers it as an addition (meaning that it won't be it's main priority). If there is nothing in bootstrap that you are particularly interested in, I would go for jQuery mobile.
Depends what you want to do..
Twitter bootstrap is a CSS framework with some javascripts on it. While jquery Mobile is javascript to create native mobile feel..
So basically they are quite different..
Bootstrap 3 is built group up for mobile first, you may want to take a look at the 3.0 branch on GitHub. I didn't use jquery mobile in my app Django Market b/c I would have to change the backend and didn't want to invest. Bootstrap 3.0 IMHO will provide a lot of "competition" for other frameworks due to its power and simplicity
From my experience, i've using jQuery Mobile for a simple informative application. I spent some days on the base code, then i tested it on tablets, handsets using PhoneGap and the results wasn't good. There are still some troubles on transitions for Android and iOS devices.

Does PhoneGap require JQM or is that a coincidence?

The PhoneGap examples that I'm seeing use jQuery Mobile, but I'm wondering if PhoneGap requires it, or if people are using JQM because they're (obviously) writing a mobile app?
In fact, does PhoneGap require jQuery at all?
Let me Google that for you:
http://wiki.phonegap.com/w/page/16494778/Getting%20Started%20with%20PhoneGap%20(iOS)%20-%20Xcode%203#Requirements
That is for iOS but no PhoneGap does not require jQuery.
People are most likely using jQuery mobile since they are trying to target multiple devices and JQM supports that fairly well out of the box.
http://wiki.phonegap.com/w/page/36868306/UI%20Development%20using%20jQueryMobile
Phonegap does not require jQuery at all.
It's basically just an empty browser window without all the fluff. You can use whatever HTML, CSS, and Javascript tricks you want as long as they're compatible with an HTML5 capable browser.
I like http://zeptojs.com/ for handling the javascript. Much more lightweight (although you lose a lot of the animations and stuff that JQuery has)

Resources