Closed cliffstudio closed 5 years ago
Just some quick feedback - I'll get into this in-depth asap:
Pertaining to inline scripts:
inline: true
should not make a difference at all, because it is the defaulttype
attribute is supported, the id
is not yetWould it help you to support the id
attribute in a new version?
While we're at it, do you think supporting the class
attribute would make sense, too?
OK great!
Hmm I suppose both class and ID would be handy, they are needed in this instance though as there's this line of code in one of the files:
vertexShader: document.getElementById('wrapVertexShader').textContent,
fragmentShader: document.getElementById('wrapFragmentShader').textContent,
which calls for those two inline scripts.
Alright, great stuff! I'll make the change the day after tomorrow, including the class
attribute.
Is that alright?
Yep that's perfect :) Do you think that'll solve the problems I'm having on the given link though?
It's worth a try and sounds like a necessary enhancement to Ajaxify either way...
@nealfletcher:
The good news is, that I might be able to create a new draft today already. But I would like to make one more handshake before starting:
I researched the web thoroughly for the differences between the jQuery methods attr()
and prop()
and am just simply more confused than before...
You seem to know your HTML / jQuery. Maybe you can shed some light into the following questions:
prop()
to retrieve the type
attribute of inline scripts. Is that alright?When regarding the following attributes of an inline script:
id
andclass
...should I use attr()
or prop()
in order to retrieve them?
Thanks in advance!
Ah amazing news! Well personally I always use attr for this purpose and have never had any issues. So id recommend attr over prop but that’s only from experience :)
Done -> you can view the changes in the pull request.
Thanks for your guidance - I have used attr()
for the new attributes (id
and class
)
However, I have left the prop()
method active for the type
attribute. (Because nobody has complained so far)
I have also done a brief test against 4nf.org - seems to work (4nf.org does not address the new logic though)
If it doesn't work immediately, please feel free to fiddle around a bit with the new logic...
Thanks once more for raising this issue, which I need to address anyway...
In the event of success, I'll create a new corresponding minified file and probably a new version...
@nealfletcher
I presume, that this issue may have been solved in course of the newest release (7.2.5) Feel free to test!
I'm having a few problems at the moment trying to get some inline scripts to work, see below some code and I'll explain the problem I'm having:
This isn't my code by the way, it's from a clients site and they want the above canvas to show on their portfolio site so I've been given the code to work with. Problem is though it's now firing on ajax, I've even tried the 'inline: true' but this strips the ID attribute from the script tag which is integral.
You can see the test page here: http://ideais.nealfletcher.co.uk/test/ Which works on page load but not after ajax call, it's a bit of a head scratcher as to the best possible method to get this working with ajaxify...